summaryrefslogtreecommitdiffstats
path: root/arch/x86/kernel/io_apic_64.c
diff options
context:
space:
mode:
authorYinghai Lu <yhlu.kernel@gmail.com>2008-08-20 05:50:17 +0200
committerIngo Molnar <mingo@elte.hu>2008-10-16 16:52:51 +0200
commitcb5bc83225a86ca53bbb889ed8439e4fd6cf44ac (patch)
treed2c43413adbc86562ab63498e3ce14e36ba253ed /arch/x86/kernel/io_apic_64.c
parentx86: check with without_new in show_interrupts (diff)
downloadlinux-cb5bc83225a86ca53bbb889ed8439e4fd6cf44ac.tar.xz
linux-cb5bc83225a86ca53bbb889ed8439e4fd6cf44ac.zip
x86_64: rename irq_desc/irq_desc_alloc
change names: irq_desc() ==> irq_desc_alloc __irq_desc() ==> irq_desc Also split a few of the uses in lowlevel x86 code. v2: need to check if desc is null in smp_irq_move_cleanup Signed-off-by: Yinghai Lu <yhlu.kernel@gmail.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'arch/x86/kernel/io_apic_64.c')
-rw-r--r--arch/x86/kernel/io_apic_64.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/arch/x86/kernel/io_apic_64.c b/arch/x86/kernel/io_apic_64.c
index 1b8cccb5ba25..a054db9ef190 100644
--- a/arch/x86/kernel/io_apic_64.c
+++ b/arch/x86/kernel/io_apic_64.c
@@ -1124,7 +1124,12 @@ static void ioapic_register_intr(int irq, unsigned long trigger)
{
struct irq_desc *desc;
- desc = irq_to_desc(irq);
+ /* first time to use this irq_desc */
+ if (irq < 16)
+ desc = irq_to_desc(irq);
+ else
+ desc = irq_to_desc_alloc(irq);
+
if (trigger)
desc->status |= IRQ_LEVEL;
else
@@ -1919,6 +1924,9 @@ asmlinkage void smp_irq_move_cleanup_interrupt(void)
irq = __get_cpu_var(vector_irq)[vector];
desc = irq_to_desc(irq);
+ if (!desc)
+ continue;
+
cfg = irq_cfg(irq);
spin_lock(&desc->lock);
if (!cfg->move_cleanup_count)