summaryrefslogtreecommitdiffstats
path: root/kernel/irq
diff options
context:
space:
mode:
authorThomas Gleixner <tglx@linutronix.de>2014-08-29 13:54:09 +0200
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2014-09-01 13:48:51 +0200
commitb76f16748fa61801b1a1fd3ffb6f25ee228a35e0 (patch)
tree50303dcc7296e35d0f382ee97ddf78d8df28b785 /kernel/irq
parentc7bd3ec0531aa636ad57ed9f27e637cbd247e64a (diff)
downloadlinux-stable-b76f16748fa61801b1a1fd3ffb6f25ee228a35e0.tar.gz
linux-stable-b76f16748fa61801b1a1fd3ffb6f25ee228a35e0.tar.bz2
linux-stable-b76f16748fa61801b1a1fd3ffb6f25ee228a35e0.zip
genirq: Mark wakeup sources as armed on suspend
This allows us to utilize this information in the irq_may_run() check without adding another conditional to the fast path. 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.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/kernel/irq/pm.c b/kernel/irq/pm.c
index cf0ce0163db9..766930eaeed9 100644
--- a/kernel/irq/pm.c
+++ b/kernel/irq/pm.c
@@ -54,6 +54,9 @@ static bool suspend_device_irq(struct irq_desc *desc, int irq)
if (!desc->action || desc->no_suspend_depth)
return false;
+ if (irqd_is_wakeup_set(&desc->irq_data))
+ irqd_set(&desc->irq_data, IRQD_WAKEUP_ARMED);
+
desc->istate |= IRQS_SUSPENDED;
__disable_irq(desc, irq);
@@ -101,6 +104,8 @@ EXPORT_SYMBOL_GPL(suspend_device_irqs);
static void resume_irq(struct irq_desc *desc, int irq)
{
+ irqd_clear(&desc->irq_data, IRQD_WAKEUP_ARMED);
+
if (desc->istate & IRQS_SUSPENDED)
goto resume;