[IA64] assign_irq_vector() should not panic
commit3b5cc09033f49d004006acf44e5b05036bd46a85
authorKenji Kaneshige <kaneshige.kenji@jp.fujitsu.com>
Mon, 11 Jul 2005 04:49:00 +0000 (10 21:49 -0700)
committerTony Luck <tony.luck@intel.com>
Mon, 11 Jul 2005 17:30:07 +0000 (11 10:30 -0700)
treedcae13f5768234fe59736e877885ee6d8b4fc0fc
parent699139279d29e36e39d353b0536b510dab2e5ffa
[IA64] assign_irq_vector() should not panic

Current assign_irq_vector() will panic if interrupt vectors is running
out. But I think how to handle the case of lack of interrupt vectors
should be handled by the caller of this function. For example, some
PCI devices can raise the interrupt signal via both MSI and I/O
APIC. So even if the driver for these device fails to allocate a
vector for MSI, the driver still has a chance to use I/O APIC based
interrupt. But currently there is no chance for these driver to use
I/O APIC based interrupt because kernel will panic when
assign_irq_vector() fails to allocate interrupt vector.

The following patch changes assign_irq_vector() for ia64 to return
-ENOSPC on error instead of panic (as i386 and x86_64 versions do).

Signed-off-by: Kenji Kaneshige <kaneshige.kenji@jp.fujitsu.com>
Signed-off-by: Tony Luck <tony.luck@intel.com>
arch/ia64/hp/sim/simeth.c
arch/ia64/hp/sim/simserial.c
arch/ia64/kernel/iosapic.c
arch/ia64/kernel/irq_ia64.c
include/asm-ia64/hw_irq.h