LKML Archive on lore.kernel.org help / color / mirror / Atom feed
* [RFC v1 0/2] x86: kconfig: simplify APIC entries @ 2015-03-10 23:14 Luis R. Rodriguez 2015-03-10 23:14 ` [RFC v1 1/2] x86: kconfig: simplify enabling [IO]APIC for PCI_MSI Luis R. Rodriguez 2015-03-10 23:14 ` [RFC v1 2/2] x86: kconfig: remove UP [IO]APIC options Luis R. Rodriguez 0 siblings, 2 replies; 7+ messages in thread From: Luis R. Rodriguez @ 2015-03-10 23:14 UTC (permalink / raw) To: bhelgaas, mingo, tglx, hpa, pure.logic, jgross, luto, andy.shevchenko, thomas.petazzoni, JBeulich, bp Cc: linux-kernel, linux-pci, x86, Luis R. Rodriguez From: "Luis R. Rodriguez" <mcgrof@suse.com> There's quite a bit of Kconfig entries related to X86_LOCAL_APIC and X86_IO_APIC, and all for 32-bit purposes. Since 32-bit isn't in a magical state of flux we now *should* know when to enable or disable APIC stuff for these systems. Through history we've observed for instance PCI_MSI requires these under specific scenarios, just enable it for those learned scenarios and expect future requirements to also be explicit about the requirements on 32-bit. This lets us remove clutter (3 Kconfig entries) from x86 Kconfig simply for 32-bit build purposes. Luis R. Rodriguez (2): x86: kconfig: simplify enabling [IO]APIC for PCI_MSI x86: kconfig: remove UP [IO]APIC options Documentation/PCI/MSI-HOWTO.txt | 5 +---- arch/x86/Kconfig | 33 ++------------------------------- drivers/pci/Kconfig | 2 ++ 3 files changed, 5 insertions(+), 35 deletions(-) -- 2.3.2.209.gd67f9d5.dirty ^ permalink raw reply [flat|nested] 7+ messages in thread
* [RFC v1 1/2] x86: kconfig: simplify enabling [IO]APIC for PCI_MSI 2015-03-10 23:14 [RFC v1 0/2] x86: kconfig: simplify APIC entries Luis R. Rodriguez @ 2015-03-10 23:14 ` Luis R. Rodriguez 2015-03-11 0:49 ` David Rientjes 2015-03-10 23:14 ` [RFC v1 2/2] x86: kconfig: remove UP [IO]APIC options Luis R. Rodriguez 1 sibling, 1 reply; 7+ messages in thread From: Luis R. Rodriguez @ 2015-03-10 23:14 UTC (permalink / raw) To: bhelgaas, mingo, tglx, hpa, pure.logic, jgross, luto, andy.shevchenko, thomas.petazzoni, JBeulich, bp Cc: linux-kernel, linux-pci, x86, Luis R. Rodriguez, Ingo Molnar From: "Luis R. Rodriguez" <mcgrof@suse.com> Commit 38a1dfda by Bryan O'Donoghue fixed a build issue when PCI_MSI support is enabled on non-SMP X86_32 systems, this was done by introducing a new Kconfig entry, X86_UP_APIC_MSI, with the only purpose of selecting X86_UP_APIC under certain conditions. The real goal in the end though is to enable X86_LOCAL_APIC and X86_IO_APIC. We already have enough APIC related Kconfig entries and adding more only confuses things, we can remove X86_UP_APIC_MSI by just passing on to PCI_MSI what it needs. Cc: Bjorn Helgaas <bhelgaas@google.com> Cc: Bryan O'Donoghue <pure.logic@nexus-software.ie> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: Andy Shevchenko <andy.shevchenko@gmail.com> Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> Cc: Ingo Molnar <mingo@kernel.org> Cc: Borislav Petkov <bp@suse.de> Cc: H. Peter Anvin <hpa@zytor.com> Cc: Jan Beulich <JBeulich@suse.com> Cc: Juergen Gross <jgross@suse.com> Cc: linux-pci@vger.kernel.org Cc: x86@kernel.org Signed-off-by: Luis R. Rodriguez <mcgrof@suse.com> --- Documentation/PCI/MSI-HOWTO.txt | 5 +---- arch/x86/Kconfig | 6 +----- drivers/pci/Kconfig | 2 ++ 3 files changed, 4 insertions(+), 9 deletions(-) diff --git a/Documentation/PCI/MSI-HOWTO.txt b/Documentation/PCI/MSI-HOWTO.txt index 0d920d5..7306d2c 100644 --- a/Documentation/PCI/MSI-HOWTO.txt +++ b/Documentation/PCI/MSI-HOWTO.txt @@ -71,10 +71,7 @@ will simply fail and the device will continue to use pin-based interrupts. 4.1 Include kernel support for MSIs To support MSI or MSI-X, the kernel must be built with the CONFIG_PCI_MSI -option enabled. This option is only available on some architectures, -and it may depend on some other options also being set. For example, -on x86, you must also enable X86_UP_APIC or SMP in order to see the -CONFIG_PCI_MSI option. +option enabled. This option is only available on some architectures. 4.2 Using MSI diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig index d038475..0ecdeb1 100644 --- a/arch/x86/Kconfig +++ b/arch/x86/Kconfig @@ -902,10 +902,6 @@ 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 @@ -924,7 +920,7 @@ config X86_LOCAL_APIC select GENERIC_IRQ_LEGACY_ALLOC_HWIRQ config X86_IO_APIC - def_bool X86_64 || SMP || X86_32_NON_STANDARD || X86_UP_IOAPIC + def_bool X86_64 || SMP || X86_32_NON_STANDARD || X86_UP_IOAPIC || PCI_MSI depends on X86_LOCAL_APIC select IRQ_DOMAIN diff --git a/drivers/pci/Kconfig b/drivers/pci/Kconfig index 7a8f1c5..01370c0 100644 --- a/drivers/pci/Kconfig +++ b/drivers/pci/Kconfig @@ -5,6 +5,8 @@ config PCI_MSI bool "Message Signaled Interrupts (MSI and MSI-X)" depends on PCI select GENERIC_MSI_IRQ + select X86_LOCAL_APIC if X86_32 && !SMP && !X86_32_NON_STANDARD + select X86_IO_APIC if X86_32 && !SMP && !X86_32_NON_STANDARD help This allows device drivers to enable MSI (Message Signaled Interrupts). Message Signaled Interrupts enable a device to -- 2.3.2.209.gd67f9d5.dirty ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [RFC v1 1/2] x86: kconfig: simplify enabling [IO]APIC for PCI_MSI 2015-03-10 23:14 ` [RFC v1 1/2] x86: kconfig: simplify enabling [IO]APIC for PCI_MSI Luis R. Rodriguez @ 2015-03-11 0:49 ` David Rientjes 2015-03-11 23:03 ` Luis R. Rodriguez 0 siblings, 1 reply; 7+ messages in thread From: David Rientjes @ 2015-03-11 0:49 UTC (permalink / raw) To: Luis R. Rodriguez Cc: Bjorn Helgaas, Ingo Molnar, tglx, H. Peter Anvin, pure.logic, jgross, luto, andy.shevchenko, thomas.petazzoni, JBeulich, bp, linux-kernel, linux-pci, x86, Luis R. Rodriguez, Ingo Molnar On Tue, 10 Mar 2015, Luis R. Rodriguez wrote: > diff --git a/Documentation/PCI/MSI-HOWTO.txt b/Documentation/PCI/MSI-HOWTO.txt > index 0d920d5..7306d2c 100644 > --- a/Documentation/PCI/MSI-HOWTO.txt > +++ b/Documentation/PCI/MSI-HOWTO.txt > @@ -71,10 +71,7 @@ will simply fail and the device will continue to use pin-based interrupts. > 4.1 Include kernel support for MSIs > > To support MSI or MSI-X, the kernel must be built with the CONFIG_PCI_MSI > -option enabled. This option is only available on some architectures, > -and it may depend on some other options also being set. For example, > -on x86, you must also enable X86_UP_APIC or SMP in order to see the > -CONFIG_PCI_MSI option. > +option enabled. This option is only available on some architectures. > > 4.2 Using MSI > > diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig > index d038475..0ecdeb1 100644 > --- a/arch/x86/Kconfig > +++ b/arch/x86/Kconfig > @@ -902,10 +902,6 @@ 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 > @@ -924,7 +920,7 @@ config X86_LOCAL_APIC > select GENERIC_IRQ_LEGACY_ALLOC_HWIRQ > > config X86_IO_APIC > - def_bool X86_64 || SMP || X86_32_NON_STANDARD || X86_UP_IOAPIC > + def_bool X86_64 || SMP || X86_32_NON_STANDARD || X86_UP_IOAPIC || PCI_MSI > depends on X86_LOCAL_APIC > select IRQ_DOMAIN > > diff --git a/drivers/pci/Kconfig b/drivers/pci/Kconfig > index 7a8f1c5..01370c0 100644 > --- a/drivers/pci/Kconfig > +++ b/drivers/pci/Kconfig > @@ -5,6 +5,8 @@ config PCI_MSI > bool "Message Signaled Interrupts (MSI and MSI-X)" > depends on PCI > select GENERIC_MSI_IRQ > + select X86_LOCAL_APIC if X86_32 && !SMP && !X86_32_NON_STANDARD > + select X86_IO_APIC if X86_32 && !SMP && !X86_32_NON_STANDARD > help > This allows device drivers to enable MSI (Message Signaled > Interrupts). Message Signaled Interrupts enable a device to This conflicts with commit 50849eefea3b ("x86/Kconfig: Simplify X86_UP_APIC handling"), which has already been merged for the 4.0 release cycle, and I think I prefer the simplification done there over the additional "select"s for PCI_MSI. ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [RFC v1 1/2] x86: kconfig: simplify enabling [IO]APIC for PCI_MSI 2015-03-11 0:49 ` David Rientjes @ 2015-03-11 23:03 ` Luis R. Rodriguez 0 siblings, 0 replies; 7+ messages in thread From: Luis R. Rodriguez @ 2015-03-11 23:03 UTC (permalink / raw) To: David Rientjes Cc: Luis R. Rodriguez, Bjorn Helgaas, Ingo Molnar, tglx, H. Peter Anvin, pure.logic, jgross, luto, andy.shevchenko, thomas.petazzoni, JBeulich, bp, linux-kernel, linux-pci, x86, Ingo Molnar On Tue, Mar 10, 2015 at 05:49:10PM -0700, David Rientjes wrote: > On Tue, 10 Mar 2015, Luis R. Rodriguez wrote: > > > diff --git a/Documentation/PCI/MSI-HOWTO.txt b/Documentation/PCI/MSI-HOWTO.txt > > index 0d920d5..7306d2c 100644 > > --- a/Documentation/PCI/MSI-HOWTO.txt > > +++ b/Documentation/PCI/MSI-HOWTO.txt > > @@ -71,10 +71,7 @@ will simply fail and the device will continue to use pin-based interrupts. > > 4.1 Include kernel support for MSIs > > > > To support MSI or MSI-X, the kernel must be built with the CONFIG_PCI_MSI > > -option enabled. This option is only available on some architectures, > > -and it may depend on some other options also being set. For example, > > -on x86, you must also enable X86_UP_APIC or SMP in order to see the > > -CONFIG_PCI_MSI option. > > +option enabled. This option is only available on some architectures. > > > > 4.2 Using MSI > > > > diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig > > index d038475..0ecdeb1 100644 > > --- a/arch/x86/Kconfig > > +++ b/arch/x86/Kconfig > > @@ -902,10 +902,6 @@ 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 > > @@ -924,7 +920,7 @@ config X86_LOCAL_APIC > > select GENERIC_IRQ_LEGACY_ALLOC_HWIRQ > > > > config X86_IO_APIC > > - def_bool X86_64 || SMP || X86_32_NON_STANDARD || X86_UP_IOAPIC > > + def_bool X86_64 || SMP || X86_32_NON_STANDARD || X86_UP_IOAPIC || PCI_MSI > > depends on X86_LOCAL_APIC > > select IRQ_DOMAIN > > > > diff --git a/drivers/pci/Kconfig b/drivers/pci/Kconfig > > index 7a8f1c5..01370c0 100644 > > --- a/drivers/pci/Kconfig > > +++ b/drivers/pci/Kconfig > > @@ -5,6 +5,8 @@ config PCI_MSI > > bool "Message Signaled Interrupts (MSI and MSI-X)" > > depends on PCI > > select GENERIC_MSI_IRQ > > + select X86_LOCAL_APIC if X86_32 && !SMP && !X86_32_NON_STANDARD > > + select X86_IO_APIC if X86_32 && !SMP && !X86_32_NON_STANDARD > > help > > This allows device drivers to enable MSI (Message Signaled > > Interrupts). Message Signaled Interrupts enable a device to > > and I think I prefer the simplification done there over the > additional "select"s for PCI_MSI. OK found a way to address that which makes it even easier to read. Luis ^ permalink raw reply [flat|nested] 7+ messages in thread
* [RFC v1 2/2] x86: kconfig: remove UP [IO]APIC options 2015-03-10 23:14 [RFC v1 0/2] x86: kconfig: simplify APIC entries Luis R. Rodriguez 2015-03-10 23:14 ` [RFC v1 1/2] x86: kconfig: simplify enabling [IO]APIC for PCI_MSI Luis R. Rodriguez @ 2015-03-10 23:14 ` Luis R. Rodriguez 2015-03-11 0:58 ` David Rientjes 1 sibling, 1 reply; 7+ messages in thread From: Luis R. Rodriguez @ 2015-03-10 23:14 UTC (permalink / raw) To: bhelgaas, mingo, tglx, hpa, pure.logic, jgross, luto, andy.shevchenko, thomas.petazzoni, JBeulich, bp Cc: linux-kernel, linux-pci, x86, Luis R. Rodriguez, Ingo Molnar From: "Luis R. Rodriguez" <mcgrof@suse.com> These were here mostly to help as wrappers for PCI_MSI under certain UP 32-bit build scenarios, now that PCI_MSI properly selects what it needs and when it needs it these Kconfig options are now only enabling users reduce the size of 32-bit kernels optionally. Since 32-bit kernels are not in a huge state of flux and since there is no penalty for adding APIC support other than a bit of size moving forward we simply expect folks to enable APIC options on 32-bit systems when a system needs it, as with PCI_MSI. This lets us remove clutter from the x86 Kconfig file. Cc: Bjorn Helgaas <bhelgaas@google.com> Cc: Bryan O'Donoghue <pure.logic@nexus-software.ie> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: Andy Shevchenko <andy.shevchenko@gmail.com> Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> Cc: Ingo Molnar <mingo@kernel.org> Cc: Borislav Petkov <bp@suse.de> Cc: H. Peter Anvin <hpa@zytor.com> Cc: Jan Beulich <JBeulich@suse.com> Cc: Juergen Gross <jgross@suse.com> Cc: linux-pci@vger.kernel.org Cc: x86@kernel.org Signed-off-by: Luis R. Rodriguez <mcgrof@suse.com> --- arch/x86/Kconfig | 29 ++--------------------------- 1 file changed, 2 insertions(+), 27 deletions(-) diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig index 0ecdeb1..bfd4d66 100644 --- a/arch/x86/Kconfig +++ b/arch/x86/Kconfig @@ -889,38 +889,13 @@ config UP_LATE_INIT def_bool y depends on !SMP && X86_LOCAL_APIC -config X86_UP_APIC - bool "Local APIC support on uniprocessors" - 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 - system which has a processor with a local APIC, you can say Y here to - enable and use it. If you say Y here even though your machine doesn't - have a local APIC, then the kernel will still run with no slowdown at - all. The local APIC supports CPU-generated self-interrupts (timer, - performance counters), and the NMI watchdog which detects hard - lockups. - -config X86_UP_IOAPIC - bool "IO-APIC support on uniprocessors" - depends on X86_UP_APIC - ---help--- - An IO-APIC (I/O Advanced Programmable Interrupt Controller) is an - SMP-capable replacement for PC-style interrupt controllers. Most - SMP systems and many recent uniprocessor systems have one. - - If you have a single-CPU system with an IO-APIC, you can say Y here - to use it. If you say Y here even though your machine doesn't have - an IO-APIC, then the kernel will still run with no slowdown at all. - config X86_LOCAL_APIC def_bool y - depends on X86_64 || SMP || X86_32_NON_STANDARD || X86_UP_APIC || PCI_MSI + depends on X86_64 || SMP || X86_32_NON_STANDARD || PCI_MSI select GENERIC_IRQ_LEGACY_ALLOC_HWIRQ config X86_IO_APIC - def_bool X86_64 || SMP || X86_32_NON_STANDARD || X86_UP_IOAPIC || PCI_MSI + def_bool X86_64 || SMP || X86_32_NON_STANDARD || PCI_MSI depends on X86_LOCAL_APIC select IRQ_DOMAIN -- 2.3.2.209.gd67f9d5.dirty ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [RFC v1 2/2] x86: kconfig: remove UP [IO]APIC options 2015-03-10 23:14 ` [RFC v1 2/2] x86: kconfig: remove UP [IO]APIC options Luis R. Rodriguez @ 2015-03-11 0:58 ` David Rientjes 2015-03-11 18:35 ` Luis R. Rodriguez 0 siblings, 1 reply; 7+ messages in thread From: David Rientjes @ 2015-03-11 0:58 UTC (permalink / raw) To: Luis R. Rodriguez Cc: bhelgaas, mingo, tglx, hpa, pure.logic, jgross, luto, andy.shevchenko, thomas.petazzoni, JBeulich, bp, linux-kernel, linux-pci, x86, Luis R. Rodriguez, Ingo Molnar On Tue, 10 Mar 2015, Luis R. Rodriguez wrote: > From: "Luis R. Rodriguez" <mcgrof@suse.com> > > These were here mostly to help as wrappers for PCI_MSI > under certain UP 32-bit build scenarios, now that PCI_MSI > properly selects what it needs and when it needs it these > Kconfig options are now only enabling users reduce the size > of 32-bit kernels optionally. Since 32-bit kernels are not > in a huge state of flux and since there is no penalty for > adding APIC support other than a bit of size moving forward > we simply expect folks to enable APIC options on 32-bit systems > when a system needs it, as with PCI_MSI. This lets us remove > clutter from the x86 Kconfig file. > Check out Linus's latest tree at git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git and see how it looks after commit 50849eefea3b ("x86/Kconfig: Simplify X86_UP_APIC handling") and commit b1da1e715d4f ("x86/Kconfig: Simplify X86_IO_APIC dependencies"). ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [RFC v1 2/2] x86: kconfig: remove UP [IO]APIC options 2015-03-11 0:58 ` David Rientjes @ 2015-03-11 18:35 ` Luis R. Rodriguez 0 siblings, 0 replies; 7+ messages in thread From: Luis R. Rodriguez @ 2015-03-11 18:35 UTC (permalink / raw) To: David Rientjes Cc: Luis R. Rodriguez, bhelgaas, mingo, tglx, hpa, pure.logic, jgross, luto, andy.shevchenko, thomas.petazzoni, JBeulich, bp, linux-kernel, linux-pci, x86, Ingo Molnar On Tue, Mar 10, 2015 at 05:58:27PM -0700, David Rientjes wrote: > On Tue, 10 Mar 2015, Luis R. Rodriguez wrote: > > > From: "Luis R. Rodriguez" <mcgrof@suse.com> > > > > These were here mostly to help as wrappers for PCI_MSI > > under certain UP 32-bit build scenarios, now that PCI_MSI > > properly selects what it needs and when it needs it these > > Kconfig options are now only enabling users reduce the size > > of 32-bit kernels optionally. Since 32-bit kernels are not > > in a huge state of flux and since there is no penalty for > > adding APIC support other than a bit of size moving forward > > we simply expect folks to enable APIC options on 32-bit systems > > when a system needs it, as with PCI_MSI. This lets us remove > > clutter from the x86 Kconfig file. > > > > Check out Linus's latest tree at > git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git and see > how it looks after commit 50849eefea3b ("x86/Kconfig: Simplify X86_UP_APIC > handling") and commit b1da1e715d4f ("x86/Kconfig: Simplify X86_IO_APIC > dependencies"). OK thanks yeah I see that now, yeah this can be simplified further, will send a follow up based on top of these two. Luis ^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2015-03-11 23:04 UTC | newest] Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2015-03-10 23:14 [RFC v1 0/2] x86: kconfig: simplify APIC entries Luis R. Rodriguez 2015-03-10 23:14 ` [RFC v1 1/2] x86: kconfig: simplify enabling [IO]APIC for PCI_MSI Luis R. Rodriguez 2015-03-11 0:49 ` David Rientjes 2015-03-11 23:03 ` Luis R. Rodriguez 2015-03-10 23:14 ` [RFC v1 2/2] x86: kconfig: remove UP [IO]APIC options Luis R. Rodriguez 2015-03-11 0:58 ` David Rientjes 2015-03-11 18:35 ` Luis R. Rodriguez
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).