Re: [linux-pm] [RFC][PATCH] PM: Introduce new top level suspend and hibernation callbacks (rev. 2)
- From: Oliver Neukum <oliver@xxxxxxxxxx>
- Date: Wed, 26 Mar 2008 15:24:17 +0100
Am Mittwoch, 26. März 2008 15:10:01 schrieb Alan Stern:
IMO you must always keep the ordering invariant. If a parent returns an error
the PM core must not wake its children.
Don't think of it that way. The PM core doesn't wake anything. It
merely notifies drivers that the system sleep is ending, so that the
drivers can wake their devices. It's up to the driver to detect
whether the parent failed to resume, in which case the driver should
take appropriate action.
How do you propose that every driver should check the power state
of its parent? Without locking the parent?
The situation is no different from what happens when the user tries to
access a mounted USB disk drive after the USB cable has been unplugged.
The drivers take care of everything.
That completely throws away the reason to have a PM core. We've made
a guarantee to drivers that they wil not be woken unless their parents are
awake. In fact the semantics of the callbacks are defined in a way that
adding devices to a parent can be enabled. You cannot add children to a
dead parent. It's the very reason for this rewrite.
Regards
Oliver
--
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/
- Follow-Ups:
- References:
- Prev by Date: Re: [PATCH 109/148] include/asm-x86/serial.h: checkpatch cleanups - formatting only
- Next by Date: Re: use of preempt_count instead of in_atomic() at leds-gpio.c
- Previous by thread: Re: [linux-pm] [RFC][PATCH] PM: Introduce new top level suspend and hibernation callbacks (rev. 2)
- Next by thread: Re: [linux-pm] [RFC][PATCH] PM: Introduce new top level suspend and hibernation callbacks (rev. 2)
- Index(es):
Relevant Pages
|