summaryrefslogtreecommitdiffstats
path: root/kernel/irq
diff options
context:
space:
mode:
authorThomas Gleixner <tglx@linutronix.de>2014-08-28 16:49:43 +0200
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2014-09-01 13:48:21 +0200
commit092fadd59b50208f6859f89dd7ea84e03955b544 (patch)
tree7266c77f62a4e69d93ba110d14f7e3e76df1071d /kernel/irq
parentgenirq: Make use of pm misfeature accounting (diff)
downloadlinux-092fadd59b50208f6859f89dd7ea84e03955b544.tar.xz
linux-092fadd59b50208f6859f89dd7ea84e03955b544.zip
genirq: Move MASK_ON_SUSPEND handling into suspend_device_irqs()
There is no reason why we should delay the masking of interrupts whose interrupt chip requests MASK_ON_SUSPEND to the point where we check the wakeup interrupts. We can do it right at the point where we mark the interrupt as suspended. Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'kernel/irq')
-rw-r--r--kernel/irq/pm.c21
1 files changed, 9 insertions, 12 deletions
diff --git a/kernel/irq/pm.c b/kernel/irq/pm.c
index 74ca6bb541d5..a21b3dc9825a 100644
--- a/kernel/irq/pm.c
+++ b/kernel/irq/pm.c
@@ -56,6 +56,15 @@ static void suspend_device_irq(struct irq_desc *desc, int irq)
desc->istate |= IRQS_SUSPENDED;
__disable_irq(desc, irq);
+
+ /*
+ * Hardware which has no wakeup source configuration facility
+ * requires that the non wakeup interrupts are masked at the
+ * chip level. The chip implementation indicates that with
+ * IRQCHIP_MASK_ON_SUSPEND.
+ */
+ if (irq_desc_get_chip(desc)->flags & IRQCHIP_MASK_ON_SUSPEND)
+ mask_irq(desc);
}
/**
@@ -176,19 +185,7 @@ int check_wakeup_irqs(void)
if (irqd_is_wakeup_set(&desc->irq_data)) {
if (desc->depth == 1 && desc->istate & IRQS_PENDING)
return -EBUSY;
- continue;
}
- /*
- * Check the non wakeup interrupts whether they need
- * to be masked before finally going into suspend
- * state. That's for hardware which has no wakeup
- * source configuration facility. The chip
- * implementation indicates that with
- * IRQCHIP_MASK_ON_SUSPEND.
- */
- if (desc->istate & IRQS_SUSPENDED &&
- irq_desc_get_chip(desc)->flags & IRQCHIP_MASK_ON_SUSPEND)
- mask_irq(desc);
}
return 0;