2 * Copyright (C) 2004-2006 Atmel Corporation
4 * Based on arch/i386/kernel/irq.c
5 * Copyright (C) 1992, 1998 Linus Torvalds, Ingo Molnar
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License version 2 as
9 * published by the Free Software Foundation.
12 #include <linux/interrupt.h>
13 #include <linux/irq.h>
14 #include <linux/kernel_stat.h>
15 #include <linux/proc_fs.h>
16 #include <linux/seq_file.h>
17 #include <linux/sysdev.h>
19 /* May be overridden by platform code */
20 int __weak
nmi_enable(void)
25 void __weak
nmi_disable(void)
31 int show_interrupts(struct seq_file
*p
, void *v
)
33 int i
= *(loff_t
*)v
, cpu
;
34 struct irqaction
*action
;
39 for_each_online_cpu(cpu
)
40 seq_printf(p
, "CPU%d ", cpu
);
45 raw_spin_lock_irqsave(&irq_desc
[i
].lock
, flags
);
46 action
= irq_desc
[i
].action
;
50 seq_printf(p
, "%3d: ", i
);
51 for_each_online_cpu(cpu
)
52 seq_printf(p
, "%10u ", kstat_irqs_cpu(i
, cpu
));
53 seq_printf(p
, " %8s", irq_desc
[i
].chip
->name
? : "-");
54 seq_printf(p
, " %s", action
->name
);
55 for (action
= action
->next
; action
; action
= action
->next
)
56 seq_printf(p
, ", %s", action
->name
);
60 raw_spin_unlock_irqrestore(&irq_desc
[i
].lock
, flags
);