浏览代码

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>
Chris Metcalf 12 年之前
父节点
当前提交
8d8cf06740
共有 1 个文件被更改,包括 2 次插入1 次删除
  1. 2 1
      arch/tile/kernel/irq.c

+ 2 - 1
arch/tile/kernel/irq.c

@@ -55,7 +55,8 @@ static DEFINE_PER_CPU(int, irq_depth);
 
 
 /* State for allocating IRQs on Gx. */
 /* State for allocating IRQs on Gx. */
 #if CHIP_HAS_IPI()
 #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);
 static DEFINE_SPINLOCK(available_irqs_lock);
 #endif
 #endif