aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm
diff options
context:
space:
mode:
authorRussell King <rmk@dyn-67.arm.linux.org.uk>2008-05-07 16:54:02 -0400
committerRussell King <rmk+kernel@arm.linux.org.uk>2008-05-07 16:55:01 -0400
commitd9cadb0d2ffed847851945a66e80d0b9d767611c (patch)
treee4794d3e8bfc554d6659948344350b5b84a937d8 /arch/arm
parent592eb9997dc89cd0c8f89a505e5348bbddce70f6 (diff)
parent21f20b69a567ca8971fe643d2ebe5d680c9b43af (diff)
Merge branch 'irq-fix' of git://www.modarm9.com/gitsrc/pub/people/ukleinek/linux-2.6.git
Diffstat (limited to 'arch/arm')
-rw-r--r--arch/arm/mach-ns9xxx/irq.c22
1 files changed, 15 insertions, 7 deletions
diff --git a/arch/arm/mach-ns9xxx/irq.c b/arch/arm/mach-ns9xxx/irq.c
index 36e5835e6097..ca85d24cf39f 100644
--- a/arch/arm/mach-ns9xxx/irq.c
+++ b/arch/arm/mach-ns9xxx/irq.c
@@ -62,7 +62,7 @@ static struct irq_chip ns9xxx_chip = {
62#if 0 62#if 0
63#define handle_irq handle_level_irq 63#define handle_irq handle_level_irq
64#else 64#else
65void handle_prio_irq(unsigned int irq, struct irq_desc *desc) 65static void handle_prio_irq(unsigned int irq, struct irq_desc *desc)
66{ 66{
67 unsigned int cpu = smp_processor_id(); 67 unsigned int cpu = smp_processor_id();
68 struct irqaction *action; 68 struct irqaction *action;
@@ -70,27 +70,35 @@ void handle_prio_irq(unsigned int irq, struct irq_desc *desc)
70 70
71 spin_lock(&desc->lock); 71 spin_lock(&desc->lock);
72 72
73 if (unlikely(desc->status & IRQ_INPROGRESS)) 73 BUG_ON(desc->status & IRQ_INPROGRESS);
74 goto out_unlock;
75 74
76 desc->status &= ~(IRQ_REPLAY | IRQ_WAITING); 75 desc->status &= ~(IRQ_REPLAY | IRQ_WAITING);
77 kstat_cpu(cpu).irqs[irq]++; 76 kstat_cpu(cpu).irqs[irq]++;
78 77
79 action = desc->action; 78 action = desc->action;
80 if (unlikely(!action || (desc->status & IRQ_DISABLED))) 79 if (unlikely(!action || (desc->status & IRQ_DISABLED)))
81 goto out_unlock; 80 goto out_mask;
82 81
83 desc->status |= IRQ_INPROGRESS; 82 desc->status |= IRQ_INPROGRESS;
84 spin_unlock(&desc->lock); 83 spin_unlock(&desc->lock);
85 84
86 action_ret = handle_IRQ_event(irq, action); 85 action_ret = handle_IRQ_event(irq, action);
87 86
87 /* XXX: There is no direct way to access noirqdebug, so check
88 * unconditionally for spurious irqs...
89 * Maybe this function should go to kernel/irq/chip.c? */
90 note_interrupt(irq, desc, action_ret);
91
88 spin_lock(&desc->lock); 92 spin_lock(&desc->lock);
89 desc->status &= ~IRQ_INPROGRESS; 93 desc->status &= ~IRQ_INPROGRESS;
90 if (!(desc->status & IRQ_DISABLED) && desc->chip->ack)
91 desc->chip->ack(irq);
92 94
93out_unlock: 95 if (desc->status & IRQ_DISABLED)
96out_mask:
97 desc->chip->mask(irq);
98
99 /* ack unconditionally to unmask lower prio irqs */
100 desc->chip->ack(irq);
101
94 spin_unlock(&desc->lock); 102 spin_unlock(&desc->lock);
95} 103}
96#define handle_irq handle_prio_irq 104#define handle_irq handle_prio_irq