Skip to content

Commit 0dbc607

Browse files
tpetazzoniH. Peter Anvin
authored andcommitted
x86, build, pci: Fix PCI_MSI build on !SMP
Commit ebd97be ('PCI: remove ARCH_SUPPORTS_MSI kconfig option') removed the ARCH_SUPPORTS_MSI option which architectures could select to indicate that they support MSI. Now, all architectures are supposed to build fine when MSI support is enabled: instead of having the architecture tell *when* MSI support can be used, it's up to the architecture code to ensure that MSI support can be enabled. On x86, commit ebd97be removed the following line: select ARCH_SUPPORTS_MSI if (X86_LOCAL_APIC && X86_IO_APIC) Which meant that MSI support was only available when the local APIC and I/O APIC were enabled. While this is always true on SMP or x86-64, it is not necessarily the case on i386 !SMP. The below patch makes sure that the local APIC and I/O APIC support is always enabled when MSI support is enabled. To do so, it: * Ensures the X86_UP_APIC option is not visible when PCI_MSI is enabled. This is the option that allows, on UP machines, to enable or not the APIC support. It is already not visible on SMP systems, or x86-64 systems, for example. We're simply also making it invisible on i386 MSI systems. * Ensures that the X86_LOCAL_APIC and X86_IO_APIC options are 'y' when PCI_MSI is enabled. Notice that this change requires a change in drivers/iommu/Kconfig to avoid a recursive Kconfig dependencey. The AMD_IOMMU option selects PCI_MSI, but was depending on X86_IO_APIC. This dependency is no longer needed: as soon as PCI_MSI is selected, the presence of X86_IO_APIC is guaranteed. Moreover, the AMD_IOMMU already depended on X86_64, which already guaranteed that X86_IO_APIC was enabled, so this dependency was anyway redundant. Signed-off-by: Thomas Petazzoni <[email protected]> Link: http://lkml.kernel.org/r/1380794354-9079-1-git-send-email-thomas.petazzoni@free-electrons.com Reported-by: Konrad Rzeszutek Wilk <[email protected]> Acked-by: Bjorn Helgaas <[email protected]> Signed-off-by: H. Peter Anvin <[email protected]>
1 parent 15c83d2 commit 0dbc607

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

arch/x86/Kconfig

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -860,7 +860,7 @@ source "kernel/Kconfig.preempt"
860860

861861
config X86_UP_APIC
862862
bool "Local APIC support on uniprocessors"
863-
depends on X86_32 && !SMP && !X86_32_NON_STANDARD
863+
depends on X86_32 && !SMP && !X86_32_NON_STANDARD && !PCI_MSI
864864
---help---
865865
A local APIC (Advanced Programmable Interrupt Controller) is an
866866
integrated interrupt controller in the CPU. If you have a single-CPU
@@ -885,11 +885,11 @@ config X86_UP_IOAPIC
885885

886886
config X86_LOCAL_APIC
887887
def_bool y
888-
depends on X86_64 || SMP || X86_32_NON_STANDARD || X86_UP_APIC
888+
depends on X86_64 || SMP || X86_32_NON_STANDARD || X86_UP_APIC || PCI_MSI
889889

890890
config X86_IO_APIC
891891
def_bool y
892-
depends on X86_64 || SMP || X86_32_NON_STANDARD || X86_UP_IOAPIC
892+
depends on X86_64 || SMP || X86_32_NON_STANDARD || X86_UP_IOAPIC || PCI_MSI
893893

894894
config X86_VISWS_APIC
895895
def_bool y

drivers/iommu/Kconfig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ config AMD_IOMMU
5252
select PCI_PRI
5353
select PCI_PASID
5454
select IOMMU_API
55-
depends on X86_64 && PCI && ACPI && X86_IO_APIC
55+
depends on X86_64 && PCI && ACPI
5656
---help---
5757
With this option you can enable support for AMD IOMMU hardware in
5858
your system. An IOMMU is a hardware component which provides

0 commit comments

Comments
 (0)