LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
* [PATCH] x86: Re-enable IO-APIC for non-SMP X86_32
@ 2015-01-22 22:58 Bryan O'Donoghue
  2015-01-23  9:27 ` [tip:x86/urgent] x86/apic: Re-enable PCI_MSI support " tip-bot for Bryan O'Donoghue
  2015-01-29 15:19 ` [PATCH] x86: Re-enable IO-APIC " Ong, Boon Leong
  0 siblings, 2 replies; 7+ messages in thread
From: Bryan O'Donoghue @ 2015-01-22 22:58 UTC (permalink / raw)
  To: tglx, mingo, hpa, x86, andy.shevchenko; +Cc: linux-kernel, Bryan O'Donoghue

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.

Signed-off-by: Bryan O'Donoghue <pure.logic@nexus-software.ie>
Suggested-by: Thomas Gleixner <tglx@linutronix.de>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
---
 arch/x86/Kconfig | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig
index ba397bd..0dc9d01 100644
--- a/arch/x86/Kconfig
+++ b/arch/x86/Kconfig
@@ -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
-- 
1.9.1


^ permalink raw reply	[flat|nested] 7+ messages in thread

* [tip:x86/urgent] x86/apic: Re-enable PCI_MSI support for non-SMP X86_32
  2015-01-22 22:58 [PATCH] x86: Re-enable IO-APIC for non-SMP X86_32 Bryan O'Donoghue
@ 2015-01-23  9:27 ` tip-bot for Bryan O'Donoghue
  2015-01-29 15:19 ` [PATCH] x86: Re-enable IO-APIC " Ong, Boon Leong
  1 sibling, 0 replies; 7+ messages in thread
From: tip-bot for Bryan O'Donoghue @ 2015-01-23  9:27 UTC (permalink / raw)
  To: linux-tip-commits
  Cc: linux-kernel, thomas.petazzoni, tglx, pure.logic, hpa,
	andy.shevchenko, mingo

Commit-ID:  38a1dfda8e77d7ba74c94d06d8bc41ba98a4bc8c
Gitweb:     http://git.kernel.org/tip/38a1dfda8e77d7ba74c94d06d8bc41ba98a4bc8c
Author:     Bryan O'Donoghue <pure.logic@nexus-software.ie>
AuthorDate: Thu, 22 Jan 2015 22:58:49 +0000
Committer:  Thomas Gleixner <tglx@linutronix.de>
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'
Signed-off-by: Bryan O'Donoghue <pure.logic@nexus-software.ie>
Suggested-by: Thomas Gleixner <tglx@linutronix.de>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Cc: stable@vger.kernel.org
Link: http://lkml.kernel.org/r/1421967529-9037-1-git-send-email-pure.logic@nexus-software.ie
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
---
 arch/x86/Kconfig | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig
index ba397bd..0dc9d01 100644
--- a/arch/x86/Kconfig
+++ b/arch/x86/Kconfig
@@ -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

^ permalink raw reply	[flat|nested] 7+ messages in thread

* RE: [PATCH] x86: Re-enable IO-APIC for non-SMP X86_32
  2015-01-22 22:58 [PATCH] x86: Re-enable IO-APIC for non-SMP X86_32 Bryan O'Donoghue
  2015-01-23  9:27 ` [tip:x86/urgent] x86/apic: Re-enable PCI_MSI support " tip-bot for Bryan O'Donoghue
@ 2015-01-29 15:19 ` Ong, Boon Leong
  1 sibling, 0 replies; 7+ messages in thread
From: Ong, Boon Leong @ 2015-01-29 15:19 UTC (permalink / raw)
  To: Bryan O'Donoghue, tglx, mingo, hpa, x86, andy.shevchenko; +Cc: linux-kernel

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!

>-----Original Message-----
>From: linux-kernel-owner@vger.kernel.org [mailto:linux-kernel-
>owner@vger.kernel.org] On Behalf Of Bryan O'Donoghue
>Sent: Friday, January 23, 2015 6:59 AM
>To: tglx@linutronix.de; mingo@redhat.com; hpa@zytor.com; x86@kernel.org;
>andy.shevchenko@gmail.com
>Cc: linux-kernel@vger.kernel.org; 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.
>
>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.
>
>Signed-off-by: Bryan O'Donoghue <pure.logic@nexus-software.ie>
>Suggested-by: Thomas Gleixner <tglx@linutronix.de>
>Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Tested-by: Ong Boon Leong <boon.leong.ong@intel.com>

