diff options
-rw-r--r-- | arch/xtensa/kernel/irq.c | 6 | ||||
-rw-r--r-- | arch/xtensa/kernel/traps.c | 23 |
2 files changed, 9 insertions, 20 deletions
diff --git a/arch/xtensa/kernel/irq.c b/arch/xtensa/kernel/irq.c index ada1e4893dd6..3cef58e28332 100644 --- a/arch/xtensa/kernel/irq.c +++ b/arch/xtensa/kernel/irq.c | |||
@@ -30,7 +30,6 @@ atomic_t irq_err_count; | |||
30 | 30 | ||
31 | asmlinkage void do_IRQ(int hwirq, struct pt_regs *regs) | 31 | asmlinkage void do_IRQ(int hwirq, struct pt_regs *regs) |
32 | { | 32 | { |
33 | struct pt_regs *old_regs = set_irq_regs(regs); | ||
34 | int irq = irq_find_mapping(NULL, hwirq); | 33 | int irq = irq_find_mapping(NULL, hwirq); |
35 | 34 | ||
36 | if (hwirq >= NR_IRQS) { | 35 | if (hwirq >= NR_IRQS) { |
@@ -38,8 +37,6 @@ asmlinkage void do_IRQ(int hwirq, struct pt_regs *regs) | |||
38 | __func__, hwirq); | 37 | __func__, hwirq); |
39 | } | 38 | } |
40 | 39 | ||
41 | irq_enter(); | ||
42 | |||
43 | #ifdef CONFIG_DEBUG_STACKOVERFLOW | 40 | #ifdef CONFIG_DEBUG_STACKOVERFLOW |
44 | /* Debugging check for stack overflow: is there less than 1KB free? */ | 41 | /* Debugging check for stack overflow: is there less than 1KB free? */ |
45 | { | 42 | { |
@@ -54,9 +51,6 @@ asmlinkage void do_IRQ(int hwirq, struct pt_regs *regs) | |||
54 | } | 51 | } |
55 | #endif | 52 | #endif |
56 | generic_handle_irq(irq); | 53 | generic_handle_irq(irq); |
57 | |||
58 | irq_exit(); | ||
59 | set_irq_regs(old_regs); | ||
60 | } | 54 | } |
61 | 55 | ||
62 | int arch_show_interrupts(struct seq_file *p, int prec) | 56 | int arch_show_interrupts(struct seq_file *p, int prec) |
diff --git a/arch/xtensa/kernel/traps.c b/arch/xtensa/kernel/traps.c index 3e8a05c874cd..3dbe8648df1f 100644 --- a/arch/xtensa/kernel/traps.c +++ b/arch/xtensa/kernel/traps.c | |||
@@ -212,6 +212,9 @@ void do_interrupt(struct pt_regs *regs) | |||
212 | XCHAL_INTLEVEL6_MASK, | 212 | XCHAL_INTLEVEL6_MASK, |
213 | XCHAL_INTLEVEL7_MASK, | 213 | XCHAL_INTLEVEL7_MASK, |
214 | }; | 214 | }; |
215 | struct pt_regs *old_regs = set_irq_regs(regs); | ||
216 | |||
217 | irq_enter(); | ||
215 | 218 | ||
216 | for (;;) { | 219 | for (;;) { |
217 | unsigned intread = get_sr(interrupt); | 220 | unsigned intread = get_sr(interrupt); |
@@ -227,21 +230,13 @@ void do_interrupt(struct pt_regs *regs) | |||
227 | } | 230 | } |
228 | 231 | ||
229 | if (level == 0) | 232 | if (level == 0) |
230 | return; | 233 | break; |
231 | 234 | ||
232 | /* | 235 | do_IRQ(__ffs(int_at_level), regs); |
233 | * Clear the interrupt before processing, in case it's | ||
234 | * edge-triggered or software-generated | ||
235 | */ | ||
236 | while (int_at_level) { | ||
237 | unsigned i = __ffs(int_at_level); | ||
238 | unsigned mask = 1 << i; | ||
239 | |||
240 | int_at_level ^= mask; | ||
241 | set_sr(mask, intclear); | ||
242 | do_IRQ(i, regs); | ||
243 | } | ||
244 | } | 236 | } |
237 | |||
238 | irq_exit(); | ||
239 | set_irq_regs(old_regs); | ||
245 | } | 240 | } |
246 | 241 | ||
247 | /* | 242 | /* |