dect
/
linux-2.6
Archived
13
0
Fork 0
This repository has been archived on 2022-02-17. You can view files and clone it, but cannot push or open issues or pull requests.
linux-2.6/Documentation/power
Rafael J. Wysocki 58aca23226 PM: Handle device registrations during suspend/resume
Modify the PM core to protect its data structures, specifically the
dpm_active list, from being corrupted if a child of the currently
suspending device is registered concurrently with its ->suspend()
callback.  In that case, since the new device (the child) is added
to dpm_active after its parent, the PM core will attempt to
suspend it after the parent, which is wrong.

Introduce a new member of struct dev_pm_info, called 'sleeping',
and use it to check if the parent of the device being added to
dpm_active has been suspended, in which case the device registration
fails.  Also, use 'sleeping' for checking if the ordering of devices
on dpm_active is correct.

Introduce variable 'all_sleeping' that will be set to 'true' once all
devices have been suspended and make new device registrations fail
until 'all_sleeping' is reset to 'false', in order to avoid having
unsuspended devices around while the system is going into a sleep state.

Remove pm_sleep_rwsem which is not necessary any more.

Special thanks to Alan Stern for discussions and suggestions that
lead to the creation of this patch.

Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Acked-by: Pavel Machek <pavel@ucw.cz>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-04-19 19:10:24 -07:00
..
00-INDEX documentation: Move power-related files to Documentation/power/ 2008-03-12 18:10:51 -04:00
basic-pm-debugging.txt
devices.txt PM: Handle device registrations during suspend/resume 2008-04-19 19:10:24 -07:00
drivers-testing.txt
freezing-of-tasks.txt
interface.txt
notifiers.txt
pci.txt
pm.txt documentation: Move power-related files to Documentation/power/ 2008-03-12 18:10:51 -04:00
pm_qos_interface.txt documentation: Move power-related files to Documentation/power/ 2008-03-12 18:10:51 -04:00
power_supply_class.txt documentation: Move power-related files to Documentation/power/ 2008-03-12 18:10:51 -04:00
s2ram.txt
states.txt
swsusp-and-swap-files.txt
swsusp-dmcrypt.txt
swsusp.txt
tricks.txt
userland-swsusp.txt
video.txt
video_extension.txt