summary refs log tree commit diff
path: root/arch/powerpc/platforms/cell/beat_interrupt.c
diff options
context:
space:
mode:
authorGrant Likely <grant.likely@secretlab.ca>2012-04-23 12:30:02 +0000
committerBenjamin Herrenschmidt <benh@kernel.crashing.org>2012-04-30 10:45:26 +1000
commit4013369f3782af9a488e37c2b603f1dcf008ea76 (patch)
treeff5266d942217776f0cc25b181b86ac1f537f02a /arch/powerpc/platforms/cell/beat_interrupt.c
parent8751ed14dcdd692733072966bf97b6b8c21ccaad (diff)
downloadlinux-4013369f3782af9a488e37c2b603f1dcf008ea76.tar.gz
powerpc/irqdomain: Fix broken NR_IRQ references
The switch from using irq_map to irq_alloc_desc*() for managing irq
number allocations introduced new bugs in some of the powerpc
interrupt code.  Several functions rely on the value of NR_IRQS to
determine the maximum irq number that could get allocated.  However,
with sparse_irq and using irq_alloc_desc*() the maximum possible irq
number is now specified with 'nr_irqs' which may be a number larger
than NR_IRQS.  This has caused breakage on powermac when
CONFIG_NR_IRQS is set to 32.

This patch removes most of the direct references to NR_IRQS in the
powerpc code and replaces them with either a nr_irqs reference or by
using the common for_each_irq_desc() macro.  The powerpc-specific
for_each_irq() macro is removed at the same time.

Also, the Cell axon_msi driver is refactored to remove the global
build assumption on the size of NR_IRQS and instead add a limit to the
maximum irq number when calling irq_domain_add_nomap().

Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Diffstat (limited to 'arch/powerpc/platforms/cell/beat_interrupt.c')
-rw-r--r--arch/powerpc/platforms/cell/beat_interrupt.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/powerpc/platforms/cell/beat_interrupt.c b/arch/powerpc/platforms/cell/beat_interrupt.c
index f9a48af335cb..8c6dc42ecf65 100644
--- a/arch/powerpc/platforms/cell/beat_interrupt.c
+++ b/arch/powerpc/platforms/cell/beat_interrupt.c
@@ -248,6 +248,6 @@ void beatic_deinit_IRQ(void)
 {
 	int	i;
 
-	for (i = 1; i < NR_IRQS; i++)
+	for (i = 1; i < nr_irqs; i++)
 		beat_destruct_irq_plug(i);
 }