public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [REPOST PATCH V2] irq: enable all irqs unconditionally in irq_resume
@ 2013-11-25 14:09 Laxman Dewangan
  2013-11-25 21:28 ` [tip:irq/urgent] irq: Enable " tip-bot for Laxman Dewangan
  2013-12-05 10:49 ` [REPOST PATCH V2] irq: enable " Laxman Dewangan
  0 siblings, 2 replies; 5+ messages in thread
From: Laxman Dewangan @ 2013-11-25 14:09 UTC (permalink / raw)
  To: tglx
  Cc: linux-kernel, ian.campbell, rjw, len.brown, gregkh, linux-pm,
	heiko, pavel, Laxman Dewangan

When system enters into suspend, it disable all irqs in single
function call. This disables EARLY_RESUME irqs also along with
normal irqs.

The EARLY_RESUME irqs get enabled in sys_core_ops->resume and
non-EARLY_RESUME irqs get enabled in normal system resume path.

When suspend_noirq failed or suspend is aborted for any reason,
the EARLY_RESUME irqs do not get enabled as sys_core_ops->resume()
call did not happen. It only enables the non-EARLY_RESUME irqs in normal
disable for remaining life of system.

Enable all irqs unconditionally in normal irq_resume() regardless of
EARLY_RESUME irqs have been already enabled or not.

Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Acked-by-and-tested-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Acked-by: Heiko Stuebner <heiko@sntech.de>
Reviewed-by: Pavel Machek <pavel@ucw.cz>

---
Creating this patch based on disucssion on patch
 [PATCH] irq: enable suspended EARLY_RESUME irqs forcefully if not resumed

Making simple change as susggested by Thomas.

Reposting it with ack and review.

 kernel/irq/pm.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/kernel/irq/pm.c b/kernel/irq/pm.c
index cb228bf..abcd6ca 100644
--- a/kernel/irq/pm.c
+++ b/kernel/irq/pm.c
@@ -50,7 +50,7 @@ static void resume_irqs(bool want_early)
 		bool is_early = desc->action &&
 			desc->action->flags & IRQF_EARLY_RESUME;
 
-		if (is_early != want_early)
+		if (!is_early && want_early)
 			continue;
 
 		raw_spin_lock_irqsave(&desc->lock, flags);
-- 
1.7.1.1


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

* [tip:irq/urgent] irq: Enable all irqs unconditionally in irq_resume
  2013-11-25 14:09 [REPOST PATCH V2] irq: enable all irqs unconditionally in irq_resume Laxman Dewangan
@ 2013-11-25 21:28 ` tip-bot for Laxman Dewangan
  2013-12-05 10:49 ` [REPOST PATCH V2] irq: enable " Laxman Dewangan
  1 sibling, 0 replies; 5+ messages in thread
From: tip-bot for Laxman Dewangan @ 2013-11-25 21:28 UTC (permalink / raw)
  To: linux-tip-commits
  Cc: linux-kernel, heiko, hpa, mingo, konrad.wilk, ian.campbell, pavel,
	gregkh, ldewangan, rjw, tglx, len.brown

Commit-ID:  ac01810c9d2814238f08a227062e66a35a0e1ea2
Gitweb:     http://git.kernel.org/tip/ac01810c9d2814238f08a227062e66a35a0e1ea2
Author:     Laxman Dewangan <ldewangan@nvidia.com>
AuthorDate: Mon, 25 Nov 2013 19:39:47 +0530
Committer:  Thomas Gleixner <tglx@linutronix.de>
CommitDate: Mon, 25 Nov 2013 22:20:02 +0100

irq: Enable all irqs unconditionally in irq_resume

When the system enters suspend, it disables all interrupts in
suspend_device_irqs(), including the interrupts marked EARLY_RESUME.

On the resume side things are different. The EARLY_RESUME interrupts
are reenabled in sys_core_ops->resume and the non EARLY_RESUME
interrupts are reenabled in the normal system resume path.

When suspend_noirq() failed or suspend is aborted for any other
reason, we might omit the resume side call to sys_core_ops->resume()
and therefor the interrupts marked EARLY_RESUME are not reenabled and
stay disabled forever.

To solve this, enable all irqs unconditionally in irq_resume()
regardless whether interrupts marked EARLY_RESUMEhave been already
enabled or not.

This might try to reenable already enabled interrupts in the non
failure case, but the only affected platform is XEN and it has been
confirmed that it does not cause any side effects.

[ tglx: Massaged changelog. ]

Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Acked-by-and-tested-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Acked-by: Heiko Stuebner <heiko@sntech.de>
Reviewed-by: Pavel Machek <pavel@ucw.cz>
Cc: <ian.campbell@citrix.com>
Cc: <rjw@rjwysocki.net>
Cc: <len.brown@intel.com>
Cc: <gregkh@linuxfoundation.org>
Cc: stable@vger.kernel.org
Link: http://lkml.kernel.org/r/1385388587-16442-1-git-send-email-ldewangan@nvidia.com
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
---
 kernel/irq/pm.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/kernel/irq/pm.c b/kernel/irq/pm.c
index cb228bf..abcd6ca 100644
--- a/kernel/irq/pm.c
+++ b/kernel/irq/pm.c
@@ -50,7 +50,7 @@ static void resume_irqs(bool want_early)
 		bool is_early = desc->action &&
 			desc->action->flags & IRQF_EARLY_RESUME;
 
-		if (is_early != want_early)
+		if (!is_early && want_early)
 			continue;
 
 		raw_spin_lock_irqsave(&desc->lock, flags);

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