>---
> arch/x86/Kconfig | 6 +++++-
> 1 file changed, 5 insertions(+), 1 deletion(-)
>
>diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig
>index ba397bd..0dc9d01 100644
>--- a/arch/x86/Kconfig
>+++ b/arch/x86/Kconfig
>@@ -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
>--
>1.9.1
>
>--
>To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
>the body of a message to majordomo@vger.kernel.org
>More majordomo info at  http://vger.kernel.org/majordomo-info.html
>Please read the FAQ at  http://www.tux.org/lkml/

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] x86: Re-enable IO-APIC for non-SMP X86_32
  2015-01-22 21:42 ` Thomas Gleixner
@ 2015-01-22 22:52   ` Bryan O'Donoghue
  0 siblings, 0 replies; 7+ messages in thread
From: Bryan O'Donoghue @ 2015-01-22 22:52 UTC (permalink / raw)
  To: Thomas Gleixner; +Cc: mingo, hpa, x86, linux-kernel

On 22/01/15 21:42, Thomas Gleixner wrote:
>   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

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.





^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] x86: Re-enable IO-APIC for non-SMP X86_32
  2015-01-22 20:53 Bryan O'Donoghue
  2015-01-22 21:42 ` Thomas Gleixner
@ 2015-01-22 21:42 ` Andy Shevchenko
  1 sibling, 0 replies; 7+ messages in thread
From: Andy Shevchenko @ 2015-01-22 21:42 UTC (permalink / raw)
  To: Bryan O'Donoghue
  Cc: Thomas Gleixner, Ingo Molnar, H. Peter Anvin, x86, linux-kernel

On Thu, Jan 22, 2015 at 10:53 PM, Bryan O'Donoghue
<pure.logic@nexus-software.ie> wrote:

[]

> 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

Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>

> systems with an IO-APIC re-enabling IO-APIC for 32-bit x86 is required.
>
> Signed-off-by: Bryan O'Donoghue <pure.logic@nexus-software.ie>
> ---
>  arch/x86/Kconfig | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig
> index ba397bd..b36a7bd 100644
> --- a/arch/x86/Kconfig
> +++ b/arch/x86/Kconfig
> @@ -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 majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at  http://www.tux.org/lkml/



-- 
With Best Regards,
Andy Shevchenko

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] x86: Re-enable IO-APIC for non-SMP X86_32
  2015-01-22 20:53 Bryan O'Donoghue
@ 2015-01-22 21:42 ` Thomas Gleixner
  2015-01-22 22:52   ` Bryan O'Donoghue
  2015-01-22 21:42 ` Andy Shevchenko
  1 sibling, 1 reply; 7+ messages in thread
From: Thomas Gleixner @ 2015-01-22 21:42 UTC (permalink / raw)
  To: Bryan O'Donoghue; +Cc: mingo, hpa, x86, linux-kernel

On Thu, 22 Jan 2015, Bryan O'Donoghue wrote:

> 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.

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.....

> --- a/arch/x86/Kconfig
> +++ b/arch/x86/Kconfig
> @@ -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
---

diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig
index ffcc3ca5862a..a0dbc33690f0 100644
--- a/arch/x86/Kconfig
+++ b/arch/x86/Kconfig
@@ -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


^ permalink raw reply	[flat|nested] 7+ messages in thread

* [PATCH] x86: Re-enable IO-APIC for non-SMP X86_32
@ 2015-01-22 20:53 Bryan O'Donoghue
  2015-01-22 21:42 ` Thomas Gleixner
  2015-01-22 21:42 ` Andy Shevchenko
  0 siblings, 2 replies; 7+ messages in thread
From: Bryan O'Donoghue @ 2015-01-22 20:53 UTC (permalink / raw)
  To: tglx, mingo, hpa, x86; +Cc: linux-kernel, Bryan O'Donoghue

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.

Signed-off-by: Bryan O'Donoghue <pure.logic@nexus-software.ie>
---
 arch/x86/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig
index ba397bd..b36a7bd 100644
--- a/arch/x86/Kconfig
+++ b/arch/x86/Kconfig
@@ -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


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2015-01-29 15:19 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-01-22 22:58 [PATCH] x86: Re-enable IO-APIC for non-SMP X86_32 Bryan O'Donoghue
2015-01-23  9:27 ` [tip:x86/urgent] x86/apic: Re-enable PCI_MSI support " tip-bot for Bryan O'Donoghue
2015-01-29 15:19 ` [PATCH] x86: Re-enable IO-APIC " Ong, Boon Leong
  -- strict thread matches above, loose matches on Subject: below --
2015-01-22 20:53 Bryan O'Donoghue
2015-01-22 21:42 ` Thomas Gleixner
2015-01-22 22:52   ` Bryan O'Donoghue
2015-01-22 21:42 ` Andy Shevchenko

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).