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

From: Benjamin Herrenschmidt
Date: Mon Feb 02 2009 - 20:33:25 EST



> Why do you think this improves on anything?
>
> Basically, it turns the mutex into a non-entity - but if your whole
> argument is that it might as well be a non-entity because nobody else can
> take it anyway, then why not just leave it around?
>
> IOW, if your argument boils down to "there can be no contention", then you
> might as well say "just use the mutex, it will never block".

Oh sure, you all argument is fine, there's just one little nit for which
I think it made sense to take the mutex that way...

The possible problem I see is on the "boundary" when you are about to
get interrupts off. You want to make sure that any other kernel thread /
process that was inside ACPI is completed before you do that.

Taking the mutex will do that for you.

Then you can disable interrupts and just ignore the mutex until you
re-enable them.

Now, of course, in a perfect world, anything that can poke ACPI would have
got some suspend calls before hand and won't be around touching it but
I wouldn't bet my life on this.

Cheers,
Ben.


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/