]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - arch/blackfin/kernel/irqchip.c
Merge branches 'irq/genirq', 'irq/sparseirq' and 'irq/urgent' into irq/core
[linux-2.6-omap-h63xx.git] / arch / blackfin / kernel / irqchip.c
index 5ad07525ea3fedc0d363f4b681962a5a6931879f..2d395c9005c50e6147d1755a7cc7619a92316e85 100644 (file)
@@ -35,6 +35,7 @@
 #include <linux/interrupt.h>
 #include <linux/irq.h>
 #include <asm/trace.h>
+#include <asm/pda.h>
 
 static atomic_t irq_err_count;
 static spinlock_t irq_controller_lock;
@@ -82,7 +83,7 @@ int show_interrupts(struct seq_file *p, void *v)
                        goto skip;
                seq_printf(p, "%3d: ", i);
                for_each_online_cpu(j)
-                       seq_printf(p, "%10u ", kstat_cpu(j).irqs[i]);
+                       seq_printf(p, "%10u ", kstat_irqs_cpu(i, j));
                seq_printf(p, " %8s", irq_desc[i].chip->name);
                seq_printf(p, "  %s", action->name);
                for (action = action->next; action; action = action->next)
@@ -91,8 +92,13 @@ int show_interrupts(struct seq_file *p, void *v)
                seq_putc(p, '\n');
  skip:
                spin_unlock_irqrestore(&irq_desc[i].lock, flags);
-       } else if (i == NR_IRQS)
+       } else if (i == NR_IRQS) {
+               seq_printf(p, "NMI: ");
+               for_each_online_cpu(j)
+                       seq_printf(p, "%10u ", cpu_pda[j].__nmi_count);
+               seq_printf(p, "     CORE  Non Maskable Interrupt\n");
                seq_printf(p, "Err: %10u\n",  atomic_read(&irq_err_count));
+       }
        return 0;
 }
 
@@ -108,8 +114,9 @@ asmlinkage void asm_do_IRQ(unsigned int irq, struct pt_regs *regs)
 {
        struct pt_regs *old_regs;
        struct irq_desc *desc = irq_desc + irq;
+#ifndef CONFIG_IPIPE
        unsigned short pending, other_ints;
-
+#endif
        old_regs = set_irq_regs(regs);
 
        /*
@@ -120,9 +127,24 @@ asmlinkage void asm_do_IRQ(unsigned int irq, struct pt_regs *regs)
                desc = &bad_irq_desc;
 
        irq_enter();
-
+#ifdef CONFIG_DEBUG_STACKOVERFLOW
+       /* Debugging check for stack overflow: is there less than STACK_WARN free? */
+       {
+               long sp;
+
+               sp = __get_SP() & (THREAD_SIZE-1);
+
+               if (unlikely(sp < (sizeof(struct thread_info) + STACK_WARN))) {
+                       dump_stack();
+                       printk(KERN_EMERG "%s: possible stack overflow while handling irq %i "
+                                       " only %ld bytes free\n",
+                               __func__, irq, sp - sizeof(struct thread_info));
+               }
+       }
+#endif
        generic_handle_irq(irq);
 
+#ifndef CONFIG_IPIPE   /* Useless and bugous over the I-pipe: IRQs are threaded. */
        /* If we're the only interrupt running (ignoring IRQ15 which is for
           syscalls), lower our priority to IRQ14 so that softirqs run at
           that level.  If there's another, lower-level interrupt, irq_exit
@@ -132,6 +154,7 @@ asmlinkage void asm_do_IRQ(unsigned int irq, struct pt_regs *regs)
        other_ints = pending & (pending - 1);
        if (other_ints == 0)
                lower_to_irq14();
+#endif /* !CONFIG_IPIPE */
        irq_exit();
 
        set_irq_regs(old_regs);