summaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-ns9xxx/irq.c
diff options
context:
space:
mode:
authorUwe Kleine-König <Uwe.Kleine-Koenig@digi.com>2008-04-25 15:03:18 +0200
committerUwe Kleine-König <Uwe.Kleine-Koenig@digi.com>2008-04-25 15:45:08 +0200
commita13c81952444d032ad3b5b7027b330150dbe2408 (patch)
tree64192f50fdb19adb8dd5b2705daf6029578b8faf /arch/arm/mach-ns9xxx/irq.c
parent5e69b945f20aec17bf057acbb61b6682461e7149 (diff)
downloadop-kernel-dev-a13c81952444d032ad3b5b7027b330150dbe2408.zip
op-kernel-dev-a13c81952444d032ad3b5b7027b330150dbe2408.tar.gz
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/irq.c')
-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 7ddc8fd..ba7a9e4 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)
spin_lock(&desc->lock);
- if (unlikely(desc->status & IRQ_INPROGRESS))
- goto out_unlock;
+ BUG_ON(desc->status & IRQ_INPROGRESS);
desc->status &= ~(IRQ_REPLAY | IRQ_WAITING);
kstat_cpu(cpu).irqs[irq]++;
action = desc->action;
if (unlikely(!action || (desc->status & IRQ_DISABLED)))
- goto out_unlock;
+ goto out_mask;
desc->status |= IRQ_INPROGRESS;
spin_unlock(&desc->lock);
@@ -81,10 +80,14 @@ void handle_prio_irq(unsigned int irq, struct irq_desc *desc)
spin_lock(&desc->lock);
desc->status &= ~IRQ_INPROGRESS;
- if (!(desc->status & IRQ_DISABLED) && desc->chip->ack)
- desc->chip->ack(irq);
-out_unlock:
+ if (desc->status & IRQ_DISABLED)
+out_mask:
+ desc->chip->mask(irq);
+
+ /* ack unconditionally to unmask lower prio irqs */
+ desc->chip->ack(irq);
+
spin_unlock(&desc->lock);
}
#define handle_irq handle_prio_irq
OpenPOWER on IntegriCloud