diff options
author | Thomas Gleixner <tglx@linutronix.de> | 2014-08-29 07:54:09 -0400 |
---|---|---|
committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2014-09-01 07:48:51 -0400 |
commit | b76f16748fa61801b1a1fd3ffb6f25ee228a35e0 (patch) | |
tree | 50303dcc7296e35d0f382ee97ddf78d8df28b785 /kernel/irq | |
parent | c7bd3ec0531aa636ad57ed9f27e637cbd247e64a (diff) |
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.c | 5 |
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) | |||
54 | if (!desc->action || desc->no_suspend_depth) | 54 | if (!desc->action || desc->no_suspend_depth) |
55 | return false; | 55 | return false; |
56 | 56 | ||
57 | if (irqd_is_wakeup_set(&desc->irq_data)) | ||
58 | irqd_set(&desc->irq_data, IRQD_WAKEUP_ARMED); | ||
59 | |||
57 | desc->istate |= IRQS_SUSPENDED; | 60 | desc->istate |= IRQS_SUSPENDED; |
58 | __disable_irq(desc, irq); | 61 | __disable_irq(desc, irq); |
59 | 62 | ||
@@ -101,6 +104,8 @@ EXPORT_SYMBOL_GPL(suspend_device_irqs); | |||
101 | 104 | ||
102 | static void resume_irq(struct irq_desc *desc, int irq) | 105 | static void resume_irq(struct irq_desc *desc, int irq) |
103 | { | 106 | { |
107 | irqd_clear(&desc->irq_data, IRQD_WAKEUP_ARMED); | ||
108 | |||
104 | if (desc->istate & IRQS_SUSPENDED) | 109 | if (desc->istate & IRQS_SUSPENDED) |
105 | goto resume; | 110 | goto resume; |
106 | 111 | ||