linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2] PM: Print pending wakeup IRQ preventing suspend
@ 2014-09-18 23:22 Amit Pundir
  2014-09-19 11:21 ` Pavel Machek
  2014-09-21  0:08 ` Rafael J. Wysocki
  0 siblings, 2 replies; 3+ messages in thread
From: Amit Pundir @ 2014-09-18 23:22 UTC (permalink / raw)
  To: linux-kernel
  Cc: Todd Poynor, Pavel Machek, Thomas Gleixner, Rafael J. Wysocki,
	Len Brown, linux-pm, Android Kernel Team, Amit Pundir

From: Todd Poynor <toddpoynor@google.com>

Currently when a pending wakeup irq stops suspend, it can be difficult
to determine why suspend was prevented and which IRQ was actually
responsible. In order to help debug such situation, this patch prints the
IRQ number and action name of that pending wakeup irq.

Cc: Pavel Machek <pavel@ucw.cz>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Rafael J. Wysocki <rjw@rjwysocki.net>
Cc: Len Brown <len.brown@intel.com>
Cc: linux-pm@vger.kernel.org
Cc: Android Kernel Team <kernel-team@android.com>
Acked-by: Pavel Machek <pavel@ucw.cz>
Signed-off-by: Todd Poynor <toddpoynor@google.com>
[Amit Pundir: Reworded the commit message]
Signed-off-by: Amit Pundir <amit.pundir@linaro.org>
---
Resending this patch assuming that it might have got lost in between merge
window rush last time and now people might have some time to look at it.
 
 kernel/irq/pm.c | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/kernel/irq/pm.c b/kernel/irq/pm.c
index abcd6ca..c2bc8d9 100644
--- a/kernel/irq/pm.c
+++ b/kernel/irq/pm.c
@@ -109,8 +109,13 @@ int check_wakeup_irqs(void)
 		 * can abort suspend.
 		 */
 		if (irqd_is_wakeup_set(&desc->irq_data)) {
-			if (desc->depth == 1 && desc->istate & IRQS_PENDING)
+			if (desc->depth == 1 && desc->istate & IRQS_PENDING) {
+				pr_info("Wakeup IRQ %d %s pending, suspend aborted\n",
+					irq,
+					desc->action && desc->action->name ?
+					desc->action->name : "");
 				return -EBUSY;
+			}
 			continue;
 		}
 		/*
-- 
1.9.1


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH v2] PM: Print pending wakeup IRQ preventing suspend
  2014-09-18 23:22 [PATCH v2] PM: Print pending wakeup IRQ preventing suspend Amit Pundir
@ 2014-09-19 11:21 ` Pavel Machek
  2014-09-21  0:08 ` Rafael J. Wysocki
  1 sibling, 0 replies; 3+ messages in thread
From: Pavel Machek @ 2014-09-19 11:21 UTC (permalink / raw)
  To: Amit Pundir
  Cc: linux-kernel, Todd Poynor, Thomas Gleixner, Rafael J. Wysocki,
	Len Brown, linux-pm, Android Kernel Team

On Fri 2014-09-19 04:52:35, Amit Pundir wrote:
> From: Todd Poynor <toddpoynor@google.com>
> 
> Currently when a pending wakeup irq stops suspend, it can be difficult
> to determine why suspend was prevented and which IRQ was actually
> responsible. In order to help debug such situation, this patch prints the
> IRQ number and action name of that pending wakeup irq.
> 

Acked-by: Pavel Machek <pavel@ucw.cz>
-- 
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH v2] PM: Print pending wakeup IRQ preventing suspend
  2014-09-18 23:22 [PATCH v2] PM: Print pending wakeup IRQ preventing suspend Amit Pundir
  2014-09-19 11:21 ` Pavel Machek
@ 2014-09-21  0:08 ` Rafael J. Wysocki
  1 sibling, 0 replies; 3+ messages in thread
From: Rafael J. Wysocki @ 2014-09-21  0:08 UTC (permalink / raw)
  To: Amit Pundir
  Cc: linux-kernel, Todd Poynor, Pavel Machek, Thomas Gleixner,
	Len Brown, linux-pm, Android Kernel Team

On Friday, September 19, 2014 04:52:35 AM Amit Pundir wrote:
> From: Todd Poynor <toddpoynor@google.com>
> 
> Currently when a pending wakeup irq stops suspend, it can be difficult
> to determine why suspend was prevented and which IRQ was actually
> responsible. In order to help debug such situation, this patch prints the
> IRQ number and action name of that pending wakeup irq.
> 
> Cc: Pavel Machek <pavel@ucw.cz>
> Cc: Thomas Gleixner <tglx@linutronix.de>
> Cc: Rafael J. Wysocki <rjw@rjwysocki.net>
> Cc: Len Brown <len.brown@intel.com>
> Cc: linux-pm@vger.kernel.org
> Cc: Android Kernel Team <kernel-team@android.com>
> Acked-by: Pavel Machek <pavel@ucw.cz>
> Signed-off-by: Todd Poynor <toddpoynor@google.com>
> [Amit Pundir: Reworded the commit message]
> Signed-off-by: Amit Pundir <amit.pundir@linaro.org>
> ---
> Resending this patch assuming that it might have got lost in between merge
> window rush last time and now people might have some time to look at it.
>  
>  kernel/irq/pm.c | 7 ++++++-
>  1 file changed, 6 insertions(+), 1 deletion(-)
> 
> diff --git a/kernel/irq/pm.c b/kernel/irq/pm.c
> index abcd6ca..c2bc8d9 100644
> --- a/kernel/irq/pm.c
> +++ b/kernel/irq/pm.c
> @@ -109,8 +109,13 @@ int check_wakeup_irqs(void)

check_wakeup_irqs() is going away in 3.18, please see linux-next (or the
pm-genirq branch of linux-pm.git) for details.

>  		 * can abort suspend.
>  		 */
>  		if (irqd_is_wakeup_set(&desc->irq_data)) {
> -			if (desc->depth == 1 && desc->istate & IRQS_PENDING)
> +			if (desc->depth == 1 && desc->istate & IRQS_PENDING) {
> +				pr_info("Wakeup IRQ %d %s pending, suspend aborted\n",
> +					irq,
> +					desc->action && desc->action->name ?
> +					desc->action->name : "");
>  				return -EBUSY;
> +			}
>  			continue;
>  		}
>  		/*
> 

-- 
I speak only for myself.
Rafael J. Wysocki, Intel Open Source Technology Center.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2014-09-20 23:49 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-09-18 23:22 [PATCH v2] PM: Print pending wakeup IRQ preventing suspend Amit Pundir
2014-09-19 11:21 ` Pavel Machek
2014-09-21  0:08 ` Rafael J. Wysocki

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).