Merge branch 'stable/for-x86-for-3.4' of git://git.kernel.org/pub/scm/linux/kernel...
[~shefty/rdma-dev.git] / drivers / acpi / acpica / hwsleep.c
1
2 /******************************************************************************
3  *
4  * Name: hwsleep.c - ACPI Hardware Sleep/Wake Interface
5  *
6  *****************************************************************************/
7
8 /*
9  * Copyright (C) 2000 - 2012, Intel Corp.
10  * All rights reserved.
11  *
12  * Redistribution and use in source and binary forms, with or without
13  * modification, are permitted provided that the following conditions
14  * are met:
15  * 1. Redistributions of source code must retain the above copyright
16  *    notice, this list of conditions, and the following disclaimer,
17  *    without modification.
18  * 2. Redistributions in binary form must reproduce at minimum a disclaimer
19  *    substantially similar to the "NO WARRANTY" disclaimer below
20  *    ("Disclaimer") and any redistribution must be conditioned upon
21  *    including a substantially similar Disclaimer requirement for further
22  *    binary redistribution.
23  * 3. Neither the names of the above-listed copyright holders nor the names
24  *    of any contributors may be used to endorse or promote products derived
25  *    from this software without specific prior written permission.
26  *
27  * Alternatively, this software may be distributed under the terms of the
28  * GNU General Public License ("GPL") version 2 as published by the Free
29  * Software Foundation.
30  *
31  * NO WARRANTY
32  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
33  * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
34  * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
35  * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
36  * HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
37  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
38  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
39  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
40  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
41  * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
42  * POSSIBILITY OF SUCH DAMAGES.
43  */
44
45 #include <acpi/acpi.h>
46 #include <linux/acpi.h>
47 #include "accommon.h"
48 #include "actables.h"
49 #include <linux/module.h>
50
51 #define _COMPONENT          ACPI_HARDWARE
52 ACPI_MODULE_NAME("hwsleep")
53
54 /*******************************************************************************
55  *
56  * FUNCTION:    acpi_set_firmware_waking_vector
57  *
58  * PARAMETERS:  physical_address    - 32-bit physical address of ACPI real mode
59  *                                    entry point.
60  *
61  * RETURN:      Status
62  *
63  * DESCRIPTION: Sets the 32-bit firmware_waking_vector field of the FACS
64  *
65  ******************************************************************************/
66 acpi_status
67 acpi_set_firmware_waking_vector(u32 physical_address)
68 {
69         ACPI_FUNCTION_TRACE(acpi_set_firmware_waking_vector);
70
71
72         /*
73          * According to the ACPI specification 2.0c and later, the 64-bit
74          * waking vector should be cleared and the 32-bit waking vector should
75          * be used, unless we want the wake-up code to be called by the BIOS in
76          * Protected Mode.  Some systems (for example HP dv5-1004nr) are known
77          * to fail to resume if the 64-bit vector is used.
78          */
79
80         /* Set the 32-bit vector */
81
82         acpi_gbl_FACS->firmware_waking_vector = physical_address;
83
84         /* Clear the 64-bit vector if it exists */
85
86         if ((acpi_gbl_FACS->length > 32) && (acpi_gbl_FACS->version >= 1)) {
87                 acpi_gbl_FACS->xfirmware_waking_vector = 0;
88         }
89
90         return_ACPI_STATUS(AE_OK);
91 }
92
93 ACPI_EXPORT_SYMBOL(acpi_set_firmware_waking_vector)
94
95 #if ACPI_MACHINE_WIDTH == 64
96 /*******************************************************************************
97  *
98  * FUNCTION:    acpi_set_firmware_waking_vector64
99  *
100  * PARAMETERS:  physical_address    - 64-bit physical address of ACPI protected
101  *                                    mode entry point.
102  *
103  * RETURN:      Status
104  *
105  * DESCRIPTION: Sets the 64-bit X_firmware_waking_vector field of the FACS, if
106  *              it exists in the table. This function is intended for use with
107  *              64-bit host operating systems.
108  *
109  ******************************************************************************/
110 acpi_status
111 acpi_set_firmware_waking_vector64(u64 physical_address)
112 {
113         ACPI_FUNCTION_TRACE(acpi_set_firmware_waking_vector64);
114
115
116         /* Determine if the 64-bit vector actually exists */
117
118         if ((acpi_gbl_FACS->length <= 32) || (acpi_gbl_FACS->version < 1)) {
119                 return_ACPI_STATUS(AE_NOT_EXIST);
120         }
121
122         /* Clear 32-bit vector, set the 64-bit X_ vector */
123
124         acpi_gbl_FACS->firmware_waking_vector = 0;
125         acpi_gbl_FACS->xfirmware_waking_vector = physical_address;
126
127         return_ACPI_STATUS(AE_OK);
128 }
129
130 ACPI_EXPORT_SYMBOL(acpi_set_firmware_waking_vector64)
131 #endif
132
133 /*******************************************************************************
134  *
135  * FUNCTION:    acpi_enter_sleep_state_prep
136  *
137  * PARAMETERS:  sleep_state         - Which sleep state to enter
138  *
139  * RETURN:      Status
140  *
141  * DESCRIPTION: Prepare to enter a system sleep state (see ACPI 2.0 spec p 231)
142  *              This function must execute with interrupts enabled.
143  *              We break sleeping into 2 stages so that OSPM can handle
144  *              various OS-specific tasks between the two steps.
145  *
146  ******************************************************************************/
147 acpi_status acpi_enter_sleep_state_prep(u8 sleep_state)
148 {
149         acpi_status status;
150         struct acpi_object_list arg_list;
151         union acpi_object arg;
152
153         ACPI_FUNCTION_TRACE(acpi_enter_sleep_state_prep);
154
155         /* _PSW methods could be run here to enable wake-on keyboard, LAN, etc. */
156
157         status = acpi_get_sleep_type_data(sleep_state,
158                                           &acpi_gbl_sleep_type_a,
159                                           &acpi_gbl_sleep_type_b);
160         if (ACPI_FAILURE(status)) {
161                 return_ACPI_STATUS(status);
162         }
163
164         /* Setup parameter object */
165
166         arg_list.count = 1;
167         arg_list.pointer = &arg;
168
169         arg.type = ACPI_TYPE_INTEGER;
170         arg.integer.value = sleep_state;
171
172         /* Run the _PTS method */
173
174         status = acpi_evaluate_object(NULL, METHOD_NAME__PTS, &arg_list, NULL);
175         if (ACPI_FAILURE(status) && status != AE_NOT_FOUND) {
176                 return_ACPI_STATUS(status);
177         }
178
179         /* Setup the argument to _SST */
180
181         switch (sleep_state) {
182         case ACPI_STATE_S0:
183                 arg.integer.value = ACPI_SST_WORKING;
184                 break;
185
186         case ACPI_STATE_S1:
187         case ACPI_STATE_S2:
188         case ACPI_STATE_S3:
189                 arg.integer.value = ACPI_SST_SLEEPING;
190                 break;
191
192         case ACPI_STATE_S4:
193                 arg.integer.value = ACPI_SST_SLEEP_CONTEXT;
194                 break;
195
196         default:
197                 arg.integer.value = ACPI_SST_INDICATOR_OFF;     /* Default is off */
198                 break;
199         }
200
201         /*
202          * Set the system indicators to show the desired sleep state.
203          * _SST is an optional method (return no error if not found)
204          */
205         status = acpi_evaluate_object(NULL, METHOD_NAME__SST, &arg_list, NULL);
206         if (ACPI_FAILURE(status) && status != AE_NOT_FOUND) {
207                 ACPI_EXCEPTION((AE_INFO, status,
208                                 "While executing method _SST"));
209         }
210
211         return_ACPI_STATUS(AE_OK);
212 }
213
214 ACPI_EXPORT_SYMBOL(acpi_enter_sleep_state_prep)
215
216 static unsigned int gts, bfs;
217 module_param(gts, uint, 0644);
218 module_param(bfs, uint, 0644);
219 MODULE_PARM_DESC(gts, "Enable evaluation of _GTS on suspend.");
220 MODULE_PARM_DESC(bfs, "Enable evaluation of _BFS on resume".);
221
222 /*******************************************************************************
223  *
224  * FUNCTION:    acpi_enter_sleep_state
225  *
226  * PARAMETERS:  sleep_state         - Which sleep state to enter
227  *
228  * RETURN:      Status
229  *
230  * DESCRIPTION: Enter a system sleep state (see ACPI 2.0 spec p 231)
231  *              THIS FUNCTION MUST BE CALLED WITH INTERRUPTS DISABLED
232  *
233  ******************************************************************************/
234 acpi_status asmlinkage acpi_enter_sleep_state(u8 sleep_state)
235 {
236         u32 pm1a_control;
237         u32 pm1b_control;
238         struct acpi_bit_register_info *sleep_type_reg_info;
239         struct acpi_bit_register_info *sleep_enable_reg_info;
240         u32 in_value;
241         struct acpi_object_list arg_list;
242         union acpi_object arg;
243         acpi_status status;
244
245         ACPI_FUNCTION_TRACE(acpi_enter_sleep_state);
246
247         if ((acpi_gbl_sleep_type_a > ACPI_SLEEP_TYPE_MAX) ||
248             (acpi_gbl_sleep_type_b > ACPI_SLEEP_TYPE_MAX)) {
249                 ACPI_ERROR((AE_INFO, "Sleep values out of range: A=0x%X B=0x%X",
250                             acpi_gbl_sleep_type_a, acpi_gbl_sleep_type_b));
251                 return_ACPI_STATUS(AE_AML_OPERAND_VALUE);
252         }
253
254         sleep_type_reg_info =
255             acpi_hw_get_bit_register_info(ACPI_BITREG_SLEEP_TYPE);
256         sleep_enable_reg_info =
257             acpi_hw_get_bit_register_info(ACPI_BITREG_SLEEP_ENABLE);
258
259         /* Clear wake status */
260
261         status =
262             acpi_write_bit_register(ACPI_BITREG_WAKE_STATUS, ACPI_CLEAR_STATUS);
263         if (ACPI_FAILURE(status)) {
264                 return_ACPI_STATUS(status);
265         }
266
267         /* Clear all fixed and general purpose status bits */
268
269         status = acpi_hw_clear_acpi_status();
270         if (ACPI_FAILURE(status)) {
271                 return_ACPI_STATUS(status);
272         }
273
274         /*
275          * 1) Disable/Clear all GPEs
276          * 2) Enable all wakeup GPEs
277          */
278         status = acpi_hw_disable_all_gpes();
279         if (ACPI_FAILURE(status)) {
280                 return_ACPI_STATUS(status);
281         }
282         acpi_gbl_system_awake_and_running = FALSE;
283
284         status = acpi_hw_enable_all_wakeup_gpes();
285         if (ACPI_FAILURE(status)) {
286                 return_ACPI_STATUS(status);
287         }
288
289         if (gts) {
290                 /* Execute the _GTS method */
291
292                 arg_list.count = 1;
293                 arg_list.pointer = &arg;
294                 arg.type = ACPI_TYPE_INTEGER;
295                 arg.integer.value = sleep_state;
296
297                 status = acpi_evaluate_object(NULL, METHOD_NAME__GTS, &arg_list, NULL);
298                 if (ACPI_FAILURE(status) && status != AE_NOT_FOUND) {
299                         return_ACPI_STATUS(status);
300                 }
301         }
302
303         /* Get current value of PM1A control */
304
305         status = acpi_hw_register_read(ACPI_REGISTER_PM1_CONTROL,
306                                        &pm1a_control);
307         if (ACPI_FAILURE(status)) {
308                 return_ACPI_STATUS(status);
309         }
310         ACPI_DEBUG_PRINT((ACPI_DB_INIT,
311                           "Entering sleep state [S%u]\n", sleep_state));
312
313         /* Clear the SLP_EN and SLP_TYP fields */
314
315         pm1a_control &= ~(sleep_type_reg_info->access_bit_mask |
316                           sleep_enable_reg_info->access_bit_mask);
317         pm1b_control = pm1a_control;
318
319         /* Insert the SLP_TYP bits */
320
321         pm1a_control |=
322             (acpi_gbl_sleep_type_a << sleep_type_reg_info->bit_position);
323         pm1b_control |=
324             (acpi_gbl_sleep_type_b << sleep_type_reg_info->bit_position);
325
326         /*
327          * We split the writes of SLP_TYP and SLP_EN to workaround
328          * poorly implemented hardware.
329          */
330
331         /* Write #1: write the SLP_TYP data to the PM1 Control registers */
332
333         status = acpi_hw_write_pm1_control(pm1a_control, pm1b_control);
334         if (ACPI_FAILURE(status)) {
335                 return_ACPI_STATUS(status);
336         }
337
338         /* Insert the sleep enable (SLP_EN) bit */
339
340         pm1a_control |= sleep_enable_reg_info->access_bit_mask;
341         pm1b_control |= sleep_enable_reg_info->access_bit_mask;
342
343         /* Flush caches, as per ACPI specification */
344
345         ACPI_FLUSH_CPU_CACHE();
346
347         status = acpi_os_prepare_sleep(sleep_state, pm1a_control,
348                                        pm1b_control);
349         if (ACPI_SKIP(status))
350                 return_ACPI_STATUS(AE_OK);
351         if (ACPI_FAILURE(status))
352                 return_ACPI_STATUS(status);
353         /* Write #2: Write both SLP_TYP + SLP_EN */
354
355         status = acpi_hw_write_pm1_control(pm1a_control, pm1b_control);
356         if (ACPI_FAILURE(status)) {
357                 return_ACPI_STATUS(status);
358         }
359
360         if (sleep_state > ACPI_STATE_S3) {
361                 /*
362                  * We wanted to sleep > S3, but it didn't happen (by virtue of the
363                  * fact that we are still executing!)
364                  *
365                  * Wait ten seconds, then try again. This is to get S4/S5 to work on
366                  * all machines.
367                  *
368                  * We wait so long to allow chipsets that poll this reg very slowly
369                  * to still read the right value. Ideally, this block would go
370                  * away entirely.
371                  */
372                 acpi_os_stall(10000000);
373
374                 status = acpi_hw_register_write(ACPI_REGISTER_PM1_CONTROL,
375                                                 sleep_enable_reg_info->
376                                                 access_bit_mask);
377                 if (ACPI_FAILURE(status)) {
378                         return_ACPI_STATUS(status);
379                 }
380         }
381
382         /* Wait until we enter sleep state */
383
384         do {
385                 status = acpi_read_bit_register(ACPI_BITREG_WAKE_STATUS,
386                                                     &in_value);
387                 if (ACPI_FAILURE(status)) {
388                         return_ACPI_STATUS(status);
389                 }
390
391                 /* Spin until we wake */
392
393         } while (!in_value);
394
395         return_ACPI_STATUS(AE_OK);
396 }
397
398 ACPI_EXPORT_SYMBOL(acpi_enter_sleep_state)
399
400 /*******************************************************************************
401  *
402  * FUNCTION:    acpi_enter_sleep_state_s4bios
403  *
404  * PARAMETERS:  None
405  *
406  * RETURN:      Status
407  *
408  * DESCRIPTION: Perform a S4 bios request.
409  *              THIS FUNCTION MUST BE CALLED WITH INTERRUPTS DISABLED
410  *
411  ******************************************************************************/
412 acpi_status asmlinkage acpi_enter_sleep_state_s4bios(void)
413 {
414         u32 in_value;
415         acpi_status status;
416
417         ACPI_FUNCTION_TRACE(acpi_enter_sleep_state_s4bios);
418
419         /* Clear the wake status bit (PM1) */
420
421         status =
422             acpi_write_bit_register(ACPI_BITREG_WAKE_STATUS, ACPI_CLEAR_STATUS);
423         if (ACPI_FAILURE(status)) {
424                 return_ACPI_STATUS(status);
425         }
426
427         status = acpi_hw_clear_acpi_status();
428         if (ACPI_FAILURE(status)) {
429                 return_ACPI_STATUS(status);
430         }
431
432         /*
433          * 1) Disable/Clear all GPEs
434          * 2) Enable all wakeup GPEs
435          */
436         status = acpi_hw_disable_all_gpes();
437         if (ACPI_FAILURE(status)) {
438                 return_ACPI_STATUS(status);
439         }
440         acpi_gbl_system_awake_and_running = FALSE;
441
442         status = acpi_hw_enable_all_wakeup_gpes();
443         if (ACPI_FAILURE(status)) {
444                 return_ACPI_STATUS(status);
445         }
446
447         ACPI_FLUSH_CPU_CACHE();
448
449         status = acpi_hw_write_port(acpi_gbl_FADT.smi_command,
450                                     (u32) acpi_gbl_FADT.S4bios_request, 8);
451
452         do {
453                 acpi_os_stall(1000);
454                 status =
455                     acpi_read_bit_register(ACPI_BITREG_WAKE_STATUS, &in_value);
456                 if (ACPI_FAILURE(status)) {
457                         return_ACPI_STATUS(status);
458                 }
459         } while (!in_value);
460
461         return_ACPI_STATUS(AE_OK);
462 }
463
464 ACPI_EXPORT_SYMBOL(acpi_enter_sleep_state_s4bios)
465
466 /*******************************************************************************
467  *
468  * FUNCTION:    acpi_leave_sleep_state_prep
469  *
470  * PARAMETERS:  sleep_state         - Which sleep state we are exiting
471  *
472  * RETURN:      Status
473  *
474  * DESCRIPTION: Perform the first state of OS-independent ACPI cleanup after a
475  *              sleep.
476  *              Called with interrupts DISABLED.
477  *
478  ******************************************************************************/
479 acpi_status acpi_leave_sleep_state_prep(u8 sleep_state)
480 {
481         struct acpi_object_list arg_list;
482         union acpi_object arg;
483         acpi_status status;
484         struct acpi_bit_register_info *sleep_type_reg_info;
485         struct acpi_bit_register_info *sleep_enable_reg_info;
486         u32 pm1a_control;
487         u32 pm1b_control;
488
489         ACPI_FUNCTION_TRACE(acpi_leave_sleep_state_prep);
490
491         /*
492          * Set SLP_TYPE and SLP_EN to state S0.
493          * This is unclear from the ACPI Spec, but it is required
494          * by some machines.
495          */
496         status = acpi_get_sleep_type_data(ACPI_STATE_S0,
497                                           &acpi_gbl_sleep_type_a,
498                                           &acpi_gbl_sleep_type_b);
499         if (ACPI_SUCCESS(status)) {
500                 sleep_type_reg_info =
501                     acpi_hw_get_bit_register_info(ACPI_BITREG_SLEEP_TYPE);
502                 sleep_enable_reg_info =
503                     acpi_hw_get_bit_register_info(ACPI_BITREG_SLEEP_ENABLE);
504
505                 /* Get current value of PM1A control */
506
507                 status = acpi_hw_register_read(ACPI_REGISTER_PM1_CONTROL,
508                                                &pm1a_control);
509                 if (ACPI_SUCCESS(status)) {
510
511                         /* Clear the SLP_EN and SLP_TYP fields */
512
513                         pm1a_control &= ~(sleep_type_reg_info->access_bit_mask |
514                                           sleep_enable_reg_info->
515                                           access_bit_mask);
516                         pm1b_control = pm1a_control;
517
518                         /* Insert the SLP_TYP bits */
519
520                         pm1a_control |= (acpi_gbl_sleep_type_a <<
521                                          sleep_type_reg_info->bit_position);
522                         pm1b_control |= (acpi_gbl_sleep_type_b <<
523                                          sleep_type_reg_info->bit_position);
524
525                         /* Write the control registers and ignore any errors */
526
527                         (void)acpi_hw_write_pm1_control(pm1a_control,
528                                                         pm1b_control);
529                 }
530         }
531
532         if (bfs) {
533                 /* Execute the _BFS method */
534
535                 arg_list.count = 1;
536                 arg_list.pointer = &arg;
537                 arg.type = ACPI_TYPE_INTEGER;
538                 arg.integer.value = sleep_state;
539
540                 status = acpi_evaluate_object(NULL, METHOD_NAME__BFS, &arg_list, NULL);
541                 if (ACPI_FAILURE(status) && status != AE_NOT_FOUND) {
542                         ACPI_EXCEPTION((AE_INFO, status, "During Method _BFS"));
543                 }
544         }
545         return_ACPI_STATUS(status);
546 }
547
548 /*******************************************************************************
549  *
550  * FUNCTION:    acpi_leave_sleep_state
551  *
552  * PARAMETERS:  sleep_state         - Which sleep state we just exited
553  *
554  * RETURN:      Status
555  *
556  * DESCRIPTION: Perform OS-independent ACPI cleanup after a sleep
557  *              Called with interrupts ENABLED.
558  *
559  ******************************************************************************/
560 acpi_status acpi_leave_sleep_state(u8 sleep_state)
561 {
562         struct acpi_object_list arg_list;
563         union acpi_object arg;
564         acpi_status status;
565
566         ACPI_FUNCTION_TRACE(acpi_leave_sleep_state);
567
568         /* Ensure enter_sleep_state_prep -> enter_sleep_state ordering */
569
570         acpi_gbl_sleep_type_a = ACPI_SLEEP_TYPE_INVALID;
571
572         /* Setup parameter object */
573
574         arg_list.count = 1;
575         arg_list.pointer = &arg;
576         arg.type = ACPI_TYPE_INTEGER;
577
578         /* Ignore any errors from these methods */
579
580         arg.integer.value = ACPI_SST_WAKING;
581         status = acpi_evaluate_object(NULL, METHOD_NAME__SST, &arg_list, NULL);
582         if (ACPI_FAILURE(status) && status != AE_NOT_FOUND) {
583                 ACPI_EXCEPTION((AE_INFO, status, "During Method _SST"));
584         }
585
586         /*
587          * GPEs must be enabled before _WAK is called as GPEs
588          * might get fired there
589          *
590          * Restore the GPEs:
591          * 1) Disable/Clear all GPEs
592          * 2) Enable all runtime GPEs
593          */
594         status = acpi_hw_disable_all_gpes();
595         if (ACPI_FAILURE(status)) {
596                 return_ACPI_STATUS(status);
597         }
598         status = acpi_hw_enable_all_runtime_gpes();
599         if (ACPI_FAILURE(status)) {
600                 return_ACPI_STATUS(status);
601         }
602
603         arg.integer.value = sleep_state;
604         status = acpi_evaluate_object(NULL, METHOD_NAME__WAK, &arg_list, NULL);
605         if (ACPI_FAILURE(status) && status != AE_NOT_FOUND) {
606                 ACPI_EXCEPTION((AE_INFO, status, "During Method _WAK"));
607         }
608         /* TBD: _WAK "sometimes" returns stuff - do we want to look at it? */
609
610         /*
611          * Some BIOSes assume that WAK_STS will be cleared on resume and use
612          * it to determine whether the system is rebooting or resuming. Clear
613          * it for compatibility.
614          */
615         acpi_write_bit_register(ACPI_BITREG_WAKE_STATUS, 1);
616
617         acpi_gbl_system_awake_and_running = TRUE;
618
619         /* Enable power button */
620
621         (void)
622             acpi_write_bit_register(acpi_gbl_fixed_event_info
623                               [ACPI_EVENT_POWER_BUTTON].
624                               enable_register_id, ACPI_ENABLE_EVENT);
625
626         (void)
627             acpi_write_bit_register(acpi_gbl_fixed_event_info
628                               [ACPI_EVENT_POWER_BUTTON].
629                               status_register_id, ACPI_CLEAR_STATUS);
630
631         arg.integer.value = ACPI_SST_WORKING;
632         status = acpi_evaluate_object(NULL, METHOD_NAME__SST, &arg_list, NULL);
633         if (ACPI_FAILURE(status) && status != AE_NOT_FOUND) {
634                 ACPI_EXCEPTION((AE_INFO, status, "During Method _SST"));
635         }
636
637         return_ACPI_STATUS(status);
638 }
639
640 ACPI_EXPORT_SYMBOL(acpi_leave_sleep_state)