Skip to contentSkip to conversation

hw/acpi: Improve build modularity (targeting MIPS/PPC)

PATCH Superseded Philippe Mathieu-Daudé 3 participants 7 messages Apr 27, 2019 – Apr 29, 2019

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

cover hw/acpi: Improve build modularity (targeting MIPS/PPC)

Hi,

This series is not related to the previous one I just send:
hw/i386/acpi: Improve build modularity (isapc/q35/...)
https://lists.gnu.org/archive/html/qemu-devel/2019-04/msg04678.html

While the first only concern X86 (changes within the architecture), this one allow the core ACPI feature to be used by the MIPS and PPC archs (specific series will follow).

Regards,

Phil.

Philippe Mathieu-Daudé (2):
hw/acpi: Simplify the Makefile logic
hw/acpi: Always build the acpi/core.o file

 hw/acpi/Makefile.objs | 13 ++++---------
 1 file changed, 4 insertions(+), 9 deletions(-)
Signature · 1 line
2.20.1
#1 lore raw

PATCH 1/2 hw/acpi: Simplify the Makefile logic

Since we only require to link with acpi-stub.o when CONFIG_ACPI is disabled, we can simplify the Makefile logic.

---
 hw/acpi/Makefile.objs | 10 ++--------
 1 file changed, 2 insertions(+), 8 deletions(-)
hw/acpi/Makefile.objs +2 -8
index 2d46e3789ae..c86edfbed90 100644
@@ -1,4 +1,3 @@
-ifeq ($(CONFIG_ACPI),y)
 common-obj-$(CONFIG_ACPI_X86) += core.o piix4.o pcihp.o
 common-obj-$(CONFIG_ACPI_X86_ICH) += ich9.o tco.o
 common-obj-$(CONFIG_ACPI_CPU_HOTPLUG) += cpu_hotplug.o
@@ -6,16 +5,11 @@ common-obj-$(CONFIG_ACPI_MEMORY_HOTPLUG) += memory_hotplug.o
 common-obj-$(CONFIG_ACPI_CPU_HOTPLUG) += cpu.o
 common-obj-$(CONFIG_ACPI_NVDIMM) += nvdimm.o
 common-obj-$(CONFIG_ACPI_VMGENID) += vmgenid.o
-common-obj-$(call lnot,$(CONFIG_ACPI_X86)) += acpi-stub.o
-
 common-obj-y += acpi_interface.o
 common-obj-y += bios-linker-loader.o
 common-obj-y += aml-build.o
 common-obj-$(CONFIG_TPM) += tpm.o
-
 common-obj-$(CONFIG_IPMI) += ipmi.o
+
 common-obj-$(call lnot,$(CONFIG_IPMI)) += ipmi-stub.o
-else
-common-obj-y += acpi-stub.o
-endif
-common-obj-$(CONFIG_ALL) += acpi-stub.o ipmi-stub.o
+common-obj-$(call lnot,$(CONFIG_ACPI)) += acpi-stub.o
Signature · 1 line
2.20.1
#2 lore raw

Re: [Qemu-devel] [PATCH 1/2] hw/acpi: Simplify the Makefile logic

Quoted 19 lines · Philippe Mathieu-Daudé

Since we only require to link with acpi-stub.o when CONFIG_ACPI is disabled, we can simplify the Makefile logic.

---
 hw/acpi/Makefile.objs | 10 ++--------
 1 file changed, 2 insertions(+), 8 deletions(-)
hw/acpi/Makefile.objs +0 -1
index 2d46e3789ae..c86edfbed90 100644
@@ -1,4 +1,3 @@
-ifeq ($(CONFIG_ACPI),y)
 common-obj-$(CONFIG_ACPI_X86) += core.o piix4.o pcihp.o
 common-obj-$(CONFIG_ACPI_X86_ICH) += ich9.o tco.o
 common-obj-$(CONFIG_ACPI_CPU_HOTPLUG) += cpu_hotplug.o

hw/acpi/Makefile.objs common-obj-$(CONFIG_ACPI_MEMORY_HOTPLUG) += memory_hotplug.o · line 10

Quoted 8 lines
hw/acpi/Makefile.objs +0 -2
@@ -6,16 +5,11 @@ common-obj-$(CONFIG_ACPI_MEMORY_HOTPLUG) += memory_hotplug.o
 common-obj-$(CONFIG_ACPI_CPU_HOTPLUG) += cpu.o
 common-obj-$(CONFIG_ACPI_NVDIMM) += nvdimm.o
 common-obj-$(CONFIG_ACPI_VMGENID) += vmgenid.o
-common-obj-$(call lnot,$(CONFIG_ACPI_X86)) += acpi-stub.o
-
 common-obj-y += acpi_interface.o
 common-obj-y += bios-linker-loader.o
 common-obj-y += aml-build.o

What about these three object files? We don't want to build them if CONFIG_ACPI is disabled, do we?

Thomas

Quoted 11 lines
hw/acpi/Makefile.objs +2 -5
 common-obj-$(CONFIG_TPM) += tpm.o
-
 common-obj-$(CONFIG_IPMI) += ipmi.o
+
 common-obj-$(call lnot,$(CONFIG_IPMI)) += ipmi-stub.o
-else
-common-obj-y += acpi-stub.o
-endif
-common-obj-$(CONFIG_ALL) += acpi-stub.o ipmi-stub.o
+common-obj-$(call lnot,$(CONFIG_ACPI)) += acpi-stub.o
#3 lore raw

Re: [Qemu-devel] [PATCH 1/2] hw/acpi: Simplify the Makefile logic

Quoted 23 lines · Thomas Huth
Quoted 22 lines · Philippe Mathieu-Daudé

Since we only require to link with acpi-stub.o when CONFIG_ACPI is disabled, we can simplify the Makefile logic.

