Skip to contentSkip to conversation

PCI: hotplug: ibm: remove PCI_BIOS dependency

PATCH New Rosen Penev 2 participants 2 messages May 27 PCI

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 PCI: hotplug: ibm: remove PCI_BIOS dependency

PCI_BIOS depends on 32-bit x86 so removed for that reason. The driver can be built on 64-bit as well.

The remaining X86_IO_APIC symbol selects X86_32 || X86_64 so no need for X86 which does the same thing.

Assisted-By Claude:Sonnet-4.6
---
 drivers/pci/hotplug/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/pci/hotplug/Kconfig +1 -1
index 3207860b52e4..891a81bac5e9 100644
@@ -42,7 +42,7 @@ config HOTPLUG_PCI_COMPAQ_NVRAM
 
 config HOTPLUG_PCI_IBM
 	tristate "IBM PCI Hotplug driver"
-	depends on X86_IO_APIC && X86 && PCI_BIOS
+	depends on X86_IO_APIC
 	help
 	  Say Y here if you have a motherboard with a IBM PCI Hotplug
 	  controller.
Signature · 1 line
2.54.0
#1 lore raw
Thank you for your contribution! Sashiko AI review found 2 potential issue(s) to consider: - [Medium] The commit message incorrectly states that the `X86_IO_APIC` symbol selects `X86_32 || X86_64`.…

Thank you for your contribution! Sashiko AI review found 2 potential issue(s) to consider:
- [Medium] The commit message incorrectly states that the X86_IO_APIC symbol selects X86_32 || X86_64.
- [Low] Removing the PCI_BIOS dependency causes a link-time error on x86_64 architectures or on x86_32 when CONFIG_PCI_BIOS is manually disabled. --

commit 50e741eebfa53ab7690287f752d2374b6c6ccd49
Author: Rosen Penev <[email protected]>

PCI: hotplug: ibm: remove PCI_BIOS dependency

This commit removes the PCI_BIOS and X86 dependencies for the IBM PCI Hotplug driver to allow it to be built on 64-bit architectures.

Quoted 2 lines

The remaining X86_IO_APIC symbol selects X86_32 || X86_64 so no need for X86 which does the same thing.

[Severity: Medium]
Is this description accurate? Looking at the definition of X86_IO_APIC in arch/x86/Kconfig, it is defined as a def_bool y that depends on X86_LOCAL_APIC || X86_UP_IOAPIC, rather than selecting X86_32 or X86_64.

drivers/pci/hotplug/Kconfig config HOTPLUG_PCI_COMPAQ_NVRAM · line 45

Quoted 10 lines
drivers/pci/hotplug/Kconfig +1 -1
index 3207860b52e42..891a81bac5e94 100644
@@ -42,7 +42,7 @@ config HOTPLUG_PCI_COMPAQ_NVRAM
 
 config HOTPLUG_PCI_IBM
 	tristate "IBM PCI Hotplug driver"
-	depends on X86_IO_APIC && X86 && PCI_BIOS
+	depends on X86_IO_APIC

[Severity: Low]
Does removing this PCI_BIOS dependency cause a link-time error on x86_64 or when CONFIG_PCI_BIOS is disabled?

The driver unconditionally calls pcibios_get_irq_routing_table():

drivers/pci/hotplug/ibmphp_core.c:ibmphp_init() {
    ...
    rtable = pcibios_get_irq_routing_table();
    ...
}

This function is implemented in arch/x86/pci/pcbios.c, which is only compiled when CONFIG_PCI_BIOS is enabled (obj-$(CONFIG_PCI_BIOS) += pcbios.o), and there appears to be no fallback stub in arch/x86/include/asm/pci.h.

Signature · 1 line
Sashiko AI review · https://sashiko.dev/#/patchset/[email protected]?part=1