From: Gerd Hoffmann <kraxel@redhat.com>
To: "Andreas Färber" <afaerber@suse.de>
Cc: Julien Grall <julien.grall@citrix.com>, qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH 15/20] acpi: switch smbus to memory api
Date: Tue, 27 Nov 2012 09:47:36 +0100 [thread overview]
Message-ID: <50B47E28.1050204@redhat.com> (raw)
In-Reply-To: <50B3882D.7000700@suse.de>
On 11/26/12 16:18, Andreas Färber wrote:
> Am 23.11.2012 16:48, schrieb Gerd Hoffmann:
>> diff --git a/hw/pm_smbus.c b/hw/pm_smbus.c
>> index 5d6046d..ea1380c 100644
>> --- a/hw/pm_smbus.c
>> +++ b/hw/pm_smbus.c
> [...]
>> @@ -170,7 +170,16 @@ uint32_t smb_ioport_readb(void *opaque, uint32_t addr)
>> return val;
>> }
>>
>> +static const MemoryRegionOps pm_smbus_ops = {
>> + .read = smb_ioport_readb,
>> + .write = smb_ioport_writeb,
>> + .valid.min_access_size = 1,
>> + .valid.max_access_size = 1,
>> + .endianness = DEVICE_LITTLE_ENDIAN,
>> +};
>
> I notice that in comparison to Julien's patch, you are setting .valid
> here where he used .impl.
Setting .valid matches previous behavior (only byte handlers registered).
I'm not fully sure what the defaults for .valid are in case only .impl
is specified. I usually either set .valid only or explicitly specify
both if I want the memory api split dword writes into bytes for me.
> Also a generic C question: When using C99-style struct initializers as
> for the MemoryRegionOps, I understand that the fields not explicitly
> assigned are zero-initialized. Does that also apply to .foo.bar = baz
> notation or would it be advisable to use nested .foo = { .bar = baz }?
As far I know the whole (outer) struct is zero-initialized.
cheers,
Gerd
next prev parent reply other threads:[~2012-11-27 8:47 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-11-23 15:48 [Qemu-devel] [PATCH 00/20] acpi: switch to memory api Gerd Hoffmann
2012-11-23 15:48 ` [Qemu-devel] [PATCH 01/20] apci: switch piix4 " Gerd Hoffmann
2012-11-23 15:48 ` [Qemu-devel] [PATCH 02/20] apci: switch ich9 " Gerd Hoffmann
2012-11-23 15:48 ` [Qemu-devel] [PATCH 03/20] apci: switch vt82c686 " Gerd Hoffmann
2012-11-23 15:48 ` [Qemu-devel] [PATCH 04/20] apci: switch timer " Gerd Hoffmann
2012-11-23 15:48 ` [Qemu-devel] [PATCH 05/20] apci: switch timer to memory api [ich9] Gerd Hoffmann
2012-11-23 15:48 ` [Qemu-devel] [PATCH 06/20] apci: switch cnt to memory api Gerd Hoffmann
2012-11-23 15:48 ` [Qemu-devel] [PATCH 07/20] apci: switch cnt to memory api [ich9] Gerd Hoffmann
2012-11-23 15:48 ` [Qemu-devel] [PATCH 08/20] apci: switch evt to memory api Gerd Hoffmann
2012-11-23 15:48 ` [Qemu-devel] [PATCH 09/20] apci: switch evt to memory api [ich9] Gerd Hoffmann
2012-11-23 15:48 ` [Qemu-devel] [PATCH 10/20] acpi: cleanup piix4 memory region Gerd Hoffmann
2012-11-23 15:48 ` [Qemu-devel] [PATCH 11/20] acpi: cleanup vt82c686 " Gerd Hoffmann
2012-11-23 15:48 ` [Qemu-devel] [PATCH 12/20] apci: switch ich9 gpe to memory api Gerd Hoffmann
2012-11-23 15:48 ` [Qemu-devel] [PATCH 13/20] apci: switch ich9 smi " Gerd Hoffmann
2012-11-23 15:48 ` [Qemu-devel] [PATCH 14/20] acpi: cleanup ich9 memory region Gerd Hoffmann
2012-11-23 15:48 ` [Qemu-devel] [PATCH 15/20] acpi: switch smbus to memory api Gerd Hoffmann
2012-11-26 15:18 ` Andreas Färber
2012-11-27 8:47 ` Gerd Hoffmann [this message]
2012-11-23 15:48 ` [Qemu-devel] [PATCH 16/20] acpi: fix piix4 smbus mapping Gerd Hoffmann
2012-11-23 15:48 ` [Qemu-devel] [PATCH 17/20] apci: switch piix4 gpe to memory api Gerd Hoffmann
2012-11-23 15:48 ` [Qemu-devel] [PATCH 18/20] acpi: remove acpi_gpe_blk Gerd Hoffmann
2012-11-23 15:48 ` [Qemu-devel] [PATCH 19/20] apci: switch piix4 pci hotplug to memory api Gerd Hoffmann
2012-11-23 15:48 ` [Qemu-devel] [PATCH 20/20] q35: update lpc pci config space according to configured devices Gerd Hoffmann
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=50B47E28.1050204@redhat.com \
--to=kraxel@redhat.com \
--cc=afaerber@suse.de \
--cc=julien.grall@citrix.com \
--cc=qemu-devel@nongnu.org \
/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.