diff mbox series

[1/7] hw/acpi: Add missing includes

Message ID 20230114222738.282478-2-shentey@gmail.com (mailing list archive)
State New, archived
Headers show
Series AML Housekeeping | expand

Commit Message

Bernhard Beschow Jan. 14, 2023, 10:27 p.m. UTC
When removing the "hw/boards.h" include from
hw/acpi/acpi_dev_interface.h, these include directives must be added to make
the code compile again.

Signed-off-by: Bernhard Beschow <shentey@gmail.com>
---
 hw/acpi/hmat.h           | 3 ++-
 hw/acpi/cpu.c            | 2 ++
 hw/acpi/hmat.c           | 1 +
 hw/acpi/memory_hotplug.c | 1 +
 monitor/qmp-cmds.c       | 1 +
 5 files changed, 7 insertions(+), 1 deletion(-)

Comments

Markus Armbruster Jan. 16, 2023, 6:46 a.m. UTC | #1
Bernhard Beschow <shentey@gmail.com> writes:

> When removing the "hw/boards.h" include from
> hw/acpi/acpi_dev_interface.h, these include directives must be added to make
> the code compile again.
>
> Signed-off-by: Bernhard Beschow <shentey@gmail.com>

You don't actually remove #include "hw/boards.h" from
hw/acpi/acpi_dev_interface.h in this series.  Accident?
Bernhard Beschow Jan. 16, 2023, 8:56 a.m. UTC | #2
Am 16. Januar 2023 06:46:36 UTC schrieb Markus Armbruster <armbru@redhat.com>:
>Bernhard Beschow <shentey@gmail.com> writes:
>
>> When removing the "hw/boards.h" include from
>> hw/acpi/acpi_dev_interface.h, these include directives must be added to make
>> the code compile again.
>>
>> Signed-off-by: Bernhard Beschow <shentey@gmail.com>
>
>You don't actually remove #include "hw/boards.h" from
>hw/acpi/acpi_dev_interface.h in this series.  Accident?

It gets removed in "[PATCH 3/7] hw/acpi/acpi_dev_interface: Resolve AcpiDeviceIfClass::madt_cpu", no?
Markus Armbruster Jan. 16, 2023, 1:02 p.m. UTC | #3
Bernhard Beschow <shentey@gmail.com> writes:

> Am 16. Januar 2023 06:46:36 UTC schrieb Markus Armbruster <armbru@redhat.com>:
>>Bernhard Beschow <shentey@gmail.com> writes:
>>
>>> When removing the "hw/boards.h" include from
>>> hw/acpi/acpi_dev_interface.h, these include directives must be added to make
>>> the code compile again.
>>>
>>> Signed-off-by: Bernhard Beschow <shentey@gmail.com>
>>
>>You don't actually remove #include "hw/boards.h" from
>>hw/acpi/acpi_dev_interface.h in this series.  Accident?
>
> It gets removed in "[PATCH 3/7] hw/acpi/acpi_dev_interface: Resolve AcpiDeviceIfClass::madt_cpu", no?

Got eaten on the way to me, and I didn't notice, because git-am is still
happy.  Sorry for the noise!

