kernel-hacking-2024-linux-s.../kernel/power
Rafael J. Wysocki 0e7d56e3d9 Suspend: Testing facility (rev. 2)
Introduce sysfs attribute /sys/power/pm_test allowing one to test the suspend
core code.  Namely, writing one of the strings:

freezer
devices
platform
processors
core

to this file causes the suspend code to work in one of the test modes defined as
follows:

freezer
- test the freezing of processes

devices
- test the freezing of processes and suspending of devices

platform
- test the freezing of processes, suspending of devices and platform global
  control methods(*)

processors
- test the freezing of processes, suspending of devices, platform global
  control methods and the disabling of nonboot CPUs

core
- test the freezing of processes, suspending of devices, platform global
  control methods, the disabling of nonboot CPUs and suspending of
  platform/system devices

(*) These are ACPI global control methods on ACPI systems

Then, if a suspend is started by normal means, the suspend core will perform
its normal operations up to the point indicated by given test level.  Next, it
will wait for 5 seconds and carry out the resume operations needed to transition
the system back to the fully functional state.

Writing "none" to /sys/power/pm_test turns the testing off.

When open for reading, /sys/power/pm_test contains a space-separated list of all
available tests (including "none" that represents the normal functionality) in
which the current test level is indicated by square brackets.

Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Acked-by: Pavel Machek <pavel@ucw.cz>
Signed-off-by: Len Brown <len.brown@intel.com>
2008-02-01 18:30:54 -05:00
..
console.c [PATCH] swsusp: fix suspend when console is in VT_AUTO+KD_GRAPHICS mode 2007-03-16 19:25:05 -07:00
disk.c Hibernation: Add PM_RESTORE_PREPARE and PM_POST_RESTORE notifiers (rev. 2) 2008-02-01 18:30:53 -05:00
Kconfig serial: turn serial console suspend a boot rather than compile time option 2007-10-18 14:37:19 -07:00
main.c Suspend: Testing facility (rev. 2) 2008-02-01 18:30:54 -05:00
Makefile Introduce CONFIG_SUSPEND for suspend-to-Ram and standby 2007-07-29 16:45:38 -07:00
pm.c PM: ACPI and APM must not be enabled at the same time 2008-01-11 12:26:47 -05:00
power.h Suspend: Testing facility (rev. 2) 2008-02-01 18:30:54 -05:00
poweroff.c
process.c power: Use task_is_* 2007-12-06 17:34:47 -05:00
snapshot.c Hibernation: Move function prototypes to header 2008-02-01 18:30:53 -05:00
swap.c swsusp: introduce restore platform operations 2007-07-19 10:04:42 -07:00
swsusp.c Hibernation: Move function prototypes to header 2008-02-01 18:30:53 -05:00
user.c Hibernation: Add PM_RESTORE_PREPARE and PM_POST_RESTORE notifiers (rev. 2) 2008-02-01 18:30:53 -05:00