Clean up dependencies of ACPI controllers
cover Clean up dependencies of ACPI controllers
This small series establishes consistency between ICH9, PIIX4 and VT82C686 ACPI controllers to 1/ depend on ACPI and 2/ to select ACPI_SMBUS and APM since the latter are provided by the device models.
Due to the PIIX4 cleanup PEGASOS2's dependency can be reduced to just ACPI, eliminating 9 compilation units from the softmmu-ppc build.
Bernhard Beschow (5):
hw/acpi/Kconfig: Add missing dependencies to ACPI_PIIX4 hw/acpi/Kconfig: Rename ACPI_X86_ICH to ACPI_ICH9 hw/acpi/Kconfig: Add missing dependencies to ACPI_ICH9 hw/isa/Kconfig: Add missing dependency to VT82C686 hw/ppc/Kconfig: Remove unused dependencies from PEGASOS2
configs/devices/mips-softmmu/common.mak | 2 -- hw/acpi/Kconfig | 6 +++++- hw/acpi/meson.build | 2 +- hw/i2c/meson.build | 2 +- hw/i386/Kconfig | 3 --- hw/isa/Kconfig | 4 ++-- hw/ppc/Kconfig | 2 +- 7 files changed, 10 insertions(+), 11 deletions(-)
Signature · 1 line
2.38.1
PATCH 1/5 hw/acpi/Kconfig: Add missing dependencies to ACPI_PIIX4
piix4_pm_realize() uses apm_init() and pm_smbus_init(), so both APM and ACPI_SMBUS are provided by the device model managed by ACPI_PIIX4.
--- configs/devices/mips-softmmu/common.mak | 2 -- hw/acpi/Kconfig | 2 ++ hw/i386/Kconfig | 2 -- 3 files changed, 2 insertions(+), 4 deletions(-)
configs/devices/mips-softmmu/common.mak +0 -2
@@ -19,7 +19,6 @@ CONFIG_PCKBD=y CONFIG_FDC=y CONFIG_ACPI=y CONFIG_ACPI_PIIX4=y -CONFIG_APM=y CONFIG_I8257=y CONFIG_PIIX4=y CONFIG_IDE_ISA=y
@@ -32,6 +31,5 @@ CONFIG_MIPS_ITU=y CONFIG_MALTA=y CONFIG_PCNET_PCI=y CONFIG_MIPSSIM=y -CONFIG_ACPI_SMBUS=y CONFIG_SMBUS_EEPROM=y CONFIG_TEST_DEVICES=y
hw/acpi/Kconfig +2 -0
@@ -30,6 +30,8 @@ config ACPI_NVDIMM config ACPI_PIIX4 bool + select ACPI_SMBUS + select APM depends on ACPI config ACPI_PCIHP
hw/i386/Kconfig +0 -2
@@ -62,7 +62,6 @@ config PC_ACPI select ACPI_VIOT select SMBUS_EEPROM select PFLASH_CFI01 - depends on ACPI_SMBUS config I440FX bool
@@ -71,7 +70,6 @@ config I440FX imply VMMOUSE select PC_PCI select PC_ACPI - select ACPI_SMBUS select PCI_I440FX select PIIX3 select IDE_PIIX
Signature · 1 line
2.38.1
PATCH 2/5 hw/acpi/Kconfig: Rename ACPI_X86_ICH to ACPI_ICH9
In reply to Bernhard BeschowAlthough the ICH9 ACPI controller may currently be tied to x86 it doesn't have to. Furthermore, the source files this configuration switch manages contain a '9', so this name fits more.
--- hw/acpi/Kconfig | 2 +- hw/acpi/meson.build | 2 +- hw/i2c/meson.build | 2 +- hw/isa/Kconfig | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-)
hw/acpi/Kconfig +1 -1
@@ -13,7 +13,7 @@ config ACPI_X86 select ACPI_PCIHP select ACPI_ERST -config ACPI_X86_ICH +config ACPI_ICH9 bool select ACPI_X86
hw/acpi/meson.build +1 -1
@@ -22,7 +22,7 @@ acpi_ss.add(when: 'CONFIG_ACPI_PIIX4', if_true: files('piix4.c')) acpi_ss.add(when: 'CONFIG_ACPI_PCIHP', if_true: files('pcihp.c')) acpi_ss.add(when: 'CONFIG_ACPI_PCIHP', if_false: files('acpi-pci-hotplug-stub.c')) acpi_ss.add(when: 'CONFIG_ACPI_VIOT', if_true: files('viot.c')) -acpi_ss.add(when: 'CONFIG_ACPI_X86_ICH', if_true: files('ich9.c', 'tco.c')) +acpi_ss.add(when: 'CONFIG_ACPI_ICH9', if_true: files('ich9.c', 'tco.c')) acpi_ss.add(when: 'CONFIG_ACPI_ERST', if_true: files('erst.c')) acpi_ss.add(when: 'CONFIG_IPMI', if_true: files('ipmi.c'), if_false: files('ipmi-stub.c')) acpi_ss.add(when: 'CONFIG_PC', if_false: files('acpi-x86-stub.c'))
hw/i2c/meson.build +1 -1
@@ -2,7 +2,7 @@ i2c_ss = ss.source_set() i2c_ss.add(when: 'CONFIG_I2C', if_true: files('core.c')) i2c_ss.add(when: 'CONFIG_SMBUS', if_true: files('smbus_slave.c', 'smbus_master.c')) i2c_ss.add(when: 'CONFIG_ACPI_SMBUS', if_true: files('pm_smbus.c')) -i2c_ss.add(when: 'CONFIG_ACPI_X86_ICH', if_true: files('smbus_ich9.c')) +i2c_ss.add(when: 'CONFIG_ACPI_ICH9', if_true: files('smbus_ich9.c')) i2c_ss.add(when: 'CONFIG_ASPEED_SOC', if_true: files('aspeed_i2c.c')) i2c_ss.add(when: 'CONFIG_BITBANG_I2C', if_true: files('bitbang_i2c.c')) i2c_ss.add(when: 'CONFIG_EXYNOS4', if_true: files('exynos4210_i2c.c'))
hw/isa/Kconfig +1 -1
@@ -78,4 +78,4 @@ config LPC_ICH9 select I8257 select ISA_BUS select ACPI_SMBUS - select ACPI_X86_ICH + select ACPI_ICH9
Signature · 1 line
2.38.1
Re: [PATCH 2/5] hw/acpi/Kconfig: Rename ACPI_X86_ICH to ACPI_ICH9
Quoted 11 lines · Bernhard Beschow
Although the ICH9 ACPI controller may currently be tied to x86 it doesn't have to. Furthermore, the source files this configuration switch manages contain a '9', so this name fits more.
Signed-off-by Bernhard Beschow <[email protected]>--- hw/acpi/Kconfig | 2 +- hw/acpi/meson.build | 2 +- hw/i2c/meson.build | 2 +- hw/isa/Kconfig | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-)
PATCH 3/5 hw/acpi/Kconfig: Add missing dependencies to ACPI_ICH9
In reply to Bernhard Beschowich9_lpc_realize() uses apm_init() and ich9_smbus_realize() uses pm_smbus_init(), so both APM and ACPI_SMBUS are provided by the device models managed by ACPI_ICH9.
--- hw/acpi/Kconfig | 2 ++ hw/i386/Kconfig | 1 - hw/isa/Kconfig | 1 - 3 files changed, 2 insertions(+), 2 deletions(-)
hw/acpi/Kconfig +2 -0
@@ -15,7 +15,9 @@ config ACPI_X86 config ACPI_ICH9 bool + select ACPI_SMBUS select ACPI_X86 + select APM config ACPI_CPU_HOTPLUG bool
hw/i386/Kconfig +0 -1
@@ -51,7 +51,6 @@ config PC_PCI bool select APIC select IOAPIC - select APM select PC config PC_ACPI
hw/isa/Kconfig +0 -1
@@ -77,5 +77,4 @@ config LPC_ICH9 # for ICH9. select I8257 select ISA_BUS - select ACPI_SMBUS select ACPI_ICH9
Signature · 1 line
2.38.1
Re: [PATCH 3/5] hw/acpi/Kconfig: Add missing dependencies to ACPI_ICH9
Quoted 10 lines · Bernhard Beschow
ich9_lpc_realize()usesapm_init()andich9_smbus_realize()usespm_smbus_init(), so both APM andACPI_SMBUSare provided by the device models managed byACPI_ICH9.Signed-off-by Bernhard Beschow <[email protected]>--- hw/acpi/Kconfig | 2 ++ hw/i386/Kconfig | 1 - hw/isa/Kconfig | 1 - 3 files changed, 2 insertions(+), 2 deletions(-)
PATCH 4/5 hw/isa/Kconfig: Add missing dependency to VT82C686
In reply to Bernhard BeschowBoth ACPI_PIIX4 (directly) and ACPI_ICH9 (indirectly) require ACPI to be selected. Require it for VT82C686's ACPI controller too for consistency.
--- hw/isa/Kconfig | 1 + 1 file changed, 1 insertion(+)
hw/isa/Kconfig +1 -0
@@ -63,6 +63,7 @@ config VT82C686 select IDE_VIA select MC146818RTC select PARALLEL + depends on ACPI config SMC37C669 bool
Signature · 1 line
2.38.1
Re: [PATCH 4/5] hw/isa/Kconfig: Add missing dependency to VT82C686
Quoted 13 lines · Bernhard Beschow
Both
ACPI_PIIX4(directly) andACPI_ICH9(indirectly) require ACPI to be selected. Require it for VT82C686's ACPI controller too for consistency.Signed-off-by Bernhard Beschow <[email protected]>--- hw/isa/Kconfig | 1 + 1 file changed, 1 insertion(+)hw/isa/Kconfig +0
-0
hw/isa/Kconfig config VT82C686 · line 66
Quoted 4 lines
hw/isa/Kconfig +1
-0@@ -63,6 +63,7 @@ config VT82C686 select IDE_VIA select MC146818RTC select PARALLEL + depends on ACPI
The VT82C686 *provides* the ACPI interface, so here we want to "select" ACPI (if we need a VT82C686, then ACPI will be available).
Re: [PATCH 4/5] hw/isa/Kconfig: Add missing dependency to VT82C686
Am 12. Dezember 2022 10:37:12 UTC schrieb "Philippe Mathieu-Daudé" <[email protected]>:
Quoted 9 lines · Bernhard Beschow
Quoted 8 lines
Both
ACPI_PIIX4(directly) andACPI_ICH9(indirectly) require ACPI to be selected. Require it for VT82C686's ACPI controller too for consistency.Signed-off-by Bernhard Beschow <[email protected]>--- hw/isa/Kconfig | 1 + 1 file changed, 1 insertion(+)
Quoted 12 lines
hw/isa/Kconfig config VT82C686 · line 66
Quoted 9 lines
hw/isa/Kconfig +1
-0@@ -63,6 +63,7 @@ config VT82C686 select IDE_VIA select MC146818RTC select PARALLEL + depends on ACPIThe VT82C686 *provides* the ACPI interface, so here we want to "select" ACPI (if we need a VT82C686, then ACPI will be available).
I agree. I'd then also adapt PIIX4 and LPC.
Best regards,
Bernhard
PATCH 5/5 hw/ppc/Kconfig: Remove unused dependencies from PEGASOS2
In reply to Bernhard BeschowRemoves the following dependencies from ppc-softmmu:
- CONFIG_ACPI_CPU_HOTPLUG
- CONFIG_ACPI_CXL
- CONFIG_ACPI_HMAT
- CONFIG_ACPI_MEMORY_HOTPLUG
- CONFIG_ACPI_NVDIMM
- CONFIG_ACPI_PCIHP
- CONFIG_ACPI_PIIX4
- CONFIG_ACPI_X86
- CONFIG_MEM_DEVICE
--- hw/ppc/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
hw/ppc/Kconfig +1 -1
@@ -77,7 +77,7 @@ config PEGASOS2 select SMBUS_EEPROM select VOF # This should come with VT82C686 - select ACPI_X86 + select ACPI config PREP bool
Signature · 1 line
2.38.1
Re: [PATCH 5/5] hw/ppc/Kconfig: Remove unused dependencies from PEGASOS2
Quoted 21 lines · Bernhard Beschow
Removes the following dependencies from ppc-softmmu:
-CONFIG_ACPI_CPU_HOTPLUG
-CONFIG_ACPI_CXL
-CONFIG_ACPI_HMAT
-CONFIG_ACPI_MEMORY_HOTPLUG
-CONFIG_ACPI_NVDIMM
-CONFIG_ACPI_PCIHP
-CONFIG_ACPI_PIIX4
-CONFIG_ACPI_X86
-CONFIG_MEM_DEVICESigned-off-by Bernhard Beschow <[email protected]>--- hw/ppc/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)hw/ppc/Kconfig +0
-0
hw/ppc/Kconfig config PEGASOS2 · line 80
Quoted 5 lines
hw/ppc/Kconfig +1
-1@@ -77,7 +77,7 @@ config PEGASOS2 select SMBUS_EEPROM select VOF # This should come with VT82C686 - select ACPI_X86 + select ACPI
With the previous patch (fixed) you can remove both the comment and the "select" line.