Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 82395
b: refs/heads/master
c: b28f508
h: refs/heads/master
i:
  82393: 5c6ee34
  82391: de5189a
v: v3
  • Loading branch information
Johannes Berg authored and Len Brown committed Feb 1, 2008
1 parent 66da22d commit 6607fa7
Show file tree
Hide file tree
Showing 5 changed files with 41 additions and 4 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: c9b6c8f68ee48e1e3dbb53e13316757e2c0b584d
refs/heads/master: b28f508112c584cdfbb4d8a9489cc4b79dac68ee
4 changes: 4 additions & 0 deletions trunk/arch/powerpc/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -405,6 +405,10 @@ config CMDLINE
most cases you will need to specify the root device here.

if !44x || BROKEN
config ARCH_WANTS_FREEZER_CONTROL
def_bool y
depends on ADB_PMU

source kernel/power/Kconfig
endif

Expand Down
11 changes: 11 additions & 0 deletions trunk/kernel/power/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,17 @@ config SUSPEND
powered and thus its contents are preserved, such as the
suspend-to-RAM state (e.g. the ACPI S3 state).

config SUSPEND_FREEZER
bool "Enable freezer for suspend to RAM/standby" \
if ARCH_WANTS_FREEZER_CONTROL || BROKEN
depends on SUSPEND
default y
help
This allows you to turn off the freezer for suspend. If this is
done, no tasks are frozen for suspend to RAM/standby.

Turning OFF this setting is NOT recommended! If in doubt, say Y.

config HIBERNATION
bool "Hibernation (aka 'suspend to disk')"
depends on PM && SWAP && ARCH_HIBERNATION_POSSIBLE
Expand Down
6 changes: 3 additions & 3 deletions trunk/kernel/power/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ static int suspend_prepare(void)

pm_prepare_console();

if (freeze_processes()) {
if (suspend_freeze_processes()) {
error = -EAGAIN;
goto Thaw;
}
Expand All @@ -199,7 +199,7 @@ static int suspend_prepare(void)
return 0;

Thaw:
thaw_processes();
suspend_thaw_processes();
pm_restore_console();
Finish:
pm_notifier_call_chain(PM_POST_SUSPEND);
Expand Down Expand Up @@ -308,7 +308,7 @@ int suspend_devices_and_enter(suspend_state_t state)
*/
static void suspend_finish(void)
{
thaw_processes();
suspend_thaw_processes();
pm_restore_console();
pm_notifier_call_chain(PM_POST_SUSPEND);
}
Expand Down
22 changes: 22 additions & 0 deletions trunk/kernel/power/power.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#include <linux/suspend.h>
#include <linux/suspend_ioctls.h>
#include <linux/utsname.h>
#include <linux/freezer.h>

struct swsusp_info {
struct new_utsname uts;
Expand Down Expand Up @@ -203,3 +204,24 @@ enum {
#define TEST_MAX (__TEST_AFTER_LAST - 1)

extern int pm_test_level;

#ifdef CONFIG_SUSPEND_FREEZER
static inline int suspend_freeze_processes(void)
{
return freeze_processes();
}

static inline void suspend_thaw_processes(void)
{
thaw_processes();
}
#else
static inline int suspend_freeze_processes(void)
{
return 0;
}

static inline void suspend_thaw_processes(void)
{
}
#endif

0 comments on commit 6607fa7

Please sign in to comment.