---
 hw/acpi/Makefile.objs | 10 ++--------
 1 file changed, 2 insertions(+), 8 deletions(-)
hw/acpi/Makefile.objs +0 -1
index 2d46e3789ae..c86edfbed90 100644
@@ -1,4 +1,3 @@
-ifeq ($(CONFIG_ACPI),y)
 common-obj-$(CONFIG_ACPI_X86) += core.o piix4.o pcihp.o
 common-obj-$(CONFIG_ACPI_X86_ICH) += ich9.o tco.o
 common-obj-$(CONFIG_ACPI_CPU_HOTPLUG) += cpu_hotplug.o
@@ -6,16 +5,11 @@ common-obj-$(CONFIG_ACPI_MEMORY_HOTPLUG) += memory_hotplug.o
 common-obj-$(CONFIG_ACPI_CPU_HOTPLUG) += cpu.o
 common-obj-$(CONFIG_ACPI_NVDIMM) += nvdimm.o
 common-obj-$(CONFIG_ACPI_VMGENID) += vmgenid.o
Quoted 8 lines

hw/acpi/Makefile.objs common-obj-$(CONFIG_ACPI_MEMORY_HOTPLUG) += memory_hotplug.o · line 10

Quoted 5 lines
hw/acpi/Makefile.objs +0 -2
-common-obj-$(call lnot,$(CONFIG_ACPI_X86)) += acpi-stub.o
-
 common-obj-y += acpi_interface.o
 common-obj-y += bios-linker-loader.o
 common-obj-y += aml-build.o

What about these three object files? We don't want to build them if CONFIG_ACPI is disabled, do we?

Indeed. This was fixed in the v2:
https://lists.gnu.org/archive/html/qemu-devel/2019-04/msg04721.html

Quoted 16 lines

Thomas

Quoted 11 lines
hw/acpi/Makefile.objs +2 -5
 common-obj-$(CONFIG_TPM) += tpm.o
-
 common-obj-$(CONFIG_IPMI) += ipmi.o
+
 common-obj-$(call lnot,$(CONFIG_IPMI)) += ipmi-stub.o
-else
-common-obj-y += acpi-stub.o
-endif
-common-obj-$(CONFIG_ALL) += acpi-stub.o ipmi-stub.o
+common-obj-$(call lnot,$(CONFIG_ACPI)) += acpi-stub.o
#4 lore raw

PATCH 2/2 hw/acpi: Always build the acpi/core.o file

In reply to Philippe Mathieu-Daudé

The 'core' ACPI functions are not X86-specific. Let this file be built unconditionally, this will allow us to use ACPI on non-X86 architectures.

---
 hw/acpi/Makefile.objs | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
hw/acpi/Makefile.objs +2 -1
index c86edfbed90..09c810ac556 100644
@@ -1,4 +1,5 @@
-common-obj-$(CONFIG_ACPI_X86) += core.o piix4.o pcihp.o
+common-obj-$(CONFIG_ACPI) += core.o
+common-obj-$(CONFIG_ACPI_X86) += piix4.o pcihp.o
 common-obj-$(CONFIG_ACPI_X86_ICH) += ich9.o tco.o
 common-obj-$(CONFIG_ACPI_CPU_HOTPLUG) += cpu_hotplug.o
 common-obj-$(CONFIG_ACPI_MEMORY_HOTPLUG) += memory_hotplug.o
Signature · 1 line
2.20.1
#5 lore raw

Re: [Qemu-devel] [PATCH 2/2] hw/acpi: Always build the acpi/core.o file

Quoted 15 lines · Philippe Mathieu-Daudé

The 'core' ACPI functions are not X86-specific. Let this file be built unconditionally, this will allow us to use ACPI on non-X86 architectures.

---
 hw/acpi/Makefile.objs | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
hw/acpi/Makefile.objs +0 -0
index c86edfbed90..09c810ac556 100644

hw/acpi/Makefile.objs line 1

Quoted 2 lines
hw/acpi/Makefile.objs +1 -1
@@ -1,4 +1,5 @@
-common-obj-$(CONFIG_ACPI_X86) += core.o piix4.o pcihp.o
+common-obj-$(CONFIG_ACPI) += core.o

Sorry, sent from wrong branch :S

Please consider reviewing with this snippet applied on top:

-- >8 --

hw/acpi/Makefile.objs +1 -2
@@ -1,4 +1,4 @@
-common-obj-$(CONFIG_ACPI) += core.o
+common-obj-y += core.o
---
 

I'll respin after getting some review comments.

Quoted 5 lines
hw/acpi/Makefile.objs +1 -0
+common-obj-$(CONFIG_ACPI_X86) += piix4.o pcihp.o
 common-obj-$(CONFIG_ACPI_X86_ICH) += ich9.o tco.o
 common-obj-$(CONFIG_ACPI_CPU_HOTPLUG) += cpu_hotplug.o
 common-obj-$(CONFIG_ACPI_MEMORY_HOTPLUG) += memory_hotplug.o
#6 lore raw
In reply to Philippe Mathieu-Daudé
Patchew URL: https://patchew.org/QEMU/[email protected]/

Patchew URL: https://patchew.org/QEMU/[email protected]/

Hi,

This series failed the docker-mingw@fedora build test. Please find the testing commands and their output below. If you have Docker installed, you can probably reproduce it locally.

=== TEST SCRIPT BEGIN ===
#!/bin/bash
time make docker-test-mingw@fedora SHOW_ENV=1 J=14 NETWORK=1 === TEST SCRIPT END ===

The full log is available at
http://patchew.org/logs/[email protected]/testing.docker-mingw@fedora/?type=message.
---
Email generated automatically by Patchew [https://patchew.org/].
Please send your feedback to [email protected]