Skip to contentSkip to conversation

x86: Re-enable IO-APIC for non-SMP X86_32

PATCH In review Bryan O'Donoghue 3 participants 3 messages Jan 22, 2015 – Jan 29, 2015 x86

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 x86: Re-enable IO-APIC for non-SMP X86_32

Commit 0dbc6078c06bc0 ('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 | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)
arch/x86/Kconfig +5 -1
index ba397bd..0dc9d01 100644
@@ -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
@@ -868,6 +868,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
Signature · 1 line
1.9.1
#1 lore raw

[tip:x86/urgent] x86/apic: Re-enable PCI_MSI support for non-SMP X86_32

x86/apic: Re-enable PCI_MSI support for non-SMP X86_32
Commit-ID:  38a1dfda8e77d7ba74c94d06d8bc41ba98a4bc8c
Gitweb:     http://git.kernel.org/tip/38a1dfda8e77d7ba74c94d06d8bc41ba98a4bc8c
Author:     Bryan O'Donoghue <[email protected]>
AuthorDate: Thu, 22 Jan 2015 22:58:49 +0000
Committer:  Thomas Gleixner <[email protected]>
CommitDate: Fri, 23 Jan 2015 10:20:30 +0100

x86/apic: Re-enable PCI_MSI support for non-SMP X86_32

Commit 0dbc6078c06bc0 ('x86, build, pci: Fix PCI_MSI build on !SMP') introduced the dependency that X86_UP_APIC is only available when PCI_MSI is false. This effectively prevents PCI_MSI support on 32bit UP systems because it disables both APIC and IO-APIC. But APIC support is architecturally required for PCI_MSI.

The intention of the patch was to enforce APIC support when PCI_MSI is enabled, but failed to do so.

Remove the !PCI_MSI dependency from X86_UP_APIC and enforce X86_UP_APIC when PCI_MSI support is enabled on 32bit UP systems.

[ tglx: Massaged changelog ]

Fixes 0dbc6078c06bc0 'x86, build, pci: Fix PCI_MSI build on !SMP'

---
 arch/x86/Kconfig | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)
arch/x86/Kconfig +5 -1
index ba397bd..0dc9d01 100644
@@ -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
@@ -868,6 +868,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
Tested-by on v1 1/1
#2 lore raw
In reply to Bryan O'Donoghue

Tested this patch together with following v6 patch for Quark IMR:
1) x86: Add Isolated Memory Regions for Quark X1000
2) x86, quark: Add Intel Quark platform support

Built and tested on Galileo Genv2. This patch looks good. I will give you my tested-by below. Thanks!

Quoted 30 lines

-----Original Message-----
From: [email protected] [mailto:linux-kernel- [email protected]] On Behalf Of Bryan O'Donoghue
Sent: Friday, January 23, 2015 6:59 AM
To: [email protected]; [email protected]; [email protected]; [email protected]; [email protected]
Cc: [email protected]; Bryan O'Donoghue
Subject: [PATCH] x86: Re-enable IO-APIC for non-SMP X86_32

Commit 0dbc6078c06bc0 ('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.

Quoted 6 lines

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.

Quoted 38 lines

---
arch/x86/Kconfig | 6 +++++-

1 file changed, 5 insertions(+), 1 deletion(-)
arch/x86/Kconfig +0 -0
index ba397bd..0dc9d01 100644
@@ -857,7 +857,7 @@ source "kernel/Kconfig.preempt"
 

config X86_UP_APIC
bool "Local APIC support on uniprocessors"

arch/x86/Kconfig +0 -1
-	depends on X86_32 && !SMP && !X86_32_NON_STANDARD &&

!PCI_MSI

arch/x86/Kconfig +1 -0
+	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 +3 -0
@@ -868,6 +868,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
--
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/