* Re: [REPOST PATCH V2] irq: enable all irqs unconditionally in irq_resume
  2013-11-25 14:09 [REPOST PATCH V2] irq: enable all irqs unconditionally in irq_resume Laxman Dewangan
  2013-11-25 21:28 ` [tip:irq/urgent] irq: Enable " tip-bot for Laxman Dewangan
@ 2013-12-05 10:49 ` Laxman Dewangan
  2013-12-05 11:01   ` Heiko Stübner
  1 sibling, 1 reply; 5+ messages in thread
From: Laxman Dewangan @ 2013-12-05 10:49 UTC (permalink / raw)
  To: Laxman Dewangan
  Cc: tglx@linutronix.de, linux-kernel@vger.kernel.org,
	ian.campbell@citrix.com, rjw@rjwysocki.net, len.brown@intel.com,
	gregkh@linuxfoundation.org, linux-pm@vger.kernel.org,
	heiko@sntech.de, pavel@ucw.cz, Stephen Warren, Rafael J. Wysocki

Hi Thomas,

On Monday 25 November 2013 07:39 PM, Laxman Dewangan wrote:
> When system enters into suspend, it disable all irqs in single
> function call. This disables EARLY_RESUME irqs also along with
> normal irqs.
>
> The EARLY_RESUME irqs get enabled in sys_core_ops->resume and
> non-EARLY_RESUME irqs get enabled in normal system resume path.
>
> When suspend_noirq failed or suspend is aborted for any reason,
> the EARLY_RESUME irqs do not get enabled as sys_core_ops->resume()
> call did not happen. It only enables the non-EARLY_RESUME irqs in normal
> disable for remaining life of system.
>
> Enable all irqs unconditionally in normal irq_resume() regardless of
> EARLY_RESUME irqs have been already enabled or not.
>
> Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
> Acked-by-and-tested-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
> Acked-by: Heiko Stuebner <heiko@sntech.de>
> Reviewed-by: Pavel Machek <pavel@ucw.cz>
>

Can you please review this patch?
This patch is pending from long back for review.

Thanks,
Laxman


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

* Re: [REPOST PATCH V2] irq: enable all irqs unconditionally in irq_resume
  2013-12-05 10:49 ` [REPOST PATCH V2] irq: enable " Laxman Dewangan
@ 2013-12-05 11:01   ` Heiko Stübner
  2013-12-05 11:07     ` Laxman Dewangan
  0 siblings, 1 reply; 5+ messages in thread
From: Heiko Stübner @ 2013-12-05 11:01 UTC (permalink / raw)
  To: Laxman Dewangan
  Cc: tglx@linutronix.de, linux-kernel@vger.kernel.org,
	ian.campbell@citrix.com, rjw@rjwysocki.net, len.brown@intel.com,
	gregkh@linuxfoundation.org, linux-pm@vger.kernel.org,
	pavel@ucw.cz, Stephen Warren

Hi Laxman,

Am Donnerstag, 5. Dezember 2013, 11:49:05 schrieb Laxman Dewangan:
> Can you please review this patch?
> This patch is pending from long back for review.

the patch already made it into the appropriate tree, as can be seen by tip-bot
message and on [0].


Heiko

[0] http://git.kernel.org/cgit/linux/kernel/git/tip/tip.git/commit/?h=irq-urgent-for-linus&id=ac01810c9d2814238f08a227062e66a35a0e1ea2

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

* Re: [REPOST PATCH V2] irq: enable all irqs unconditionally in irq_resume
  2013-12-05 11:01   ` Heiko Stübner
@ 2013-12-05 11:07     ` Laxman Dewangan
  0 siblings, 0 replies; 5+ messages in thread
From: Laxman Dewangan @ 2013-12-05 11:07 UTC (permalink / raw)
  To: Heiko Stübner
  Cc: tglx@linutronix.de, linux-kernel@vger.kernel.org,
	ian.campbell@citrix.com, rjw@rjwysocki.net, len.brown@intel.com,
	gregkh@linuxfoundation.org, linux-pm@vger.kernel.org,
	pavel@ucw.cz, Stephen Warren

On Thursday 05 December 2013 04:31 PM, Heiko Stübner wrote:
> Hi Laxman,
>
> Am Donnerstag, 5. Dezember 2013, 11:49:05 schrieb Laxman Dewangan:
>> Can you please review this patch?
>> This patch is pending from long back for review.
> the patch already made it into the appropriate tree, as can be seen by tip-bot
> message and on [0].
>
>
> Heiko
>
> [0] http://git.kernel.org/cgit/linux/kernel/git/tip/tip.git/commit/?h=irq-urgent-for-linus&id=ac01810c9d2814238f08a227062e66a35a0e1ea2

Seems I lost the applied mail and that's why I assumed that it is not 
reviewed yet. My bad, Sorry for  noise.
I can see the change in linux-next also.

Thanks Thomas/Heiko for review.

Thanks,
Laxman




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

end of thread, other threads:[~2013-12-05 11:09 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-11-25 14:09 [REPOST PATCH V2] irq: enable all irqs unconditionally in irq_resume Laxman Dewangan
2013-11-25 21:28 ` [tip:irq/urgent] irq: Enable " tip-bot for Laxman Dewangan
2013-12-05 10:49 ` [REPOST PATCH V2] irq: enable " Laxman Dewangan
2013-12-05 11:01   ` Heiko Stübner
2013-12-05 11:07     ` Laxman Dewangan

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox