linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/6] powerpc: Make NR_IRQS a CONFIG option
@ 2009-10-14  5:44 Michael Ellerman
  2009-10-14  5:44 ` [PATCH 2/6] powerpc/pseries: Use irq_has_action() in eeh_disable_irq() Michael Ellerman
                   ` (5 more replies)
  0 siblings, 6 replies; 15+ messages in thread
From: Michael Ellerman @ 2009-10-14  5:44 UTC (permalink / raw)
  To: linuxppc-dev

The irq_desc array consumes quite a lot of space, and for systems
that don't need or can't have 512 irqs it's just wasted space.

The first 16 are reserved for ISA, so the minimum of 32 is really
16 - and no one has asked for more than 512 so leave that as the
maximum.

Signed-off-by: Michael Ellerman <michael@ellerman.id.au>
---
 arch/powerpc/Kconfig           |   10 ++++++++++
 arch/powerpc/include/asm/irq.h |    4 ++--
 2 files changed, 12 insertions(+), 2 deletions(-)

diff --git a/arch/powerpc/Kconfig b/arch/powerpc/Kconfig
index 10a0a54..2230e75 100644
--- a/arch/powerpc/Kconfig
+++ b/arch/powerpc/Kconfig
@@ -56,6 +56,16 @@ config IRQ_PER_CPU
 	bool
 	default y
 
+config NR_IRQS
+	int "Number of virtual interrupt numbers"
+	range 32 512
+	default "512"
+	help
+	  This defines the number of virtual interrupt numbers the kernel
+	  can manage. Virtual interrupt numbers are what you see in
+	  /proc/interrupts. If you configure your system to have too few,
+	  drivers will fail to load or worse - handle with care.
+
 config STACKTRACE_SUPPORT
 	bool
 	default y
diff --git a/arch/powerpc/include/asm/irq.h b/arch/powerpc/include/asm/irq.h
index bbcd1aa..b83fcc8 100644
--- a/arch/powerpc/include/asm/irq.h
+++ b/arch/powerpc/include/asm/irq.h
@@ -34,8 +34,8 @@ extern atomic_t ppc_n_lost_interrupts;
  */
 #define NO_IRQ_IGNORE		((unsigned int)-1)
 
-/* Total number of virq in the platform (make it a CONFIG_* option ? */
-#define NR_IRQS		512
+/* Total number of virq in the platform */
+#define NR_IRQS		CONFIG_NR_IRQS
 
 /* Number of irqs reserved for the legacy controller */
 #define NUM_ISA_INTERRUPTS	16
-- 
1.6.2.1

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

end of thread, other threads:[~2009-10-15  0:33 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-10-14  5:44 [PATCH 1/6] powerpc: Make NR_IRQS a CONFIG option Michael Ellerman
2009-10-14  5:44 ` [PATCH 2/6] powerpc/pseries: Use irq_has_action() in eeh_disable_irq() Michael Ellerman
2009-10-14 18:33   ` Grant Likely
2009-10-14  5:44 ` [PATCH 3/6] powerpc: Remove get_irq_desc() Michael Ellerman
2009-10-14 19:02   ` Grant Likely
2009-10-14  5:44 ` [PATCH 4/6] powerpc: Make virq_debug_show() cope with sparse irq_descs Michael Ellerman
2009-10-14 18:34   ` Grant Likely
2009-10-14  5:45 ` [PATCH 5/6] powerpc: Rearrange and fix show_interrupts() for " Michael Ellerman
2009-10-14 18:37   ` Grant Likely
2009-10-14  5:45 ` [PATCH 6/6] powerpc: Enable sparse irq_descs on powerpc Michael Ellerman
2009-10-14 18:44   ` Grant Likely
2009-10-14 23:51     ` Michael Ellerman
2009-10-15  0:33       ` Grant Likely
2009-10-14 18:59 ` [PATCH 1/6] powerpc: Make NR_IRQS a CONFIG option Grant Likely
2009-10-14 23:47   ` Michael Ellerman

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