aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-ns9xxx
diff options
context:
space:
mode:
authorUwe Kleine-König <Uwe.Kleine-Koenig@digi.com>2008-04-25 09:03:18 -0400
committerUwe Kleine-König <Uwe.Kleine-Koenig@digi.com>2008-04-25 09:45:08 -0400
commita13c81952444d032ad3b5b7027b330150dbe2408 (patch)
tree64192f50fdb19adb8dd5b2705daf6029578b8faf /arch/arm/mach-ns9xxx
parent5e69b945f20aec17bf057acbb61b6682461e7149 (diff)
ns9xxx: fix handle_prio_irq to unmask irqs with lower priority
When an irq is reported all lower prio irqs are masked until the current irq is acked. So never leave handle_prio_irq without acking. desc->status & IRQ_INPROGRESS should never become true because the current irq is masked until it is acked, too. Signed-off-by: Uwe Kleine-König <Uwe.Kleine-Koenig@digi.com>
Diffstat (limited to 'arch/arm/mach-ns9xxx')
-rw-r--r--arch/arm/mach-ns9xxx/irq.c15
1 files changed, 9 insertions, 6 deletions
diff --git a/arch/arm/mach-ns9xxx/irq.c b/arch/arm/mach-ns9xxx/irq.c
index 7ddc8fde7748..ba7a9e4888f0 100644
--- a/arch/arm/mach-ns9xxx/irq.c
+++ b/arch/arm/mach-ns9xxx/irq.c
@@ -64,15 +64,14 @@ void handle_prio_irq(unsigned int irq, struct irq_desc *desc)
64 64
65 spin_lock(&desc->lock); 65 spin_lock(&desc->lock);
66 66
67 if (unlikely(desc->status & IRQ_INPROGRESS)) 67 BUG_ON(desc->status & IRQ_INPROGRESS);
68 goto out_unlock;
69 68
70 desc->status &= ~(IRQ_REPLAY | IRQ_WAITING); 69 desc->status &= ~(IRQ_REPLAY | IRQ_WAITING);
71 kstat_cpu(cpu).irqs[irq]++; 70 kstat_cpu(cpu).irqs[irq]++;
72 71
73 action = desc->action; 72 action = desc->action;
74 if (unlikely(!action || (desc->status & IRQ_DISABLED))) 73 if (unlikely(!action || (desc->status & IRQ_DISABLED)))
75 goto out_unlock; 74 goto out_mask;
76 75
77 desc->status |= IRQ_INPROGRESS; 76 desc->status |= IRQ_INPROGRESS;
78 spin_unlock(&desc->lock); 77 spin_unlock(&desc->lock);
@@ -81,10 +80,14 @@ void handle_prio_irq(unsigned int irq, struct irq_desc *desc)
81 80
82 spin_lock(&desc->lock); 81 spin_lock(&desc->lock);
83 desc->status &= ~IRQ_INPROGRESS; 82 desc->status &= ~IRQ_INPROGRESS;
84 if (!(desc->status & IRQ_DISABLED) && desc->chip->ack)
85 desc->chip->ack(irq);
86 83
87out_unlock: 84 if (desc->status & IRQ_DISABLED)
85out_mask:
86 desc->chip->mask(irq);
87
88 /* ack unconditionally to unmask lower prio irqs */
89 desc->chip->ack(irq);
90
88 spin_unlock(&desc->lock); 91 spin_unlock(&desc->lock);
89} 92}
90#define handle_irq handle_prio_irq 93#define handle_irq handle_prio_irq