diff options
author | Chris Metcalf <cmetcalf@tilera.com> | 2013-08-09 15:41:09 -0400 |
---|---|---|
committer | Chris Metcalf <cmetcalf@tilera.com> | 2013-08-30 11:56:16 -0400 |
commit | 8d8cf0674023da578e0539dc7cf4d824b2cf1f9e (patch) | |
tree | 2dd51ebbceaa602fcc9c90d0c45de929d5666804 | |
parent | d4d9eab4ade468b6a97b6853fdd72e8f21474324 (diff) |
tile: fix panic with large IRQ number
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>
-rw-r--r-- | arch/tile/kernel/irq.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/arch/tile/kernel/irq.c b/arch/tile/kernel/irq.c index c90de6c3cb7f..0e6c521b8a89 100644 --- a/arch/tile/kernel/irq.c +++ b/arch/tile/kernel/irq.c | |||
@@ -55,7 +55,8 @@ static DEFINE_PER_CPU(int, irq_depth); | |||
55 | 55 | ||
56 | /* State for allocating IRQs on Gx. */ | 56 | /* State for allocating IRQs on Gx. */ |
57 | #if CHIP_HAS_IPI() | 57 | #if CHIP_HAS_IPI() |
58 | static unsigned long available_irqs = ~(1UL << IRQ_RESCHEDULE); | 58 | static unsigned long available_irqs = ((1UL << NR_IRQS) - 1) & |
59 | (~(1UL << IRQ_RESCHEDULE)); | ||
59 | static DEFINE_SPINLOCK(available_irqs_lock); | 60 | static DEFINE_SPINLOCK(available_irqs_lock); |
60 | #endif | 61 | #endif |
61 | 62 | ||