Commit | Line | Data |
---|---|---|
eedbdab9 MS |
1 | /* |
2 | * Copyright (C) 2007-2009 Michal Simek <monstr@monstr.eu> | |
3 | * Copyright (C) 2007-2009 PetaLogix | |
4 | * Copyright (C) 2006 Atmark Techno, Inc. | |
5 | * | |
6 | * This file is subject to the terms and conditions of the GNU General Public | |
7 | * License. See the file "COPYING" in the main directory of this archive | |
8 | * for more details. | |
9 | */ | |
10 | ||
11 | #include <linux/init.h> | |
e6d7961e | 12 | #include <linux/ftrace.h> |
eedbdab9 MS |
13 | #include <linux/kernel.h> |
14 | #include <linux/hardirq.h> | |
15 | #include <linux/interrupt.h> | |
16 | #include <linux/irqflags.h> | |
17 | #include <linux/seq_file.h> | |
18 | #include <linux/kernel_stat.h> | |
19 | #include <linux/irq.h> | |
e3873444 | 20 | #include <linux/of_irq.h> |
66421a64 | 21 | #include <linux/export.h> |
eedbdab9 MS |
22 | |
23 | #include <asm/prom.h> | |
24 | ||
eedbdab9 MS |
25 | static u32 concurrent_irq; |
26 | ||
e6d7961e | 27 | void __irq_entry do_IRQ(struct pt_regs *regs) |
eedbdab9 MS |
28 | { |
29 | unsigned int irq; | |
30 | struct pt_regs *old_regs = set_irq_regs(regs); | |
0d9ec762 | 31 | trace_hardirqs_off(); |
eedbdab9 MS |
32 | |
33 | irq_enter(); | |
2462bacd | 34 | irq = get_irq(); |
eedbdab9 | 35 | next_irq: |
6c7a2676 | 36 | BUG_ON(!irq); |
2462bacd | 37 | generic_handle_irq(irq); |
eedbdab9 | 38 | |
2462bacd GL |
39 | irq = get_irq(); |
40 | if (irq != -1U) { | |
eedbdab9 MS |
41 | pr_debug("next irq: %d\n", irq); |
42 | ++concurrent_irq; | |
43 | goto next_irq; | |
44 | } | |
45 | ||
46 | irq_exit(); | |
47 | set_irq_regs(old_regs); | |
0d9ec762 | 48 | trace_hardirqs_on(); |
eedbdab9 | 49 | } |