qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Igor Mammedov <imammedo@redhat.com>
To: Bernhard Beschow <shentey@gmail.com>
Cc: qemu-devel@nongnu.org,
	"Marcel Apfelbaum" <marcel.apfelbaum@gmail.com>,
	"Philippe Mathieu-Daudé" <philmd@linaro.org>,
	"Ani Sinha" <ani@anisinha.ca>,
	"Michael S. Tsirkin" <mst@redhat.com>,
	"Aurelien Jarno" <aurelien@aurel32.net>
Subject: Re: [PATCH 4/7] hw/acpi/ich9: Use ICH9_PMIO_GPE0_STS just once
Date: Tue, 24 Jan 2023 18:18:01 +0100	[thread overview]
Message-ID: <20230124181801.0511869b@imammedo.users.ipa.redhat.com> (raw)
In-Reply-To: <20230122170724.21868-5-shentey@gmail.com>

On Sun, 22 Jan 2023 18:07:21 +0100
Bernhard Beschow <shentey@gmail.com> wrote:

> Cosmetic change emphasizing 

... how 3/7 makes it more confusing
  
> that always the actual address of the gpe0
> block is returned.
> 
> Signed-off-by: Bernhard Beschow <shentey@gmail.com>
> ---
>  hw/acpi/ich9.c | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/hw/acpi/ich9.c b/hw/acpi/ich9.c
> index f8af238974..40a20e01ea 100644
> --- a/hw/acpi/ich9.c
> +++ b/hw/acpi/ich9.c
> @@ -348,7 +348,9 @@ static void ich9_pm_get_gpe0_blk(Object *obj, Visitor *v, const char *name,
>                                   void *opaque, Error **errp)
>  {
>      ICH9LPCPMRegs *pm = opaque;
> -    uint64_t value = pm->io.addr + ICH9_PMIO_GPE0_STS;
> +    uint64_t value = pm->io.addr + pm->io_gpe.addr;

do not poke inside of MemoryRegion, right API to use here
if you really want to get it from memory region would be
  
memory_region_find && MemoryRegionSection::offset_within_address_space
magic

I'd just drop 3/7 and this patch

> +
> +    assert(&pm->io == pm->io_gpe.container);
>  
>      visit_type_uint64(v, name, &value, errp);
>  }



  reply	other threads:[~2023-01-24 17:18 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-01-22 17:07 [PATCH 0/7] ACPI controller cleanup Bernhard Beschow
2023-01-22 17:07 ` [PATCH 1/7] hw/acpi/{ich9, piix4}: Reuse existing attributes for QOM properties Bernhard Beschow
2023-01-24 16:48   ` [PATCH 1/7] hw/acpi/{ich9,piix4}: " Igor Mammedov
2023-01-22 17:07 ` [PATCH 2/7] hw/acpi/ich9: Remove unneeded assignments Bernhard Beschow
2023-01-24 16:55   ` Igor Mammedov
2023-01-29 14:48     ` Bernhard Beschow
2023-01-22 17:07 ` [PATCH 3/7] hw/acpi/{ich9, piix4}: Resolve redundant io_base address attributes Bernhard Beschow
2023-01-23  7:57   ` [PATCH 3/7] hw/acpi/{ich9,piix4}: " Philippe Mathieu-Daudé
2023-01-23 15:49     ` Bernhard Beschow
2023-01-24 16:05       ` Igor Mammedov
2023-01-29 15:19         ` Bernhard Beschow
2023-01-22 17:07 ` [PATCH 4/7] hw/acpi/ich9: Use ICH9_PMIO_GPE0_STS just once Bernhard Beschow
2023-01-24 17:18   ` Igor Mammedov [this message]
2023-01-22 17:07 ` [PATCH 5/7] hw/acpi/piix4: Fix offset of GPE0 registers Bernhard Beschow
2023-01-25 15:55   ` Igor Mammedov
2023-01-29 14:55     ` Bernhard Beschow
2023-03-02 14:31       ` Igor Mammedov
2023-01-22 17:07 ` [PATCH 6/7] hw/acpi: Trace GPE access in all device models, not just PIIX4 Bernhard Beschow
2023-01-23  7:59   ` Philippe Mathieu-Daudé
2023-01-25 16:08   ` Igor Mammedov
2023-01-22 17:07 ` [PATCH 7/7] hw/acpi/core: Trace enable and status registers of GPE separately Bernhard Beschow
2023-01-25 16:17   ` Igor Mammedov
2023-01-25 16:53 ` [PATCH 0/7] ACPI controller cleanup Igor Mammedov

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=20230124181801.0511869b@imammedo.users.ipa.redhat.com \
    --to=imammedo@redhat.com \
    --cc=ani@anisinha.ca \
    --cc=aurelien@aurel32.net \
    --cc=marcel.apfelbaum@gmail.com \
    --cc=mst@redhat.com \
    --cc=philmd@linaro.org \
    --cc=qemu-devel@nongnu.org \
    --cc=shentey@gmail.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).