From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:52770) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SrPXF-0004YP-FU for qemu-devel@nongnu.org; Wed, 18 Jul 2012 04:23:06 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SrPXC-0004BT-8V for qemu-devel@nongnu.org; Wed, 18 Jul 2012 04:23:05 -0400 Received: from mail-ob0-f173.google.com ([209.85.214.173]:39606) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SrPXC-0004Ae-3H for qemu-devel@nongnu.org; Wed, 18 Jul 2012 04:23:02 -0400 Received: by obbta14 with SMTP id ta14so1823376obb.4 for ; Wed, 18 Jul 2012 01:23:00 -0700 (PDT) From: Alexey Kardashevskiy Date: Wed, 18 Jul 2012 18:22:51 +1000 Message-Id: <1342599771-13844-1-git-send-email-aik@ozlabs.ru> Subject: [Qemu-devel] [PATCH] powerpc pci: fixed packing of ranges[] List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Alexander Graf Cc: Alexey Kardashevskiy , qemu-ppc@nongnu.org, qemu-devel@nongnu.org, David Gibson By default mingw-gcc is trying to pack structures the way to preserve binary compatibility with MS Visual C what leads to incorrect and unexpected padding in the PCI bus ranges property of the sPAPR PHB. The patch replaces __attribute__((packed)) with more strict QEMU_PACKED which actually is __attribute__((gcc_struct, packed)) on Windows. Signed-off-by: Alexey Kardashevskiy --- hw/spapr_pci.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/spapr_pci.c b/hw/spapr_pci.c index b3032d2..0261d2e 100644 --- a/hw/spapr_pci.c +++ b/hw/spapr_pci.c @@ -418,7 +418,7 @@ int spapr_populate_pci_dt(sPAPRPHBState *phb, uint64_t child; uint64_t parent; uint64_t size; - } __attribute__((packed)) ranges[] = { + } QEMU_PACKED ranges[] = { { cpu_to_be32(b_ss(1)), cpu_to_be64(0), cpu_to_be64(phb->io_win_addr), -- 1.7.10.4