All of lore.kernel.org
 help / color / mirror / Atom feed
From: Alexander Graf <agraf@suse.de>
To: Stefan Weil <sw@weilnetz.de>
Cc: Alexey Kardashevskiy <aik@ozlabs.ru>,
	qemu-trivial <qemu-trivial@nongnu.org>,
	qemu-ppc@nongnu.org, qemu-devel@nongnu.org,
	David Gibson <david@gibson.dropbear.id.au>
Subject: Re: [Qemu-devel] [PATCH] powerpc pci: fixed packing of ranges[]
Date: Wed, 18 Jul 2012 17:41:36 +0200	[thread overview]
Message-ID: <5006D930.8080205@suse.de> (raw)
In-Reply-To: <5006D8F8.5050306@weilnetz.de>

On 07/18/2012 05:40 PM, Stefan Weil wrote:
> Am 18.07.2012 10:22, schrieb Alexey Kardashevskiy:
>> 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 <aik@ozlabs.ru>
>> ---
>>   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),
>
>
> The patch changes sizeof(ranges[0]) from 32 to 28 bytes
> and can be applied as a trivial patch.
>
> Tested-by: Stefan Weil <sw@weilnetz.de>
> Reviewed-by: Stefan Weil <sw@weilnetz.de>
>

So do you want to take it through the trivial queue? I'm fine either way.

Acked-by: Alexander Graf <agraf@suse.de>


Alex

  reply	other threads:[~2012-07-18 15:41 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-07-18  8:22 [Qemu-devel] [PATCH] powerpc pci: fixed packing of ranges[] Alexey Kardashevskiy
2012-07-18 15:40 ` Stefan Weil
2012-07-18 15:41   ` Alexander Graf [this message]
2012-07-21  9:41     ` Stefan Hajnoczi

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5006D930.8080205@suse.de \
    --to=agraf@suse.de \
    --cc=aik@ozlabs.ru \
    --cc=david@gibson.dropbear.id.au \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-ppc@nongnu.org \
    --cc=qemu-trivial@nongnu.org \
    --cc=sw@weilnetz.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.