summaryrefslogtreecommitdiffstats
path: root/kernel/irq/manage.c
diff options
context:
space:
mode:
authorOlof Johansson <olof@lixom.net>2012-09-05 15:35:48 -0700
committerOlof Johansson <olof@lixom.net>2012-09-05 15:35:48 -0700
commit1875962377574b4edb7b164001e3e341c25290d5 (patch)
tree374a5299403ec21e2d9a66a6548ce876a388b589 /kernel/irq/manage.c
parent5cbee140a28c2746449ae31e85738043ae4da927 (diff)
parentc88a79a7789b2909ad1cf69ea2c9142030bbd6f4 (diff)
downloadop-kernel-dev-1875962377574b4edb7b164001e3e341c25290d5.zip
op-kernel-dev-1875962377574b4edb7b164001e3e341c25290d5.tar.gz
Merge branch 'soc-core' of git://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas into next/dt
* 'soc-core' of git://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas: ARM: mach-shmobile: Add compilation support for dtbs using 'make dtbs' + sync to 3.6-rc3
Diffstat (limited to 'kernel/irq/manage.c')
-rw-r--r--kernel/irq/manage.c15
1 files changed, 14 insertions, 1 deletions
diff --git a/kernel/irq/manage.c b/kernel/irq/manage.c
index 0a8e8f0..4c69326 100644
--- a/kernel/irq/manage.c
+++ b/kernel/irq/manage.c
@@ -944,6 +944,18 @@ __setup_irq(unsigned int irq, struct irq_desc *desc, struct irqaction *new)
}
/*
+ * Drivers are often written to work w/o knowledge about the
+ * underlying irq chip implementation, so a request for a
+ * threaded irq without a primary hard irq context handler
+ * requires the ONESHOT flag to be set. Some irq chips like
+ * MSI based interrupts are per se one shot safe. Check the
+ * chip flags, so we can avoid the unmask dance at the end of
+ * the threaded handler for those.
+ */
+ if (desc->irq_data.chip->flags & IRQCHIP_ONESHOT_SAFE)
+ new->flags &= ~IRQF_ONESHOT;
+
+ /*
* The following block of code has to be executed atomically
*/
raw_spin_lock_irqsave(&desc->lock, flags);
@@ -1017,7 +1029,8 @@ __setup_irq(unsigned int irq, struct irq_desc *desc, struct irqaction *new)
*/
new->thread_mask = 1 << ffz(thread_mask);
- } else if (new->handler == irq_default_primary_handler) {
+ } else if (new->handler == irq_default_primary_handler &&
+ !(desc->irq_data.chip->flags & IRQCHIP_ONESHOT_SAFE)) {
/*
* The interrupt was requested with handler = NULL, so
* we use the default primary handler for it. But it
OpenPOWER on IntegriCloud