The commit message could point to PATCH 3.  However, I'd reshuffle a bit
instead.  Split PATCH 3 into everything but the removal of #include
"hw/boards.h", and the removal.  Squash PATCH 1 into the latter,
resulting in a straighforward cleanup patch.
Bernhard Beschow Jan. 16, 2023, 1:30 p.m. UTC | #4
Am 16. Januar 2023 13:02:23 UTC schrieb Markus Armbruster <armbru@redhat.com>:
>Bernhard Beschow <shentey@gmail.com> writes:
>
>> Am 16. Januar 2023 06:46:36 UTC schrieb Markus Armbruster <armbru@redhat.com>:
>>>Bernhard Beschow <shentey@gmail.com> writes:
>>>
>>>> When removing the "hw/boards.h" include from
>>>> hw/acpi/acpi_dev_interface.h, these include directives must be added to make
>>>> the code compile again.
>>>>
>>>> Signed-off-by: Bernhard Beschow <shentey@gmail.com>
>>>
>>>You don't actually remove #include "hw/boards.h" from
>>>hw/acpi/acpi_dev_interface.h in this series.  Accident?
>>
>> It gets removed in "[PATCH 3/7] hw/acpi/acpi_dev_interface: Resolve AcpiDeviceIfClass::madt_cpu", no?
>
>Got eaten on the way to me, and I didn't notice, because git-am is still
>happy.  Sorry for the noise!
>
>The commit message could point to PATCH 3.  However, I'd reshuffle a bit
>instead.  Split PATCH 3 into everything but the removal of #include
>"hw/boards.h", and the removal.  Squash PATCH 1 into the latter,
>resulting in a straighforward cleanup patch.

Race condition: https://lore.kernel.org/qemu-devel/20230116125842.66817-1-shentey@gmail.com/

Yeah, doing the include cleanup after the aml changes makes the series more straighforward indeed. I'll send a v3.

Thanks,
Bernhard
diff mbox series

Patch

diff --git a/hw/acpi/hmat.h b/hw/acpi/hmat.h
index b57f0e7e80..fd989cb661 100644
--- a/hw/acpi/hmat.h
+++ b/hw/acpi/hmat.h
@@ -27,7 +27,8 @@ 
 #ifndef HMAT_H
 #define HMAT_H
 
-#include "hw/acpi/aml-build.h"
+#include "hw/acpi/bios-linker-loader.h"
+#include "sysemu/numa.h"
 
 /*
  * ACPI 6.3: 5.2.27.3 Memory Proximity Domain Attributes Structure,
diff --git a/hw/acpi/cpu.c b/hw/acpi/cpu.c
index 4e580959a2..9148b3a49e 100644
--- a/hw/acpi/cpu.c
+++ b/hw/acpi/cpu.c
@@ -1,6 +1,8 @@ 
 #include "qemu/osdep.h"
 #include "migration/vmstate.h"
 #include "hw/acpi/cpu.h"
+#include "hw/core/cpu.h"
+#include "hw/boards.h"
 #include "qapi/error.h"
 #include "qapi/qapi-events-acpi.h"
 #include "trace.h"
diff --git a/hw/acpi/hmat.c b/hw/acpi/hmat.c
index 3a6d51282a..f5abec5715 100644
--- a/hw/acpi/hmat.c
+++ b/hw/acpi/hmat.c
@@ -28,6 +28,7 @@ 
 #include "qemu/units.h"
 #include "sysemu/numa.h"
 #include "hw/acpi/hmat.h"
+#include "hw/acpi/aml-build.h"
 
 /*
  * ACPI 6.3:
diff --git a/hw/acpi/memory_hotplug.c b/hw/acpi/memory_hotplug.c
index d926f4f77d..0b883df813 100644
--- a/hw/acpi/memory_hotplug.c
+++ b/hw/acpi/memory_hotplug.c
@@ -1,6 +1,7 @@ 
 #include "qemu/osdep.h"
 #include "hw/acpi/memory_hotplug.h"
 #include "hw/mem/pc-dimm.h"
+#include "hw/boards.h"
 #include "hw/qdev-core.h"
 #include "migration/vmstate.h"
 #include "trace.h"
diff --git a/monitor/qmp-cmds.c b/monitor/qmp-cmds.c
index 2932b3f3a5..45b0f2905d 100644
--- a/monitor/qmp-cmds.c
+++ b/monitor/qmp-cmds.c
@@ -44,6 +44,7 @@ 
 #include "hw/acpi/acpi_dev_interface.h"
 #include "hw/intc/intc.h"
 #include "hw/rdma/rdma.h"
+#include "hw/boards.h"
 #include "monitor/stats.h"
 
 NameInfo *qmp_query_name(Error **errp)