From: Igor Mammedov <imammedo@redhat.com>
To: "Philippe Mathieu-Daudé" <philmd@linaro.org>
Cc: qemu-devel@nongnu.org, Paolo Bonzini <pbonzini@redhat.com>,
"Michael S. Tsirkin" <mst@redhat.com>,
Pierrick Bouvier <pierrick.bouvier@linaro.org>,
Ani Sinha <anisinha@redhat.com>
Subject: Re: [PATCH v2 02/11] hw/acpi: Move acpi_send_event() function out of acpi_interface.c
Date: Mon, 2 Mar 2026 07:22:30 +0100 [thread overview]
Message-ID: <20260302072230.668f5906@imammedo> (raw)
In-Reply-To: <20260225035739.42848-3-philmd@linaro.org>
On Wed, 25 Feb 2026 04:57:30 +0100
Philippe Mathieu-Daudé <philmd@linaro.org> wrote:
> acpi_interface.c should only register QOM interfaces. Move
> the acpi_send_event() function to core.c with the other
> event handlers, and its declaration in 'hw/acpi/acpi.h'.
>
> Reviewed-by: Pierrick Bouvier <pierrick.bouvier@linaro.org>
> Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Igor Mammedov <imammedo@redhat.com>
> ---
> include/hw/acpi/acpi.h | 1 +
> include/hw/acpi/acpi_dev_interface.h | 2 --
> hw/acpi/acpi_interface.c | 9 ---------
> hw/acpi/core.c | 10 ++++++++++
> 4 files changed, 11 insertions(+), 11 deletions(-)
>
> diff --git a/include/hw/acpi/acpi.h b/include/hw/acpi/acpi.h
> index b036116dfb8..dc3672db521 100644
> --- a/include/hw/acpi/acpi.h
> +++ b/include/hw/acpi/acpi.h
> @@ -182,6 +182,7 @@ void acpi_gpe_reset(ACPIREGS *ar);
> void acpi_gpe_ioport_writeb(ACPIREGS *ar, uint32_t addr, uint32_t val);
> uint32_t acpi_gpe_ioport_readb(ACPIREGS *ar, uint32_t addr);
>
> +void acpi_send_event(DeviceState *dev, AcpiEventStatusBits event);
> void acpi_send_gpe_event(ACPIREGS *ar, qemu_irq irq,
> AcpiEventStatusBits status);
>
> diff --git a/include/hw/acpi/acpi_dev_interface.h b/include/hw/acpi/acpi_dev_interface.h
> index 5927e40eaff..65debb90a8d 100644
> --- a/include/hw/acpi/acpi_dev_interface.h
> +++ b/include/hw/acpi/acpi_dev_interface.h
> @@ -27,8 +27,6 @@ DECLARE_CLASS_CHECKERS(AcpiDeviceIfClass, ACPI_DEVICE_IF,
>
> typedef struct AcpiDeviceIf AcpiDeviceIf;
>
> -void acpi_send_event(DeviceState *dev, AcpiEventStatusBits event);
> -
> /**
> * AcpiDeviceIfClass:
> *
> diff --git a/hw/acpi/acpi_interface.c b/hw/acpi/acpi_interface.c
> index 8637ff18fca..e58e8aaee23 100644
> --- a/hw/acpi/acpi_interface.c
> +++ b/hw/acpi/acpi_interface.c
> @@ -4,15 +4,6 @@
> #include "qemu/module.h"
> #include "qemu/queue.h"
>
> -void acpi_send_event(DeviceState *dev, AcpiEventStatusBits event)
> -{
> - AcpiDeviceIfClass *adevc = ACPI_DEVICE_IF_GET_CLASS(dev);
> - if (adevc->send_event) {
> - AcpiDeviceIf *adev = ACPI_DEVICE_IF(dev);
> - adevc->send_event(adev, event);
> - }
> -}
> -
> void qbus_build_aml(BusState *bus, Aml *scope)
> {
> BusChild *kid;
> diff --git a/hw/acpi/core.c b/hw/acpi/core.c
> index 6b65e587f2a..a6a62a742d1 100644
> --- a/hw/acpi/core.c
> +++ b/hw/acpi/core.c
> @@ -22,6 +22,7 @@
> #include "qemu/osdep.h"
> #include "hw/core/irq.h"
> #include "hw/acpi/acpi.h"
> +#include "hw/acpi/acpi_dev_interface.h"
> #include "hw/nvram/fw_cfg.h"
> #include "qemu/config-file.h"
> #include "qapi/error.h"
> @@ -753,3 +754,12 @@ void acpi_update_sci(ACPIREGS *regs, qemu_irq irq)
> (regs->pm1.evt.en & ACPI_BITMASK_TIMER_ENABLE) &&
> !(pm1a_sts & ACPI_BITMASK_TIMER_STATUS));
> }
> +
> +void acpi_send_event(DeviceState *dev, AcpiEventStatusBits event)
> +{
> + AcpiDeviceIfClass *adevc = ACPI_DEVICE_IF_GET_CLASS(dev);
> + if (adevc->send_event) {
> + AcpiDeviceIf *adev = ACPI_DEVICE_IF(dev);
> + adevc->send_event(adev, event);
> + }
> +}
next prev parent reply other threads:[~2026-03-02 6:22 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-02-25 3:57 [PATCH v2 00/11] buildsys: Build most stubs once Philippe Mathieu-Daudé
2026-02-25 3:57 ` [PATCH v2 01/11] meson: Include various directories providing stubs before libqemuutil Philippe Mathieu-Daudé
2026-02-25 3:57 ` [PATCH v2 02/11] hw/acpi: Move acpi_send_event() function out of acpi_interface.c Philippe Mathieu-Daudé
2026-03-02 6:22 ` Igor Mammedov [this message]
2026-02-25 3:57 ` [PATCH v2 03/11] hw/acpi: Move qbus_build_aml() " Philippe Mathieu-Daudé
2026-03-02 6:23 ` Igor Mammedov
2026-02-25 3:57 ` [PATCH v2 04/11] hw/acpi: Always link QOM interfaces with system binaries Philippe Mathieu-Daudé
2026-03-02 6:24 ` Igor Mammedov
2026-02-25 3:57 ` [PATCH v2 05/11] hw/nvram: Build fw_cfg-acpi.c once Philippe Mathieu-Daudé
2026-03-02 6:25 ` Igor Mammedov
2026-02-25 3:57 ` [PATCH v2 06/11] hw/acpi: Build stubs once Philippe Mathieu-Daudé
2026-03-02 6:42 ` Igor Mammedov
2026-02-25 3:57 ` [PATCH v2 07/11] hw/display: " Philippe Mathieu-Daudé
2026-02-25 3:57 ` [PATCH v2 08/11] hw/net: " Philippe Mathieu-Daudé
2026-02-25 3:57 ` [PATCH v2 09/11] hw/*: " Philippe Mathieu-Daudé
2026-02-25 3:57 ` [PATCH v2 10/11] fsdev: " Philippe Mathieu-Daudé
2026-02-25 3:57 ` [PATCH v2 11/11] semihosting: " Philippe Mathieu-Daudé
2026-02-25 4:44 ` [PATCH v2 00/11] buildsys: Build most " Richard Henderson
2026-02-26 16:43 ` Philippe Mathieu-Daudé
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=20260302072230.668f5906@imammedo \
--to=imammedo@redhat.com \
--cc=anisinha@redhat.com \
--cc=mst@redhat.com \
--cc=pbonzini@redhat.com \
--cc=philmd@linaro.org \
--cc=pierrick.bouvier@linaro.org \
--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.