lkml.org 
[lkml]   [2013]   [Mar]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Subject[PATCH 3/3] genirq: Give warning in case calling irq_set_irq_wake with _NO_SUSPEND flag
From
Date

When one irq is setup with flag IRQF_NO_SUSPEND, it is pointless
to call irq_set_irq_wake().

Because check_wakeup_irqs() is just checking the irq which has pending
but is in IRQS_SUSPENDED state when do syscore_suspend().

Signed-off-by: liu chuansheng <chuansheng.liu@intel.com>
---
kernel/irq/manage.c | 8 ++++++++
1 files changed, 8 insertions(+), 0 deletions(-)

diff --git a/kernel/irq/manage.c b/kernel/irq/manage.c
index fa17855..94c5af9 100644
--- a/kernel/irq/manage.c
+++ b/kernel/irq/manage.c
@@ -513,6 +513,14 @@ int irq_set_irq_wake(unsigned int irq, unsigned int on)
if (!desc)
return -EINVAL;

+ /* Checking if the flag IRQF_NO_SUSPEND is set,
+ * if set, drivers do not need to call irq_set_irq_wake(),
+ * it is pointless.
+ */
+ if (!desc->action || (desc->action->flags & IRQF_NO_SUSPEND))
+ WARN(1, "IRQ %d with flag IRQF_NO_SUSPEND, no need to call here\n",
+ irq);
+
/* wakeup-capable irqs can be shared between drivers that
* don't need to have the same sleep mode behaviors.
*/
--
1.7.0.4




\
 
 \ /
  Last update: 2013-03-11 11:44    [W:0.095 / U:0.032 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site