summary refs log tree commit diff stats
path: root/hw/fdc.c
diff options
context:
space:
mode:
authorBlue Swirl <blauwirbel@gmail.com>2011-08-07 19:38:49 +0000
committerBlue Swirl <blauwirbel@gmail.com>2011-08-21 19:52:38 +0000
commitfe87aa83c6d0c78bc29230ace4598363cdf4c835 (patch)
treec0df5368a612e1dd9e3d53fb1790d39731eaf19c /hw/fdc.c
parent9a975d63563c2d09279b0e9a7fb7c2abcbd512b9 (diff)
downloadfocaccia-qemu-fe87aa83c6d0c78bc29230ace4598363cdf4c835.tar.gz
focaccia-qemu-fe87aa83c6d0c78bc29230ace4598363cdf4c835.zip
pcnet: avoid structure holes spotted by pahole
Edited report from pahole on amd64 host:
struct PCNetState_st {
...
	uint16_t                   bcr[32];              /*   340    64 */

	/* XXX 4 bytes hole, try to pack */
...
	int                        tx_busy;              /*  4520     4 */

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

	qemu_irq                   irq;                  /*  4528     8 */
	void                       (*phys_mem_read)(void *, target_phys_addr_t, uint8_t *, int, int); /*  4536     8 */
	/* --- cacheline 71 boundary (4544 bytes) --- */
	void                       (*phys_mem_write)(void *, target_phys_addr_t, uint8_t *, int, int); /*  4544     8 */
	void *                     dma_opaque;           /*  4552     8 */
	int                        looptest;             /*  4560     4 */

	/* size: 4568, cachelines: 72 */
	/* sum members: 4556, holes: 2, sum holes: 8 */
	/* padding: 4 */
	/* last cacheline: 24 bytes */
};	/* definitions: 2 */

Fix by rearranging the structure to avoid padding.

Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
Diffstat (limited to 'hw/fdc.c')
0 files changed, 0 insertions, 0 deletions