Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 336673
b: refs/heads/master
c: 1bad2f1
h: refs/heads/master
i:
  336671: 68dc67e
v: v3
  • Loading branch information
Kristen Carlson Accardi authored and Rafael J. Wysocki committed Nov 14, 2012
1 parent 356aece commit b8abd0e
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 2 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: f4fa0e018a175ea92a3187ade8f678599dc5980a
refs/heads/master: 1bad2f19f7f79d1ec9e6c48168fd7ce8dc1c305f
2 changes: 2 additions & 0 deletions trunk/arch/x86/kernel/acpi/sleep.c
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,8 @@ static int __init acpi_sleep_setup(char *str)
#endif
if (strncmp(str, "nonvs", 5) == 0)
acpi_nvs_nosave();
if (strncmp(str, "nonvs_s3", 8) == 0)
acpi_nvs_nosave_s3();
if (strncmp(str, "old_ordering", 12) == 0)
acpi_old_suspend_ordering();
str = strchr(str, ',');
Expand Down
17 changes: 16 additions & 1 deletion trunk/drivers/acpi/sleep.c
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,21 @@ void __init acpi_nvs_nosave(void)
nvs_nosave = true;
}

/*
* The ACPI specification wants us to save NVS memory regions during hibernation
* but says nothing about saving NVS during S3. Not all versions of Windows
* save NVS on S3 suspend either, and it is clear that not all systems need
* NVS to be saved at S3 time. To improve suspend/resume time, allow the
* user to disable saving NVS on S3 if their system does not require it, but
* continue to save/restore NVS for S4 as specified.
*/
static bool nvs_nosave_s3;

void __init acpi_nvs_nosave_s3(void)
{
nvs_nosave_s3 = true;
}

/*
* ACPI 1.0 wants us to execute _PTS before suspending devices, so we allow the
* user to request that behavior by using the 'acpi_old_suspend_ordering'
Expand Down Expand Up @@ -243,7 +258,7 @@ static int acpi_suspend_begin(suspend_state_t pm_state)
u32 acpi_state = acpi_suspend_states[pm_state];
int error = 0;

error = nvs_nosave ? 0 : suspend_nvs_alloc();
error = (nvs_nosave || nvs_nosave_s3) ? 0 : suspend_nvs_alloc();
if (error)
return error;

Expand Down
1 change: 1 addition & 0 deletions trunk/include/linux/acpi.h
Original file line number Diff line number Diff line change
Expand Up @@ -261,6 +261,7 @@ int acpi_resources_are_enforced(void);
void __init acpi_no_s4_hw_signature(void);
void __init acpi_old_suspend_ordering(void);
void __init acpi_nvs_nosave(void);
void __init acpi_nvs_nosave_s3(void);
#endif /* CONFIG_PM_SLEEP */

struct acpi_osc_context {
Expand Down

0 comments on commit b8abd0e

Please sign in to comment.