Re: PCI PM: Restore standard config registers of all devices early

Ingo Molnar
2009-02-03T12:10:21Z

* Peter Zijlstra <a.p.zijlstra@chello.nl> wrote:

> On Tue, 2009-02-03 at 06:06 +0100, Ingo Molnar wrote:
> >
> > Mutexes should work just fine in irqs-off sections - they'll safely
> > save/restore interrupts, even the debug variants.
>
> mutex_lock() has might_sleep() which will generate a splat in atomic
> contexts.
>
> That said, afaik the acpi code uses semaphores.

even the might_sleep() should be OK with Linus's system_state change to the
suspend code:

void __might_sleep(char *file, int line)
{
#ifdef in_atomic
static unsigned long prev_jiffy; /* ratelimiting */

if ((!in_atomic() && !irqs_disabled()) ||
system_state != SYSTEM_RUNNING || oops_in_progress)

Ingo