irq: enable all irqs unconditionally in irq_resume
PATCH v2 1/1 irq: enable all irqs unconditionally in irq_resume
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.
---
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(-)
kernel/irq/pm.c +1 -1
@@ -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);
Signature · 1 line
1.7.1.1
tip-bot for Laxman Dewangan
merge bot[tip:irq/urgent] irq: Enable all irqs unconditionally in irq_resume
irq: Enable all irqs unconditionally in irq_resume
Commit-ID: ac01810c9d2814238f08a227062e66a35a0e1ea2 Gitweb: http://git.kernel.org/tip/ac01810c9d2814238f08a227062e66a35a0e1ea2 Author: Laxman Dewangan <[email protected]> AuthorDate: Mon, 25 Nov 2013 19:39:47 +0530 Committer: Thomas Gleixner <[email protected]> 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. ]
--- kernel/irq/pm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
kernel/irq/pm.c +1 -1
@@ -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);
Hi Thomas,
Quoted 12 lines · Laxman Dewangan
When system enters into suspend, it disable all irqs in single function call. This disables
EARLY_RESUMEirqs also along with normal irqs.The
EARLY_RESUMEirqs get enabled insys_core_ops->resumeand non-EARLY_RESUME irqs get enabled in normal system resume path.When
suspend_noirqfailed or suspend is aborted for any reason, theEARLY_RESUMEirqs do not get enabled assys_core_ops->resume()call did not happen. It only enables the non-EARLY_RESUME irqs in normal disable for remaining life of system.
Quoted 8 lines
Enable all irqs unconditionally in normal
irq_resume()regardless ofEARLY_RESUMEirqs have been already enabled or not.Signed-off-by Laxman Dewangan <[email protected]>Acked-by-and-tested-by Konrad Rzeszutek Wilk <[email protected]>Acked-by Heiko Stuebner <[email protected]>Reviewed-by Pavel Machek <[email protected]>
Can you please review this patch?
This patch is pending from long back for review.
Thanks,
Laxman
Hi Laxman,
Am Donnerstag, 5. Dezember 2013, 11:49:05 schrieb Laxman Dewangan:
Quoted 2 lines
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
Quoted 5 lines · Heiko Stübner
Hi Laxman,
Am Donnerstag, 5. Dezember 2013, 11:49:05 schrieb Laxman Dewangan:
Quoted 2 lines
Can you please review this patch?
This patch is pending from long back for review.
Quoted 7 lines
the patch already made it into the appropriate tree, as can be seen by tip-bot message and on [0].
Heiko
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