Skip to content

Commit

Permalink
irq: Enable all irqs unconditionally in irq_resume
Browse files Browse the repository at this point in the history
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 <[email protected]>
Acked-by-and-tested-by: Konrad Rzeszutek Wilk <[email protected]>
Acked-by: Heiko Stuebner <[email protected]>
Reviewed-by: Pavel Machek <[email protected]>
Cc: <[email protected]>
Cc: <[email protected]>
Cc: <[email protected]>
Cc: <[email protected]>
Cc: [email protected]
Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Thomas Gleixner <[email protected]>
  • Loading branch information
ldewangan authored and KAGA-KOKO committed Nov 25, 2013
1 parent 6bab2c6 commit ac01810
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion kernel/irq/pm.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit ac01810

Please sign in to comment.