diff options
Diffstat (limited to 'drivers/acpi/sleep.c')
-rw-r--r-- | drivers/acpi/sleep.c | 53 |
1 files changed, 27 insertions, 26 deletions
diff --git a/drivers/acpi/sleep.c b/drivers/acpi/sleep.c index 7e3c609cbef2..519266654f06 100644 --- a/drivers/acpi/sleep.c +++ b/drivers/acpi/sleep.c | |||
@@ -90,31 +90,6 @@ void __init acpi_old_suspend_ordering(void) | |||
90 | old_suspend_ordering = true; | 90 | old_suspend_ordering = true; |
91 | } | 91 | } |
92 | 92 | ||
93 | /* | ||
94 | * According to the ACPI specification the BIOS should make sure that ACPI is | ||
95 | * enabled and SCI_EN bit is set on wake-up from S1 - S3 sleep states. Still, | ||
96 | * some BIOSes don't do that and therefore we use acpi_enable() to enable ACPI | ||
97 | * on such systems during resume. Unfortunately that doesn't help in | ||
98 | * particularly pathological cases in which SCI_EN has to be set directly on | ||
99 | * resume, although the specification states very clearly that this flag is | ||
100 | * owned by the hardware. The set_sci_en_on_resume variable will be set in such | ||
101 | * cases. | ||
102 | */ | ||
103 | static 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 | */ | ||
111 | static bool s4_no_nvs; | ||
112 | |||
113 | void __init acpi_s4_no_nvs(void) | ||
114 | { | ||
115 | s4_no_nvs = true; | ||
116 | } | ||
117 | |||
118 | /** | 93 | /** |
119 | * acpi_pm_disable_gpes - Disable the GPEs. | 94 | * acpi_pm_disable_gpes - Disable the GPEs. |
120 | */ | 95 | */ |
@@ -193,6 +168,18 @@ static void acpi_pm_end(void) | |||
193 | #endif /* CONFIG_ACPI_SLEEP */ | 168 | #endif /* CONFIG_ACPI_SLEEP */ |
194 | 169 | ||
195 | #ifdef CONFIG_SUSPEND | 170 | #ifdef CONFIG_SUSPEND |
171 | /* | ||
172 | * According to the ACPI specification the BIOS should make sure that ACPI is | ||
173 | * enabled and SCI_EN bit is set on wake-up from S1 - S3 sleep states. Still, | ||
174 | * some BIOSes don't do that and therefore we use acpi_enable() to enable ACPI | ||
175 | * on such systems during resume. Unfortunately that doesn't help in | ||
176 | * particularly pathological cases in which SCI_EN has to be set directly on | ||
177 | * resume, although the specification states very clearly that this flag is | ||
178 | * owned by the hardware. The set_sci_en_on_resume variable will be set in such | ||
179 | * cases. | ||
180 | */ | ||
181 | static bool set_sci_en_on_resume; | ||
182 | |||
196 | extern void do_suspend_lowlevel(void); | 183 | extern void do_suspend_lowlevel(void); |
197 | 184 | ||
198 | static u32 acpi_suspend_states[] = { | 185 | static u32 acpi_suspend_states[] = { |
@@ -396,6 +383,20 @@ static struct dmi_system_id __initdata acpisleep_dmi_table[] = { | |||
396 | #endif /* CONFIG_SUSPEND */ | 383 | #endif /* CONFIG_SUSPEND */ |
397 | 384 | ||
398 | #ifdef CONFIG_HIBERNATION | 385 | #ifdef CONFIG_HIBERNATION |
386 | /* | ||
387 | * The ACPI specification wants us to save NVS memory regions during hibernation | ||
388 | * and to restore them during the subsequent resume. However, it is not certain | ||
389 | * if this mechanism is going to work on all machines, so we allow the user to | ||
390 | * disable this mechanism using the 'acpi_sleep=s4_nonvs' kernel command line | ||
391 | * option. | ||
392 | */ | ||
393 | static bool s4_no_nvs; | ||
394 | |||
395 | void __init acpi_s4_no_nvs(void) | ||
396 | { | ||
397 | s4_no_nvs = true; | ||
398 | } | ||
399 | |||
399 | static unsigned long s4_hardware_signature; | 400 | static unsigned long s4_hardware_signature; |
400 | static struct acpi_table_facs *facs; | 401 | static struct acpi_table_facs *facs; |
401 | static bool nosigcheck; | 402 | static bool nosigcheck; |
@@ -679,7 +680,7 @@ static void acpi_power_off_prepare(void) | |||
679 | static void acpi_power_off(void) | 680 | static void acpi_power_off(void) |
680 | { | 681 | { |
681 | /* acpi_sleep_prepare(ACPI_STATE_S5) should have already been called */ | 682 | /* acpi_sleep_prepare(ACPI_STATE_S5) should have already been called */ |
682 | printk("%s called\n", __func__); | 683 | printk(KERN_DEBUG "%s called\n", __func__); |
683 | local_irq_disable(); | 684 | local_irq_disable(); |
684 | acpi_enable_wakeup_device(ACPI_STATE_S5); | 685 | acpi_enable_wakeup_device(ACPI_STATE_S5); |
685 | acpi_enter_sleep_state(ACPI_STATE_S5); | 686 | acpi_enter_sleep_state(ACPI_STATE_S5); |