Skip to contentSkip to conversation

hw/pci-host/gpex-acpi: PCI_EXPRESS_GENERIC_BRIDGE: select ACPI_PCI instead of imply'ing it

PATCH In review Michael Tokarev 2 participants 2 messages Jul 28, 2025

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 hw/pci-host/gpex-acpi: PCI_EXPRESS_GENERIC_BRIDGE: select ACPI_PCI instead of imply'ing it

Commit af151d50eac24 added dependency on hw/i386/acpi-build.c (where this function is defined) to hw/pci-host/gpex-acpi. But acpi-build.c is only built when ACPI_PCI is enabled, and the build fails at link time if it is not. So ACPI_PCI becomes a hard dependency of PCI_EXPRESS_GENERIC_BRIDGE. Fix it.

Fixes af151d50eac24 "hw/pci-host/gpex-acpi: Use build_pci_host_bridge_osc_method"
---
 hw/pci-host/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
hw/pci-host/Kconfig +1 -1
index 9824fa188d..19b6605c7f 100644
@@ -54,7 +54,7 @@ config PCI_EXPRESS_Q35
 config PCI_EXPRESS_GENERIC_BRIDGE
     bool
     select PCI_EXPRESS
-    imply ACPI_PCI
+    select ACPI_PCI
 
 config PCI_EXPRESS_XILINX
     bool
Signature · 1 line
2.47.2
#1 lore raw
Quoted 18 lines · Michael Tokarev

Commit af151d50eac24 added dependency on hw/i386/acpi-build.c (where this function is defined) to hw/pci-host/gpex-acpi. But acpi-build.c is only built when ACPI_PCI is enabled, and the build fails at link time if it is not. So ACPI_PCI becomes a hard dependency of PCI_EXPRESS_GENERIC_BRIDGE. Fix it.

Fixes af151d50eac24 "hw/pci-host/gpex-acpi: Use build_pci_host_bridge_osc_method"
---
 hw/pci-host/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
hw/pci-host/Kconfig +0 -0
index 9824fa188d..19b6605c7f 100644

hw/pci-host/Kconfig config PCI_EXPRESS_Q35 · line 57

Quoted 5 lines
hw/pci-host/Kconfig +1 -1
@@ -54,7 +54,7 @@ config PCI_EXPRESS_Q35
 config PCI_EXPRESS_GENERIC_BRIDGE
     bool
     select PCI_EXPRESS
-    imply ACPI_PCI
+    select ACPI_PCI

As mentionned in the previous thread,

build_pci_host_bridge_osc_method() is called from gpex-acpi.c whose compilation depend on

pci_ss.add(when: ['CONFIG_PCI_EXPRESS_GENERIC_BRIDGE', 'CONFIG_ACPI'],
if_true: files('gpex-acpi.c'))

so the hard dependency exists only if ACPI is selected.

If one use "select", ACPI_PCI will be mandated even if ACPI is not set. I am not sure this is what we want.

"Imply" was supposed to condition the selection depending on ACPI_PCI dependencies, ie. ACPI and PCI

Eric

Quoted 3 lines
hw/pci-host/Kconfig +0 -0
 config PCI_EXPRESS_XILINX
     bool