x86: Re-enable IO-APIC for non-SMP X86_32
PATCH 1/1 x86: Re-enable IO-APIC for non-SMP X86_32
Commit 0dbc6078c0 ('x86, build, pci: Fix PCI_MSI build on !SMP') introduced the dependency that X86_UP_APIC should only be visible only when PCI_MSI is false.
Conceptually this is invalid since any x86 system that supports MSIs must have an LAPIC to receive those messages. An MSI is written directly to the LAPIC of the CPU servicing the interrupt.
Making X86_UP_APIC depend on !PCI_MSI means that X86_UP_IOAPIC will be false since X86_UP_IOAPIC depends on X86_UP_APIC. It also means that X86_IO_APIC cannot be true.
In other words no 32 bit uniprocessor system that supports MSIs can have an IO-APIC, which is an architectually invalid statement.
This patch removes the dependency on !PCI_MSI for X86_UP_APIC and as a consequence re-enables support for IO-APIC on 32 bit uniprocessor X86 systems.
Since Intel-CE, Intel-Mid and Intel-Quark are all 32-bit uniprocessor systems with an IO-APIC re-enabling IO-APIC for 32-bit x86 is required.
--- arch/x86/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/x86/Kconfig +1 -1
@@ -857,7 +857,7 @@ source "kernel/Kconfig.preempt" config X86_UP_APIC bool "Local APIC support on uniprocessors" - depends on X86_32 && !SMP && !X86_32_NON_STANDARD && !PCI_MSI + depends on X86_32 && !SMP && !X86_32_NON_STANDARD ---help--- A local APIC (Advanced Programmable Interrupt Controller) is an integrated interrupt controller in the CPU. If you have a single-CPU
Signature · 1 line
1.9.1
On Thu, Jan 22, 2015 at 10:53 PM, Bryan O'Donoghue <[email protected]> wrote:
[]
Quoted 1 line
Since Intel-CE, Intel-Mid and Intel-Quark are all 32-bit uniprocessor
I can hardly tell that Intel MID is UP systems.
No dashes, please :-)
Otherwise
Quoted 28 lines
systems with an IO-APIC re-enabling IO-APIC for 32-bit x86 is required.
Signed-off-by Bryan O'Donoghue <[email protected]>--- arch/x86/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)arch/x86/Kconfig +1
-2@@ -857,7 +857,7 @@ source "kernel/Kconfig.preempt" config X86_UP_APIC bool "Local APIC support on uniprocessors" - depends on X86_32 && !SMP && !X86_32_NON_STANDARD && !PCI_MSI + depends on X86_32 && !SMP && !X86_32_NON_STANDARD ---help--- A local APIC (Advanced Programmable Interrupt Controller) is an integrated interrupt controller in the CPU. If you have a single-CPU --1.9.1
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Signature · 2 lines
With Best Regards, Andy Shevchenko
Quoted 3 lines · Bryan O'Donoghue
Commit
0dbc6078c0('x86, build, pci: FixPCI_MSIbuild on !SMP') introduced the dependency thatX86_UP_APICshould only be visible only whenPCI_MSIis false.
I think the intention of the patch was to NOT expose the option when MSI is enabled, so you cannot turn it off, which makes sense.
But that went wrong.....
arch/x86/Kconfig source "kernel/Kconfig.preempt" · line 860
Quoted 8 lines
arch/x86/Kconfig +1
-1@@ -857,7 +857,7 @@ source "kernel/Kconfig.preempt" config X86_UP_APIC bool "Local APIC support on uniprocessors" - depends on X86_32 && !SMP && !X86_32_NON_STANDARD && !PCI_MSI + depends on X86_32 && !SMP && !X86_32_NON_STANDARD
So the proper fix is below.
Thanks,
tglx
---
arch/x86/Kconfig +5 -1
@@ -861,7 +861,7 @@ config UP_LATE_INIT config X86_UP_APIC bool "Local APIC support on uniprocessors" - depends on X86_32 && !SMP && !X86_32_NON_STANDARD && !PCI_MSI + depends on X86_32 && !SMP && !X86_32_NON_STANDARD ---help--- A local APIC (Advanced Programmable Interrupt Controller) is an integrated interrupt controller in the CPU. If you have a single-CPU
@@ -872,6 +872,10 @@ config X86_UP_APIC performance counters), and the NMI watchdog which detects hard lockups. +config X86_UP_APIC_MSI + def_bool y + select X86_UP_APIC if X86_32 && !SMP && !X86_32_NON_STANDARD && PCI_MSI + config X86_UP_IOAPIC bool "IO-APIC support on uniprocessors" depends on X86_UP_APIC
Quoted 8 lines · Thomas Gleixner
config
X86_UP_APIC
bool "Local APIC support on uniprocessors"arch/x86/Kconfig +1
-1- depends on X86_32 && !SMP && !X86_32_NON_STANDARD && !PCI_MSI + depends on X86_32 && !SMP && !X86_32_NON_STANDARD ---help--- A local APIC (Advanced Programmable Interrupt Controller) is an integrated interrupt controller in the CPU. If you have a single-CPU
arch/x86/Kconfig config X86_UP_APIC · line 881
Quoted 10 lines
arch/x86/Kconfig +4
-0@@ -872,6 +872,10 @@ config X86_UP_APIC performance counters), and the NMI watchdog which detects hard lockups. +config X86_UP_APIC_MSI + def_bool y + select X86_UP_APIC if X86_32 && !SMP && !X86_32_NON_STANDARD && PCI_MSI + config X86_UP_IOAPIC bool "IO-APIC support on uniprocessors" depends on X86_UP_APIC
OK.
That works.
You can select local apic and/or io-apic on X86_32 individually with PCI_MSI swiched off.
If you switch on PCI_MSI the option for X86_UP_APIC_MSI disappears from and is silently selected by X86_UP_APIC_MSI.