2 * linux/arch/m32r/kernel/irq.c
4 * Copyright (c) 2003, 2004 Hitoshi Yamamoto
5 * Copyright (c) 2004 Hirokazu Takata <takata at linux-m32r.org>
9 * linux/arch/i386/kernel/irq.c
11 * Copyright (C) 1992, 1998 Linus Torvalds, Ingo Molnar
13 * This file contains the lowest level m32r-specific interrupt
14 * entry and irq statistics code. All the remaining irq logic is
15 * done by the generic kernel/irq/ code and in the
16 * m32r-specific irq controller code.
19 #include <linux/kernel_stat.h>
20 #include <linux/interrupt.h>
21 #include <linux/seq_file.h>
22 #include <linux/module.h>
23 #include <asm/uaccess.h>
25 atomic_t irq_err_count
;
26 atomic_t irq_mis_count
;
29 * Generic, controller-independent functions:
32 int show_interrupts(struct seq_file
*p
, void *v
)
34 int i
= *(loff_t
*) v
, j
;
35 struct irqaction
* action
;
40 for (j
=0; j
<NR_CPUS
; j
++)
42 seq_printf(p
, "CPU%d ",j
);
47 spin_lock_irqsave(&irq_desc
[i
].lock
, flags
);
48 action
= irq_desc
[i
].action
;
51 seq_printf(p
, "%3d: ",i
);
53 seq_printf(p
, "%10u ", kstat_irqs(i
));
55 for (j
= 0; j
< NR_CPUS
; j
++)
57 seq_printf(p
, "%10u ", kstat_cpu(j
).irqs
[i
]);
59 seq_printf(p
, " %14s", irq_desc
[i
].handler
->typename
);
60 seq_printf(p
, " %s", action
->name
);
62 for (action
=action
->next
; action
; action
= action
->next
)
63 seq_printf(p
, ", %s", action
->name
);
67 spin_unlock_irqrestore(&irq_desc
[i
].lock
, flags
);
68 } else if (i
== NR_IRQS
) {
69 seq_printf(p
, "ERR: %10u\n", atomic_read(&irq_err_count
));
70 seq_printf(p
, "MIS: %10u\n", atomic_read(&irq_mis_count
));
76 * do_IRQ handles all normal device IRQ's (the special
77 * SMP cross-CPU interrupts have their own specific
80 asmlinkage
unsigned int do_IRQ(int irq
, struct pt_regs
*regs
)
84 #ifdef CONFIG_DEBUG_STACKOVERFLOW