x86: add debug info for 32bit sparse_irq
authorYinghai Lu <yhlu.kernel@gmail.com>
Wed, 20 Aug 2008 03:50:32 +0000 (20:50 -0700)
committerIngo Molnar <mingo@elte.hu>
Thu, 16 Oct 2008 14:52:53 +0000 (16:52 +0200)
so could figure out bugs where we get an interrupt, but vector_irq is
not initialized yet.

Signed-off-by: Yinghai Lu <yhlu.kernel@gmail.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
arch/x86/kernel/io_apic_32.c
arch/x86/kernel/io_apic_64.c
arch/x86/kernel/irq_32.c

index ea33d3c74970d360ccd2dbed949787650051876c..3001924bdd36fa10540b08d2e8016b49b95e7872 100644 (file)
@@ -1114,8 +1114,12 @@ next:
                         cfg->move_in_progress = 1;
                         cfg->old_domain = cfg->domain;
                 }
                         cfg->move_in_progress = 1;
                         cfg->old_domain = cfg->domain;
                 }
-                for_each_cpu_mask_nr(new_cpu, new_mask)
-                        per_cpu(vector_irq, new_cpu)[vector] = irq;
+               printk(KERN_DEBUG "assign_irq_vector: irq %d vector %#x cpu ", irq, vector);
+               for_each_cpu_mask_nr(new_cpu, new_mask) {
+                       per_cpu(vector_irq, new_cpu)[vector] = irq;
+                       printk(KERN_CONT " %d ", new_cpu);
+               }
+               printk(KERN_CONT "\n");
                 cfg->vector = vector;
                 cfg->domain = domain;
                 return 0;
                 cfg->vector = vector;
                 cfg->domain = domain;
                 return 0;
index b0d4abc55a11ccaa99888710dc2c6dd4770bf23c..30d2e38113135a3a027093bab1260fa8f3d78a18 100644 (file)
@@ -1394,6 +1394,8 @@ __apicdebuginit(void) print_IO_APIC(void)
        printk(KERN_DEBUG "IO APIC #%d......\n", mp_ioapics[apic].mp_apicid);
        printk(KERN_DEBUG ".... register #00: %08X\n", reg_00.raw);
        printk(KERN_DEBUG ".......    : physical APIC id: %02X\n", reg_00.bits.ID);
        printk(KERN_DEBUG "IO APIC #%d......\n", mp_ioapics[apic].mp_apicid);
        printk(KERN_DEBUG ".... register #00: %08X\n", reg_00.raw);
        printk(KERN_DEBUG ".......    : physical APIC id: %02X\n", reg_00.bits.ID);
+       printk(KERN_DEBUG ".......    : Delivery Type: %X\n", reg_00.bits.delivery_type);
+       printk(KERN_DEBUG ".......    : LTS          : %X\n", reg_00.bits.LTS);
 
        printk(KERN_DEBUG ".... register #01: %08X\n", *(int *)&reg_01);
        printk(KERN_DEBUG ".......     : max redirection entries: %04X\n", reg_01.bits.entries);
 
        printk(KERN_DEBUG ".... register #01: %08X\n", *(int *)&reg_01);
        printk(KERN_DEBUG ".......     : max redirection entries: %04X\n", reg_01.bits.entries);
index b51ffdcfa31a48dfefc52c7049f5814db511c80a..cc929f2f84f1d36312e3d926faf4c47f5fc56b1e 100644 (file)
@@ -237,8 +237,8 @@ unsigned int do_IRQ(struct pt_regs *regs)
 
        desc = irq_to_desc(irq);
        if (unlikely(!desc)) {
 
        desc = irq_to_desc(irq);
        if (unlikely(!desc)) {
-               printk(KERN_EMERG "%s: cannot handle IRQ %d vector %#x\n",
-                                       __func__, irq, vector);
+               printk(KERN_EMERG "%s: cannot handle IRQ %d vector %#x cpu %d\n",
+                                       __func__, irq, vector, smp_processor_id());
                BUG();
        }
 
                BUG();
        }