Blue Swirl f90074f493 slavio_timer: avoid structure holes spotted by pahole
Report from pahole on amd64 host:
struct SLAVIO_TIMERState {
	SysBusDevice               busdev;               /*     0  5648 */
	/* --- cacheline 88 boundary (5632 bytes) was 16 bytes ago --- */
	uint32_t                   num_cpus;             /*  5648     4 */

	/* XXX 4 bytes hole, try to pack */

	CPUTimerState              cputimer[17];         /*  5656   816 */
	/* --- cacheline 101 boundary (6464 bytes) was 8 bytes ago --- */
	uint32_t                   cputimer_mode;        /*  6472     4 */

	/* size: 6480, cachelines: 102 */
	/* sum members: 6472, holes: 1, sum holes: 4 */
	/* padding: 4 */
	/* last cacheline: 16 bytes */
};	/* definitions: 1 */

struct CPUTimerState {
	qemu_irq                   irq;                  /*     0     8 */
	ptimer_state *             timer;                /*     8     8 */
	uint32_t                   count;                /*    16     4 */
	uint32_t                   counthigh;            /*    20     4 */
	uint32_t                   reached;              /*    24     4 */

	/* XXX 4 bytes hole, try to pack */

	uint64_t                   limit;                /*    32     8 */
	uint32_t                   running;              /*    40     4 */

	/* size: 48, cachelines: 1 */
	/* sum members: 40, holes: 1, sum holes: 4 */
	/* padding: 4 */
	/* last cacheline: 48 bytes */
};	/* definitions: 1 */

