Re: [PATCH v4] pm_ops: add system quiesce/activate hooks

Paul Mackerras
2007-04-14T16:55:13Z

Pavel Machek writes:

> I see ppc as being really special here.

It is, I guess. The salient point is that once the decrementer has an
interrupt pending, the only way to clear it is to take the interrupt.
There is no explicit access to the interrupt pending bit and no
separate enable bit for its interrupt, only the global interrupt
enable for the whole CPU. We have to turn on the global interrupt
enable when finally putting the system into the suspend state (for
suspend to RAM), otherwise on some machines we'll never wake up again.

Effectively, when dealing with the decrementer during preparation for
suspend-to-RAM, we may need to have interrupts enabled briefly in
order to clear a pending decrementer interrupt.

Paul.