aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Documentation/kernel-parameters.txt5
-rw-r--r--arch/x86/kernel/acpi/sleep.c2
-rw-r--r--drivers/acpi/sleep/main.c18
-rw-r--r--include/linux/acpi.h1
4 files changed, 23 insertions, 3 deletions
diff --git a/Documentation/kernel-parameters.txt b/Documentation/kernel-parameters.txt
index e0f346d201ed..1d089eeff3cf 100644
--- a/Documentation/kernel-parameters.txt
+++ b/Documentation/kernel-parameters.txt
@@ -149,7 +149,8 @@ and is between 256 and 4096 characters. It is defined in the file
149 default: 0 149 default: 0
150 150
151 acpi_sleep= [HW,ACPI] Sleep options 151 acpi_sleep= [HW,ACPI] Sleep options
152 Format: { s3_bios, s3_mode, s3_beep, s4_nohwsig, old_ordering } 152 Format: { s3_bios, s3_mode, s3_beep, s4_nohwsig,
153 old_ordering, s4_nonvs }
153 See Documentation/power/video.txt for s3_bios and s3_mode. 154 See Documentation/power/video.txt for s3_bios and s3_mode.
154 s3_beep is for debugging; it makes the PC's speaker beep 155 s3_beep is for debugging; it makes the PC's speaker beep
155 as soon as the kernel's real-mode entry point is called. 156 as soon as the kernel's real-mode entry point is called.
@@ -159,6 +160,8 @@ and is between 256 and 4096 characters. It is defined in the file
159 control method, wrt putting devices into low power 160 control method, wrt putting devices into low power
160 states, to be enforced (the ACPI 2.0 ordering of _PTS is 161 states, to be enforced (the ACPI 2.0 ordering of _PTS is
161 used by default). 162 used by default).
163 s4_nonvs prevents the kernel from saving/restoring the
164 ACPI NVS memory during hibernation.
162 165
163 acpi_sci= [HW,ACPI] ACPI System Control Interrupt trigger mode 166 acpi_sci= [HW,ACPI] ACPI System Control Interrupt trigger mode
164 Format: { level | edge | high | low } 167 Format: { level | edge | high | low }
diff --git a/arch/x86/kernel/acpi/sleep.c b/arch/x86/kernel/acpi/sleep.c
index 806b4e9051b4..707c1f6f95fa 100644
--- a/arch/x86/kernel/acpi/sleep.c
+++ b/arch/x86/kernel/acpi/sleep.c
@@ -159,6 +159,8 @@ static int __init acpi_sleep_setup(char *str)
159#endif 159#endif
160 if (strncmp(str, "old_ordering", 12) == 0) 160 if (strncmp(str, "old_ordering", 12) == 0)
161 acpi_old_suspend_ordering(); 161 acpi_old_suspend_ordering();
162 if (strncmp(str, "s4_nonvs", 8) == 0)
163 acpi_s4_no_nvs();
162 str = strchr(str, ','); 164 str = strchr(str, ',');
163 if (str != NULL) 165 if (str != NULL)
164 str += strspn(str, ", \t"); 166 str += strspn(str, ", \t");
diff --git a/drivers/acpi/sleep/main.c b/drivers/acpi/sleep/main.c
index 45a8015e4217..bef41fd4c877 100644
--- a/drivers/acpi/sleep/main.c
+++ b/drivers/acpi/sleep/main.c
@@ -101,6 +101,19 @@ void __init acpi_old_suspend_ordering(void)
101 * cases. 101 * cases.
102 */ 102 */
103static bool set_sci_en_on_resume; 103static bool set_sci_en_on_resume;
104/*
105 * The ACPI specification wants us to save NVS memory regions during hibernation
106 * and to restore them during the subsequent resume. However, it is not certain
107 * if this mechanism is going to work on all machines, so we allow the user to
108 * disable this mechanism using the 'acpi_sleep=s4_nonvs' kernel command line
109 * option.
110 */
111static bool s4_no_nvs;
112
113void __init acpi_s4_no_nvs(void)
114{
115 s4_no_nvs = true;
116}
104 117
105/** 118/**
106 * acpi_pm_disable_gpes - Disable the GPEs. 119 * acpi_pm_disable_gpes - Disable the GPEs.
@@ -396,7 +409,7 @@ static int acpi_hibernation_begin(void)
396{ 409{
397 int error; 410 int error;
398 411
399 error = hibernate_nvs_alloc(); 412 error = s4_no_nvs ? 0 : hibernate_nvs_alloc();
400 if (!error) { 413 if (!error) {
401 acpi_target_sleep_state = ACPI_STATE_S4; 414 acpi_target_sleep_state = ACPI_STATE_S4;
402 acpi_sleep_tts_switch(acpi_target_sleep_state); 415 acpi_sleep_tts_switch(acpi_target_sleep_state);
@@ -494,7 +507,8 @@ static int acpi_hibernation_begin_old(void)
494 error = acpi_sleep_prepare(ACPI_STATE_S4); 507 error = acpi_sleep_prepare(ACPI_STATE_S4);
495 508
496 if (!error) { 509 if (!error) {
497 error = hibernate_nvs_alloc(); 510 if (!s4_no_nvs)
511 error = hibernate_nvs_alloc();
498 if (!error) 512 if (!error)
499 acpi_target_sleep_state = ACPI_STATE_S4; 513 acpi_target_sleep_state = ACPI_STATE_S4;
500 } 514 }
diff --git a/include/linux/acpi.h b/include/linux/acpi.h
index fba8051fb297..dfa0a5356c53 100644
--- a/include/linux/acpi.h
+++ b/include/linux/acpi.h
@@ -270,6 +270,7 @@ int acpi_check_mem_region(resource_size_t start, resource_size_t n,
270#ifdef CONFIG_PM_SLEEP 270#ifdef CONFIG_PM_SLEEP
271void __init acpi_no_s4_hw_signature(void); 271void __init acpi_no_s4_hw_signature(void);
272void __init acpi_old_suspend_ordering(void); 272void __init acpi_old_suspend_ordering(void);
273void __init acpi_s4_no_nvs(void);
273#endif /* CONFIG_PM_SLEEP */ 274#endif /* CONFIG_PM_SLEEP */
274#else /* CONFIG_ACPI */ 275#else /* CONFIG_ACPI */
275 276