Fix by rearranging the structures to avoid padding.

Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2011-08-21 19:52:27 +00:00
..
2010-06-13 19:00:50 +01:00
2011-07-23 11:26:12 -05:00
2011-04-10 14:00:14 +02:00
2011-04-22 14:41:40 -05:00
2011-07-23 11:26:12 -05:00
2010-06-19 07:47:42 +00:00
2010-05-15 17:36:13 +00:00
2011-07-23 11:26:12 -05:00
2011-07-23 11:26:12 -05:00
2011-07-23 11:26:12 -05:00
2011-07-23 11:26:12 -05:00
2011-07-23 11:26:12 -05:00
2011-07-23 11:26:12 -05:00
2011-07-23 11:26:12 -05:00
2011-06-24 09:13:37 +01:00
2010-11-01 17:57:22 +03:00
2011-07-24 14:48:57 +00:00
2009-11-22 21:27:40 +00:00
2011-07-23 11:26:12 -05:00
2009-11-09 08:43:03 -06:00
2010-12-11 15:24:25 +00:00
2011-08-08 10:22:29 -05:00
2010-04-08 21:44:38 +02:00
2010-02-07 19:28:32 +00:00
2010-04-05 19:57:40 +01:00
2010-07-06 10:36:28 -05:00
2011-07-23 11:26:12 -05:00
2011-07-23 11:26:12 -05:00
2010-12-11 15:24:25 +00:00
2010-04-18 08:55:12 +00:00
2011-08-08 10:22:29 -05:00
2011-08-08 10:22:29 -05:00
2011-08-12 08:27:37 -05:00
2009-10-01 16:12:16 -05:00
2011-08-11 12:02:30 +02:00
2011-08-11 11:12:16 +02:00
2011-04-07 13:51:48 +02:00
2011-02-20 09:34:06 +00:00
2009-03-28 16:17:50 +00:00
2009-10-01 16:12:16 -05:00
2011-01-24 20:54:34 +00:00
2009-09-10 19:48:00 +04:00
2010-11-09 16:51:12 +03:00
2011-08-10 14:14:00 +02:00
2010-06-14 11:12:53 -05:00
2011-07-12 20:00:26 +00:00
2011-08-10 14:14:00 +02:00
2011-07-23 11:26:12 -05:00
2011-08-08 10:22:29 -05:00
2011-07-23 11:26:12 -05:00
2010-11-09 16:51:11 +03:00
2010-10-20 12:06:43 +02:00
2011-08-08 10:22:30 -05:00
2011-08-05 12:04:27 -03:00
2011-07-23 11:26:12 -05:00
2011-03-07 13:42:36 +01:00
2011-03-07 13:42:36 +01:00
2011-03-07 13:42:36 +01:00
2011-03-07 13:42:36 +01:00
2011-03-07 13:42:36 +01:00
2010-12-11 21:32:47 +00:00
2011-08-08 10:22:29 -05:00
2011-04-22 14:41:43 -05:00
2011-02-11 23:31:17 +01:00
2009-10-01 16:12:16 -05:00
2011-07-23 11:26:12 -05:00
2011-07-12 20:00:28 +00:00
2010-10-19 14:09:06 +02:00
2011-08-08 10:22:30 -05:00
2011-07-23 11:26:12 -05:00
2011-08-08 10:22:29 -05:00
2011-08-08 10:22:29 -05:00
2010-02-07 08:05:03 +00:00
2011-08-08 10:22:29 -05:00
2011-07-30 06:00:40 +02:00
2011-07-27 10:57:22 +03:00
2010-11-22 10:00:06 +02:00
2010-08-24 15:22:24 +00:00
2011-08-08 10:22:29 -05:00
2011-07-23 11:26:12 -05:00
2011-07-23 11:26:12 -05:00
2011-07-23 11:26:12 -05:00
2011-07-23 11:26:12 -05:00
2011-07-23 11:26:12 -05:00
2011-07-23 11:26:12 -05:00
2011-07-23 11:26:12 -05:00
2011-07-23 11:26:12 -05:00
2011-07-23 11:26:12 -05:00
2009-10-01 16:12:16 -05:00
2009-10-01 16:12:16 -05:00
2009-10-01 16:12:16 -05:00
2011-08-08 10:22:29 -05:00
2011-04-01 18:34:55 +02:00
2008-12-13 09:32:43 +00:00
2011-02-25 12:13:38 +01:00
2011-07-23 11:26:12 -05:00
2011-07-23 11:26:12 -05:00
2011-07-23 11:26:12 -05:00
2009-10-01 16:12:16 -05:00
2009-10-01 16:12:16 -05:00
2011-07-23 11:26:12 -05:00
2011-07-23 11:26:12 -05:00
2010-12-11 15:24:25 +00:00
2011-08-12 08:31:28 -05:00
2009-10-01 16:12:16 -05:00
2011-06-07 13:52:30 -05:00
2009-10-01 16:12:16 -05:00
2009-10-01 16:12:16 -05:00
2011-07-23 11:26:12 -05:00
2011-07-23 11:26:12 -05:00
2009-10-01 16:12:16 -05:00
2011-07-30 09:41:14 +00:00
2011-07-12 20:00:33 +00:00
2009-10-01 16:12:16 -05:00
2011-07-30 06:21:31 +02:00
2011-07-23 11:26:12 -05:00
2011-07-23 11:26:12 -05:00
2011-07-23 11:26:12 -05:00
2011-07-23 11:26:12 -05:00
2011-05-06 08:19:25 +01:00
2009-10-01 16:12:16 -05:00
2010-12-11 15:24:25 +00:00
2011-04-22 14:41:40 -05:00
2011-04-22 14:41:40 -05:00
2010-12-11 15:24:25 +00:00
2011-08-04 15:51:22 +02:00
2011-08-04 15:51:22 +02:00
2011-08-10 14:14:00 +02:00
2011-08-04 15:51:22 +02:00
2011-08-04 15:51:22 +02:00
2010-04-04 21:18:26 +01:00
2011-08-04 15:51:29 +02:00
2011-08-04 15:51:22 +02:00
2011-08-04 15:51:22 +02:00
2011-08-10 14:14:00 +02:00
2011-07-23 11:26:12 -05:00
2011-08-08 10:22:30 -05:00
2011-03-22 07:44:15 +01:00
2011-02-14 12:39:46 -02:00
2011-07-26 06:43:11 +02:00
2011-04-08 11:32:21 +02:00
2010-10-20 12:06:50 +02:00
2011-07-30 07:08:30 +02:00