Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

[IA64] preallocate IA64_IRQ_MOVE_VECTOR

Previously, we tried to use IA64_DEF_FIRST_DEVICE_VECTOR (0x30) as the
IA64_IRQ_MOVE_VECTOR. However, we allocate other IRQs from the device
vector range, so there's no guarantee that IA64_DEF_FIRST_DEVICE_VECTOR
will still be available when we register IA64_IRQ_MOVE_VECTOR.

This patch statically allocates 0x30 for IA64_IRQ_MOVE_VECTOR and
removes it from the device vector range.

Without this patch, we crash on machines like the HP rx3600 that use
vector 48 (0x30) as the ACPI SCI interrupt:

kernel BUG at arch/ia64/kernel/irq_ia64.c:647!
swapper[0]: bugcheck! 0 [1]
Modules linked in:

Pid: 0, CPU 0, comm: swapper
psr : 00001010084a2018 ifs : 800000000000030e ip : [<a000000100012ed0>] Not tainted (2.6.32-rc8-00184-gd5d4ec8)
ip is at ia64_native_register_percpu_irq+0x110/0x1e0

Signed-off-by: Bjorn Helgaas <bjorn.helgaas@hp.com>
Signed-off-by: Kenji Kaneshige <kaneshige.kenji@jp.fujitsu.com>
Tested-by: Kenji Kaneshige <kaneshige.kenji@jp.fujitsu.com>
Tested-by: Bjorn Helgaas <bjorn.helgaas@hp.com>
Signed-off-by: Tony Luck <tony.luck@intel.com>

authored by

Kenji Kaneshige and committed by
Tony Luck
09b366b7 3ea6b3d0

+7 -5
+6
arch/ia64/include/asm/hw_irq.h
··· 59 59 extern int ia64_first_device_vector; 60 60 extern int ia64_last_device_vector; 61 61 62 + #if defined(CONFIG_SMP) && (defined(CONFIG_IA64_GENERIC) || defined (CONFIG_IA64_DIG)) 63 + /* Reserve the lower priority vector than device vectors for "move IRQ" IPI */ 64 + #define IA64_IRQ_MOVE_VECTOR 0x30 /* "move IRQ" IPI */ 65 + #define IA64_DEF_FIRST_DEVICE_VECTOR 0x31 66 + #else 62 67 #define IA64_DEF_FIRST_DEVICE_VECTOR 0x30 68 + #endif 63 69 #define IA64_DEF_LAST_DEVICE_VECTOR 0xe7 64 70 #define IA64_FIRST_DEVICE_VECTOR ia64_first_device_vector 65 71 #define IA64_LAST_DEVICE_VECTOR ia64_last_device_vector
+1 -5
arch/ia64/kernel/irq_ia64.c
··· 260 260 } 261 261 262 262 #if defined(CONFIG_SMP) && (defined(CONFIG_IA64_GENERIC) || defined(CONFIG_IA64_DIG)) 263 - #define IA64_IRQ_MOVE_VECTOR IA64_DEF_FIRST_DEVICE_VECTOR 264 263 265 264 static enum vector_domain_type { 266 265 VECTOR_DOMAIN_NONE, ··· 658 659 register_percpu_irq(IA64_SPURIOUS_INT_VECTOR, NULL); 659 660 #ifdef CONFIG_SMP 660 661 #if defined(CONFIG_IA64_GENERIC) || defined(CONFIG_IA64_DIG) 661 - if (vector_domain_type != VECTOR_DOMAIN_NONE) { 662 - BUG_ON(IA64_FIRST_DEVICE_VECTOR != IA64_IRQ_MOVE_VECTOR); 663 - IA64_FIRST_DEVICE_VECTOR++; 662 + if (vector_domain_type != VECTOR_DOMAIN_NONE) 664 663 register_percpu_irq(IA64_IRQ_MOVE_VECTOR, &irq_move_irqaction); 665 - } 666 664 #endif 667 665 #endif 668 666 #ifdef CONFIG_PERFMON