]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
tile: fix panic with large IRQ number
authorChris Metcalf <cmetcalf@tilera.com>
Fri, 9 Aug 2013 19:41:09 +0000 (15:41 -0400)
committerChris Metcalf <cmetcalf@tilera.com>
Fri, 30 Aug 2013 15:56:16 +0000 (11:56 -0400)
The "available_irqs" value needs to actually reflect the IRQs
available, not just start as an all-ones mask, since we only
have 32 IRQs available even on a 64-bit platform.

Signed-off-by: Chris Metcalf <cmetcalf@tilera.com>
arch/tile/kernel/irq.c

index c90de6c3cb7fdb897c0a22853fab52d96c226cc8..0e6c521b8a8907afface5f029203f2aa7dd9ff25 100644 (file)
@@ -55,7 +55,8 @@ static DEFINE_PER_CPU(int, irq_depth);
 
 /* State for allocating IRQs on Gx. */
 #if CHIP_HAS_IPI()
-static unsigned long available_irqs = ~(1UL << IRQ_RESCHEDULE);
+static unsigned long available_irqs = ((1UL << NR_IRQS) - 1) &
+                                     (~(1UL << IRQ_RESCHEDULE));
 static DEFINE_SPINLOCK(available_irqs_lock);
 #endif