* [PATCH v2 0/2] hw/acpi: Include missing headers
@ 2024-02-26 9:05 Philippe Mathieu-Daudé
2024-02-26 9:05 ` [PATCH v2 1/2] hw/acpi/ich9: " Philippe Mathieu-Daudé
2024-02-26 9:06 ` [PATCH v2 2/2] hw/i386/q35: Include missing 'hw/acpi/acpi.h' header Philippe Mathieu-Daudé
0 siblings, 2 replies; 5+ messages in thread
From: Philippe Mathieu-Daudé @ 2024-02-26 9:05 UTC (permalink / raw)
To: qemu-devel, Zhao Liu
Cc: Richard Henderson, Marcel Apfelbaum, Igor Mammedov, Paolo Bonzini,
Ani Sinha, Eduardo Habkost, Michael S. Tsirkin,
Philippe Mathieu-Daudé
Since v1:
- Addressed Zhao's review comments (typos and sort headers)
Patches extracted from an ICH9 model rework. Explicitly include
required headers instead of having them being randomply pulled.
Philippe Mathieu-Daudé (2):
hw/acpi/ich9: Include missing headers
hw/i386/q35: Include missing 'hw/acpi/acpi.h' header
include/hw/acpi/ich9.h | 3 ++-
hw/acpi/ich9.c | 2 +-
hw/i386/pc_q35.c | 1 +
3 files changed, 4 insertions(+), 2 deletions(-)
--
2.41.0
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH v2 1/2] hw/acpi/ich9: Include missing headers
2024-02-26 9:05 [PATCH v2 0/2] hw/acpi: Include missing headers Philippe Mathieu-Daudé
@ 2024-02-26 9:05 ` Philippe Mathieu-Daudé
2024-02-26 9:29 ` Zhao Liu
2024-02-26 9:06 ` [PATCH v2 2/2] hw/i386/q35: Include missing 'hw/acpi/acpi.h' header Philippe Mathieu-Daudé
1 sibling, 1 reply; 5+ messages in thread
From: Philippe Mathieu-Daudé @ 2024-02-26 9:05 UTC (permalink / raw)
To: qemu-devel, Zhao Liu
Cc: Richard Henderson, Marcel Apfelbaum, Igor Mammedov, Paolo Bonzini,
Ani Sinha, Eduardo Habkost, Michael S. Tsirkin,
Philippe Mathieu-Daudé
The ICH9LPCPMRegs structure has MemoryRegion and
Notifier fields, so requires the "qemu/notify.h"
and "exec/memory.h" headers.
However nothing from "hw/acpi/acpi_dev_interface.h"
is required, so reduce its inclusion to hw/acpi/ich9.c
source file where it is used.
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
---
include/hw/acpi/ich9.h | 3 ++-
hw/acpi/ich9.c | 2 +-
2 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/include/hw/acpi/ich9.h b/include/hw/acpi/ich9.h
index 2faf7f0cae..215de3c91f 100644
--- a/include/hw/acpi/ich9.h
+++ b/include/hw/acpi/ich9.h
@@ -21,12 +21,13 @@
#ifndef HW_ACPI_ICH9_H
#define HW_ACPI_ICH9_H
+#include "qemu/notify.h"
+#include "exec/memory.h"
#include "hw/acpi/acpi.h"
#include "hw/acpi/cpu_hotplug.h"
#include "hw/acpi/cpu.h"
#include "hw/acpi/pcihp.h"
#include "hw/acpi/memory_hotplug.h"
-#include "hw/acpi/acpi_dev_interface.h"
#include "hw/acpi/ich9_tco.h"
#define ACPI_PCIHP_ADDR_ICH9 0x0cc0
diff --git a/hw/acpi/ich9.c b/hw/acpi/ich9.c
index 573d032e8e..6205de6046 100644
--- a/hw/acpi/ich9.c
+++ b/hw/acpi/ich9.c
@@ -34,8 +34,8 @@
#include "sysemu/reset.h"
#include "sysemu/runstate.h"
#include "hw/acpi/acpi.h"
+#include "hw/acpi/acpi_dev_interface.h"
#include "hw/acpi/ich9_tco.h"
-
#include "hw/southbridge/ich9.h"
#include "hw/mem/pc-dimm.h"
#include "hw/mem/nvdimm.h"
--
2.41.0
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH v2 2/2] hw/i386/q35: Include missing 'hw/acpi/acpi.h' header
2024-02-26 9:05 [PATCH v2 0/2] hw/acpi: Include missing headers Philippe Mathieu-Daudé
2024-02-26 9:05 ` [PATCH v2 1/2] hw/acpi/ich9: " Philippe Mathieu-Daudé
@ 2024-02-26 9:06 ` Philippe Mathieu-Daudé
2024-02-26 9:30 ` Zhao Liu
1 sibling, 1 reply; 5+ messages in thread
From: Philippe Mathieu-Daudé @ 2024-02-26 9:06 UTC (permalink / raw)
To: qemu-devel, Zhao Liu
Cc: Richard Henderson, Marcel Apfelbaum, Igor Mammedov, Paolo Bonzini,
Ani Sinha, Eduardo Habkost, Michael S. Tsirkin,
Philippe Mathieu-Daudé
"hw/acpi/acpi.h" is implicitly included. Include it
explicitly to avoid the following error when refactoring
headers:
hw/i386/pc_q35.c:209:43: error: use of undeclared identifier 'ACPI_PM_PROP_ACPI_PCIHP_BRIDGE'
ACPI_PM_PROP_ACPI_PCIHP_BRIDGE,
^
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
---
hw/i386/pc_q35.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/hw/i386/pc_q35.c b/hw/i386/pc_q35.c
index e0b3f55a02..45a4102e75 100644
--- a/hw/i386/pc_q35.c
+++ b/hw/i386/pc_q35.c
@@ -30,6 +30,7 @@
#include "qemu/osdep.h"
#include "qemu/units.h"
+#include "hw/acpi/acpi.h"
#include "hw/char/parallel-isa.h"
#include "hw/loader.h"
#include "hw/i2c/smbus_eeprom.h"
--
2.41.0
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH v2 1/2] hw/acpi/ich9: Include missing headers
2024-02-26 9:05 ` [PATCH v2 1/2] hw/acpi/ich9: " Philippe Mathieu-Daudé
@ 2024-02-26 9:29 ` Zhao Liu
0 siblings, 0 replies; 5+ messages in thread
From: Zhao Liu @ 2024-02-26 9:29 UTC (permalink / raw)
To: Philippe Mathieu-Daudé
Cc: qemu-devel, Richard Henderson, Marcel Apfelbaum, Igor Mammedov,
Paolo Bonzini, Ani Sinha, Eduardo Habkost, Michael S. Tsirkin
On Mon, Feb 26, 2024 at 10:05:59AM +0100, Philippe Mathieu-Daudé wrote:
> Date: Mon, 26 Feb 2024 10:05:59 +0100
> From: Philippe Mathieu-Daudé <philmd@linaro.org>
> Subject: [PATCH v2 1/2] hw/acpi/ich9: Include missing headers
> X-Mailer: git-send-email 2.41.0
>
> The ICH9LPCPMRegs structure has MemoryRegion and
> Notifier fields, so requires the "qemu/notify.h"
Just nit ;-)
s/requires/it requires/
> and "exec/memory.h" headers.
>
> However nothing from "hw/acpi/acpi_dev_interface.h"
> is required, so reduce its inclusion to hw/acpi/ich9.c
> source file where it is used.
>
> Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
> ---
> include/hw/acpi/ich9.h | 3 ++-
> hw/acpi/ich9.c | 2 +-
> 2 files changed, 3 insertions(+), 2 deletions(-)
Thanks!
Reviewed-by: Zhao Liu <zhao1.liu@intel.com>
>
> diff --git a/include/hw/acpi/ich9.h b/include/hw/acpi/ich9.h
> index 2faf7f0cae..215de3c91f 100644
> --- a/include/hw/acpi/ich9.h
> +++ b/include/hw/acpi/ich9.h
> @@ -21,12 +21,13 @@
> #ifndef HW_ACPI_ICH9_H
> #define HW_ACPI_ICH9_H
>
> +#include "qemu/notify.h"
> +#include "exec/memory.h"
> #include "hw/acpi/acpi.h"
> #include "hw/acpi/cpu_hotplug.h"
> #include "hw/acpi/cpu.h"
> #include "hw/acpi/pcihp.h"
> #include "hw/acpi/memory_hotplug.h"
> -#include "hw/acpi/acpi_dev_interface.h"
> #include "hw/acpi/ich9_tco.h"
>
> #define ACPI_PCIHP_ADDR_ICH9 0x0cc0
> diff --git a/hw/acpi/ich9.c b/hw/acpi/ich9.c
> index 573d032e8e..6205de6046 100644
> --- a/hw/acpi/ich9.c
> +++ b/hw/acpi/ich9.c
> @@ -34,8 +34,8 @@
> #include "sysemu/reset.h"
> #include "sysemu/runstate.h"
> #include "hw/acpi/acpi.h"
> +#include "hw/acpi/acpi_dev_interface.h"
> #include "hw/acpi/ich9_tco.h"
> -
> #include "hw/southbridge/ich9.h"
> #include "hw/mem/pc-dimm.h"
> #include "hw/mem/nvdimm.h"
> --
> 2.41.0
>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH v2 2/2] hw/i386/q35: Include missing 'hw/acpi/acpi.h' header
2024-02-26 9:06 ` [PATCH v2 2/2] hw/i386/q35: Include missing 'hw/acpi/acpi.h' header Philippe Mathieu-Daudé
@ 2024-02-26 9:30 ` Zhao Liu
0 siblings, 0 replies; 5+ messages in thread
From: Zhao Liu @ 2024-02-26 9:30 UTC (permalink / raw)
To: Philippe Mathieu-Daudé
Cc: qemu-devel, Richard Henderson, Marcel Apfelbaum, Igor Mammedov,
Paolo Bonzini, Ani Sinha, Eduardo Habkost, Michael S. Tsirkin
On Mon, Feb 26, 2024 at 10:06:00AM +0100, Philippe Mathieu-Daudé wrote:
> Date: Mon, 26 Feb 2024 10:06:00 +0100
> From: Philippe Mathieu-Daudé <philmd@linaro.org>
> Subject: [PATCH v2 2/2] hw/i386/q35: Include missing 'hw/acpi/acpi.h' header
> X-Mailer: git-send-email 2.41.0
>
> "hw/acpi/acpi.h" is implicitly included. Include it
> explicitly to avoid the following error when refactoring
> headers:
>
> hw/i386/pc_q35.c:209:43: error: use of undeclared identifier 'ACPI_PM_PROP_ACPI_PCIHP_BRIDGE'
> ACPI_PM_PROP_ACPI_PCIHP_BRIDGE,
> ^
>
> Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
> ---
> hw/i386/pc_q35.c | 1 +
> 1 file changed, 1 insertion(+)
Thanks!
Reviewed-by: Zhao Liu <zhao1.liu@intel.com>
>
> diff --git a/hw/i386/pc_q35.c b/hw/i386/pc_q35.c
> index e0b3f55a02..45a4102e75 100644
> --- a/hw/i386/pc_q35.c
> +++ b/hw/i386/pc_q35.c
> @@ -30,6 +30,7 @@
>
> #include "qemu/osdep.h"
> #include "qemu/units.h"
> +#include "hw/acpi/acpi.h"
> #include "hw/char/parallel-isa.h"
> #include "hw/loader.h"
> #include "hw/i2c/smbus_eeprom.h"
> --
> 2.41.0
>
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2024-02-26 9:17 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-02-26 9:05 [PATCH v2 0/2] hw/acpi: Include missing headers Philippe Mathieu-Daudé
2024-02-26 9:05 ` [PATCH v2 1/2] hw/acpi/ich9: " Philippe Mathieu-Daudé
2024-02-26 9:29 ` Zhao Liu
2024-02-26 9:06 ` [PATCH v2 2/2] hw/i386/q35: Include missing 'hw/acpi/acpi.h' header Philippe Mathieu-Daudé
2024-02-26 9:30 ` Zhao Liu
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).