summaryrefslogtreecommitdiff
path: root/drivers/irqchip/irq-atmel-aic.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2016-09-18 11:08:00 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2016-09-18 11:08:00 -0700
commitaaed4d0bddaef70640fa8ac0d52a380e2d3c6101 (patch)
tree68cb6ee186a6a96485121eb2270d45ca71b66be8 /drivers/irqchip/irq-atmel-aic.c
parentd4690f1e1cdabb4d61207b6787b1605a0dc0aeab (diff)
parent5eb0d6eb3fac3daa60d9190eed9fa41cf809c756 (diff)
Merge branch 'irq-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
Pull irq fixes from Thomas Gleixner: "Two patches from Boris which address a potential deadlock in the atmel irq chip driver" * 'irq-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: irqchip/atmel-aic: Fix potential deadlock in ->xlate() genirq: Provide irq_gc_{lock_irqsave,unlock_irqrestore}() helpers
Diffstat (limited to 'drivers/irqchip/irq-atmel-aic.c')
-rw-r--r--drivers/irqchip/irq-atmel-aic.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/irqchip/irq-atmel-aic.c b/drivers/irqchip/irq-atmel-aic.c
index 112e17c2768b..37f952dd9fc9 100644
--- a/drivers/irqchip/irq-atmel-aic.c
+++ b/drivers/irqchip/irq-atmel-aic.c
@@ -176,6 +176,7 @@ static int aic_irq_domain_xlate(struct irq_domain *d,
{
struct irq_domain_chip_generic *dgc = d->gc;
struct irq_chip_generic *gc;
+ unsigned long flags;
unsigned smr;
int idx;
int ret;
@@ -194,11 +195,11 @@ static int aic_irq_domain_xlate(struct irq_domain *d,
gc = dgc->gc[idx];
- irq_gc_lock(gc);
+ irq_gc_lock_irqsave(gc, flags);
smr = irq_reg_readl(gc, AT91_AIC_SMR(*out_hwirq));
aic_common_set_priority(intspec[2], &smr);
irq_reg_writel(gc, smr, AT91_AIC_SMR(*out_hwirq));
- irq_gc_unlock(gc);
+ irq_gc_unlock_irqrestore(gc, flags);
return ret;
}