2 * kernel/power/hibernate.c - Hibernation (a.k.a suspend-to-disk) support.
4 * Copyright (c) 2003 Patrick Mochel
5 * Copyright (c) 2003 Open Source Development Lab
6 * Copyright (c) 2004 Pavel Machek <pavel@ucw.cz>
7 * Copyright (c) 2009 Rafael J. Wysocki, Novell Inc.
9 * This file is released under the GPLv2.
12 #include <linux/suspend.h>
13 #include <linux/syscalls.h>
14 #include <linux/reboot.h>
15 #include <linux/string.h>
16 #include <linux/device.h>
17 #include <linux/export.h>
18 #include <linux/kmod.h>
19 #include <linux/delay.h>
21 #include <linux/mount.h>
23 #include <linux/console.h>
24 #include <linux/cpu.h>
25 #include <linux/freezer.h>
26 #include <linux/gfp.h>
27 #include <linux/syscore_ops.h>
28 #include <scsi/scsi_scan.h>
33 static int nocompress
= 0;
34 static int noresume
= 0;
35 static char resume_file
[256] = CONFIG_PM_STD_PARTITION
;
36 dev_t swsusp_resume_device
;
37 sector_t swsusp_resume_block
;
38 int in_suspend __nosavedata
= 0;
48 __HIBERNATION_AFTER_LAST
50 #define HIBERNATION_MAX (__HIBERNATION_AFTER_LAST-1)
51 #define HIBERNATION_FIRST (HIBERNATION_INVALID + 1)
53 static int hibernation_mode
= HIBERNATION_SHUTDOWN
;
55 static const struct platform_hibernation_ops
*hibernation_ops
;
58 * hibernation_set_ops - Set the global hibernate operations.
59 * @ops: Hibernation operations to use in subsequent hibernation transitions.
61 void hibernation_set_ops(const struct platform_hibernation_ops
*ops
)
63 if (ops
&& !(ops
->begin
&& ops
->end
&& ops
->pre_snapshot
64 && ops
->prepare
&& ops
->finish
&& ops
->enter
&& ops
->pre_restore
65 && ops
->restore_cleanup
&& ops
->leave
)) {
69 mutex_lock(&pm_mutex
);
70 hibernation_ops
= ops
;
72 hibernation_mode
= HIBERNATION_PLATFORM
;
73 else if (hibernation_mode
== HIBERNATION_PLATFORM
)
74 hibernation_mode
= HIBERNATION_SHUTDOWN
;
76 mutex_unlock(&pm_mutex
);
79 static bool entering_platform_hibernation
;
81 bool system_entering_hibernation(void)
83 return entering_platform_hibernation
;
85 EXPORT_SYMBOL(system_entering_hibernation
);
87 #ifdef CONFIG_PM_DEBUG
88 static void hibernation_debug_sleep(void)
90 printk(KERN_INFO
"hibernation debug: Waiting for 5 seconds.\n");
94 static int hibernation_testmode(int mode
)
96 if (hibernation_mode
== mode
) {
97 hibernation_debug_sleep();
103 static int hibernation_test(int level
)
105 if (pm_test_level
== level
) {
106 hibernation_debug_sleep();
111 #else /* !CONFIG_PM_DEBUG */
112 static int hibernation_testmode(int mode
) { return 0; }
113 static int hibernation_test(int level
) { return 0; }
114 #endif /* !CONFIG_PM_DEBUG */
117 * platform_begin - Call platform to start hibernation.
118 * @platform_mode: Whether or not to use the platform driver.
120 static int platform_begin(int platform_mode
)
122 return (platform_mode
&& hibernation_ops
) ?
123 hibernation_ops
->begin() : 0;
127 * platform_end - Call platform to finish transition to the working state.
128 * @platform_mode: Whether or not to use the platform driver.
130 static void platform_end(int platform_mode
)
132 if (platform_mode
&& hibernation_ops
)
133 hibernation_ops
->end();
137 * platform_pre_snapshot - Call platform to prepare the machine for hibernation.
138 * @platform_mode: Whether or not to use the platform driver.
140 * Use the platform driver to prepare the system for creating a hibernate image,
141 * if so configured, and return an error code if that fails.
144 static int platform_pre_snapshot(int platform_mode
)
146 return (platform_mode
&& hibernation_ops
) ?
147 hibernation_ops
->pre_snapshot() : 0;
151 * platform_leave - Call platform to prepare a transition to the working state.
152 * @platform_mode: Whether or not to use the platform driver.
154 * Use the platform driver prepare to prepare the machine for switching to the
155 * normal mode of operation.
157 * This routine is called on one CPU with interrupts disabled.
159 static void platform_leave(int platform_mode
)
161 if (platform_mode
&& hibernation_ops
)
162 hibernation_ops
->leave();
166 * platform_finish - Call platform to switch the system to the working state.
167 * @platform_mode: Whether or not to use the platform driver.
169 * Use the platform driver to switch the machine to the normal mode of
172 * This routine must be called after platform_prepare().
174 static void platform_finish(int platform_mode
)
176 if (platform_mode
&& hibernation_ops
)
177 hibernation_ops
->finish();
181 * platform_pre_restore - Prepare for hibernate image restoration.
182 * @platform_mode: Whether or not to use the platform driver.
184 * Use the platform driver to prepare the system for resume from a hibernation
187 * If the restore fails after this function has been called,
188 * platform_restore_cleanup() must be called.
190 static int platform_pre_restore(int platform_mode
)
192 return (platform_mode
&& hibernation_ops
) ?
193 hibernation_ops
->pre_restore() : 0;
197 * platform_restore_cleanup - Switch to the working state after failing restore.
198 * @platform_mode: Whether or not to use the platform driver.
200 * Use the platform driver to switch the system to the normal mode of operation
201 * after a failing restore.
203 * If platform_pre_restore() has been called before the failing restore, this
204 * function must be called too, regardless of the result of
205 * platform_pre_restore().
207 static void platform_restore_cleanup(int platform_mode
)
209 if (platform_mode
&& hibernation_ops
)
210 hibernation_ops
->restore_cleanup();
214 * platform_recover - Recover from a failure to suspend devices.
215 * @platform_mode: Whether or not to use the platform driver.
217 static void platform_recover(int platform_mode
)
219 if (platform_mode
&& hibernation_ops
&& hibernation_ops
->recover
)
220 hibernation_ops
->recover();
224 * swsusp_show_speed - Print time elapsed between two events during hibernation.
225 * @start: Starting event.
226 * @stop: Final event.
227 * @nr_pages: Number of memory pages processed between @start and @stop.
228 * @msg: Additional diagnostic message to print.
230 void swsusp_show_speed(struct timeval
*start
, struct timeval
*stop
,
231 unsigned nr_pages
, char *msg
)
233 s64 elapsed_centisecs64
;
238 elapsed_centisecs64
= timeval_to_ns(stop
) - timeval_to_ns(start
);
239 do_div(elapsed_centisecs64
, NSEC_PER_SEC
/ 100);
240 centisecs
= elapsed_centisecs64
;
242 centisecs
= 1; /* avoid div-by-zero */
243 k
= nr_pages
* (PAGE_SIZE
/ 1024);
244 kps
= (k
* 100) / centisecs
;
245 printk(KERN_INFO
"PM: %s %d kbytes in %d.%02d seconds (%d.%02d MB/s)\n",
247 centisecs
/ 100, centisecs
% 100,
248 kps
/ 1000, (kps
% 1000) / 10);
252 * create_image - Create a hibernation image.
253 * @platform_mode: Whether or not to use the platform driver.
255 * Execute device drivers' .freeze_noirq() callbacks, create a hibernation image
256 * and execute the drivers' .thaw_noirq() callbacks.
258 * Control reappears in this routine after the subsequent restore.
260 static int create_image(int platform_mode
)
264 error
= dpm_suspend_noirq(PMSG_FREEZE
);
266 printk(KERN_ERR
"PM: Some devices failed to power down, "
267 "aborting hibernation\n");
271 error
= platform_pre_snapshot(platform_mode
);
272 if (error
|| hibernation_test(TEST_PLATFORM
))
273 goto Platform_finish
;
275 error
= disable_nonboot_cpus();
276 if (error
|| hibernation_test(TEST_CPUS
)
277 || hibernation_testmode(HIBERNATION_TEST
))
282 error
= syscore_suspend();
284 printk(KERN_ERR
"PM: Some system devices failed to power down, "
285 "aborting hibernation\n");
289 if (hibernation_test(TEST_CORE
) || pm_wakeup_pending())
293 save_processor_state();
294 error
= swsusp_arch_suspend();
296 printk(KERN_ERR
"PM: Error %d creating hibernation image\n",
298 /* Restore control flow magically appears here */
299 restore_processor_state();
301 events_check_enabled
= false;
302 platform_leave(platform_mode
);
312 enable_nonboot_cpus();
315 platform_finish(platform_mode
);
317 dpm_resume_noirq(in_suspend
?
318 (error
? PMSG_RECOVER
: PMSG_THAW
) : PMSG_RESTORE
);
324 * hibernation_snapshot - Quiesce devices and create a hibernation image.
325 * @platform_mode: If set, use platform driver to prepare for the transition.
327 * This routine must be called with pm_mutex held.
329 int hibernation_snapshot(int platform_mode
)
331 pm_message_t msg
= PMSG_RECOVER
;
334 error
= platform_begin(platform_mode
);
338 error
= dpm_prepare(PMSG_FREEZE
);
340 goto Complete_devices
;
342 /* Preallocate image memory before shutting down devices. */
343 error
= hibernate_preallocate_memory();
345 goto Complete_devices
;
348 pm_restrict_gfp_mask();
349 error
= dpm_suspend(PMSG_FREEZE
);
351 goto Recover_platform
;
353 if (hibernation_test(TEST_DEVICES
))
354 goto Recover_platform
;
356 error
= create_image(platform_mode
);
358 * Control returns here (1) after the image has been created or the
359 * image creation has failed and (2) after a successful restore.
363 /* We may need to release the preallocated image pages here. */
364 if (error
|| !in_suspend
)
367 msg
= in_suspend
? (error
? PMSG_RECOVER
: PMSG_THAW
) : PMSG_RESTORE
;
370 if (error
|| !in_suspend
)
371 pm_restore_gfp_mask();
379 platform_end(platform_mode
);
383 platform_recover(platform_mode
);
388 * resume_target_kernel - Restore system state from a hibernation image.
389 * @platform_mode: Whether or not to use the platform driver.
391 * Execute device drivers' .freeze_noirq() callbacks, restore the contents of
392 * highmem that have not been restored yet from the image and run the low-level
393 * code that will restore the remaining contents of memory and switch to the
394 * just restored target kernel.
396 static int resume_target_kernel(bool platform_mode
)
400 error
= dpm_suspend_noirq(PMSG_QUIESCE
);
402 printk(KERN_ERR
"PM: Some devices failed to power down, "
403 "aborting resume\n");
407 error
= platform_pre_restore(platform_mode
);
411 error
= disable_nonboot_cpus();
417 error
= syscore_suspend();
421 save_processor_state();
422 error
= restore_highmem();
424 error
= swsusp_arch_resume();
426 * The code below is only ever reached in case of a failure.
427 * Otherwise, execution continues at the place where
428 * swsusp_arch_suspend() was called.
432 * This call to restore_highmem() reverts the changes made by
438 * The only reason why swsusp_arch_resume() can fail is memory being
439 * very tight, so we have to free it as soon as we can to avoid
440 * subsequent failures.
443 restore_processor_state();
444 touch_softlockup_watchdog();
452 enable_nonboot_cpus();
455 platform_restore_cleanup(platform_mode
);
457 dpm_resume_noirq(PMSG_RECOVER
);
463 * hibernation_restore - Quiesce devices and restore from a hibernation image.
464 * @platform_mode: If set, use platform driver to prepare for the transition.
466 * This routine must be called with pm_mutex held. If it is successful, control
467 * reappears in the restored target kernel in hibernation_snaphot().
469 int hibernation_restore(int platform_mode
)
473 pm_prepare_console();
475 pm_restrict_gfp_mask();
476 error
= dpm_suspend_start(PMSG_QUIESCE
);
478 error
= resume_target_kernel(platform_mode
);
479 dpm_resume_end(PMSG_RECOVER
);
481 pm_restore_gfp_mask();
483 pm_restore_console();
488 * hibernation_platform_enter - Power off the system using the platform driver.
490 int hibernation_platform_enter(void)
494 if (!hibernation_ops
)
498 * We have cancelled the power transition by running
499 * hibernation_ops->finish() before saving the image, so we should let
500 * the firmware know that we're going to enter the sleep state after all
502 error
= hibernation_ops
->begin();
506 entering_platform_hibernation
= true;
508 error
= dpm_suspend_start(PMSG_HIBERNATE
);
510 if (hibernation_ops
->recover
)
511 hibernation_ops
->recover();
515 error
= dpm_suspend_noirq(PMSG_HIBERNATE
);
519 error
= hibernation_ops
->prepare();
521 goto Platform_finish
;
523 error
= disable_nonboot_cpus();
525 goto Platform_finish
;
529 if (pm_wakeup_pending()) {
534 hibernation_ops
->enter();
535 /* We should never get here */
541 enable_nonboot_cpus();
544 hibernation_ops
->finish();
546 dpm_resume_noirq(PMSG_RESTORE
);
549 entering_platform_hibernation
= false;
550 dpm_resume_end(PMSG_RESTORE
);
554 hibernation_ops
->end();
560 * power_down - Shut the machine down for hibernation.
562 * Use the platform driver, if configured, to put the system into the sleep
563 * state corresponding to hibernation, or try to power it off or reboot,
564 * depending on the value of hibernation_mode.
566 static void power_down(void)
568 switch (hibernation_mode
) {
569 case HIBERNATION_TEST
:
570 case HIBERNATION_TESTPROC
:
572 case HIBERNATION_REBOOT
:
573 kernel_restart(NULL
);
575 case HIBERNATION_PLATFORM
:
576 hibernation_platform_enter();
577 case HIBERNATION_SHUTDOWN
:
583 * Valid image is on the disk, if we continue we risk serious data
584 * corruption after resume.
586 printk(KERN_CRIT
"PM: Please power down manually\n");
590 static int prepare_processes(void)
594 if (freeze_processes()) {
602 * hibernate - Carry out system hibernation, including saving the image.
608 mutex_lock(&pm_mutex
);
609 /* The snapshot device should not be opened while we're running */
610 if (!atomic_add_unless(&snapshot_device_available
, -1, 0)) {
615 pm_prepare_console();
616 error
= pm_notifier_call_chain(PM_HIBERNATION_PREPARE
);
620 error
= usermodehelper_disable();
624 /* Allocate memory management structures */
625 error
= create_basic_memory_bitmaps();
629 printk(KERN_INFO
"PM: Syncing filesystems ... ");
633 error
= prepare_processes();
637 if (hibernation_test(TEST_FREEZER
))
640 if (hibernation_testmode(HIBERNATION_TESTPROC
))
643 error
= hibernation_snapshot(hibernation_mode
== HIBERNATION_PLATFORM
);
648 unsigned int flags
= 0;
650 if (hibernation_mode
== HIBERNATION_PLATFORM
)
651 flags
|= SF_PLATFORM_MODE
;
653 flags
|= SF_NOCOMPRESS_MODE
;
654 pr_debug("PM: writing image.\n");
655 error
= swsusp_write(flags
);
660 pm_restore_gfp_mask();
662 pr_debug("PM: Image restored successfully.\n");
668 free_basic_memory_bitmaps();
669 usermodehelper_enable();
671 pm_notifier_call_chain(PM_POST_HIBERNATION
);
672 pm_restore_console();
673 atomic_inc(&snapshot_device_available
);
675 mutex_unlock(&pm_mutex
);
681 * software_resume - Resume from a saved hibernation image.
683 * This routine is called as a late initcall, when all devices have been
684 * discovered and initialized already.
686 * The image reading code is called to see if there is a hibernation image
687 * available for reading. If that is the case, devices are quiesced and the
688 * contents of memory is restored from the saved image.
690 * If this is successful, control reappears in the restored target kernel in
691 * hibernation_snaphot() which returns to hibernate(). Otherwise, the routine
692 * attempts to recover gracefully and make the kernel return to the normal mode
695 static int software_resume(void)
701 * If the user said "noresume".. bail out early.
707 * name_to_dev_t() below takes a sysfs buffer mutex when sysfs
708 * is configured into the kernel. Since the regular hibernate
709 * trigger path is via sysfs which takes a buffer mutex before
710 * calling hibernate functions (which take pm_mutex) this can
711 * cause lockdep to complain about a possible ABBA deadlock
712 * which cannot happen since we're in the boot code here and
713 * sysfs can't be invoked yet. Therefore, we use a subclass
714 * here to avoid lockdep complaining.
716 mutex_lock_nested(&pm_mutex
, SINGLE_DEPTH_NESTING
);
718 if (swsusp_resume_device
)
721 if (!strlen(resume_file
)) {
726 pr_debug("PM: Checking hibernation image partition %s\n", resume_file
);
728 /* Check if the device is there */
729 swsusp_resume_device
= name_to_dev_t(resume_file
);
730 if (!swsusp_resume_device
) {
732 * Some device discovery might still be in progress; we need
733 * to wait for this to finish.
735 wait_for_device_probe();
737 * We can't depend on SCSI devices being available after loading
738 * one of their modules until scsi_complete_async_scans() is
739 * called and the resume device usually is a SCSI one.
741 scsi_complete_async_scans();
743 swsusp_resume_device
= name_to_dev_t(resume_file
);
744 if (!swsusp_resume_device
) {
751 pr_debug("PM: Hibernation image partition %d:%d present\n",
752 MAJOR(swsusp_resume_device
), MINOR(swsusp_resume_device
));
754 pr_debug("PM: Looking for hibernation image.\n");
755 error
= swsusp_check();
759 /* The snapshot device should not be opened while we're running */
760 if (!atomic_add_unless(&snapshot_device_available
, -1, 0)) {
762 swsusp_close(FMODE_READ
);
766 pm_prepare_console();
767 error
= pm_notifier_call_chain(PM_RESTORE_PREPARE
);
771 error
= usermodehelper_disable();
775 error
= create_basic_memory_bitmaps();
779 pr_debug("PM: Preparing processes for restore.\n");
780 error
= prepare_processes();
782 swsusp_close(FMODE_READ
);
786 pr_debug("PM: Loading hibernation image.\n");
788 error
= swsusp_read(&flags
);
789 swsusp_close(FMODE_READ
);
791 hibernation_restore(flags
& SF_PLATFORM_MODE
);
793 printk(KERN_ERR
"PM: Failed to load hibernation image, recovering.\n");
797 free_basic_memory_bitmaps();
798 usermodehelper_enable();
800 pm_notifier_call_chain(PM_POST_RESTORE
);
801 pm_restore_console();
802 atomic_inc(&snapshot_device_available
);
803 /* For success case, the suspend path will release the lock */
805 mutex_unlock(&pm_mutex
);
806 pr_debug("PM: Hibernation image not present or could not be loaded.\n");
809 swsusp_close(FMODE_READ
);
813 late_initcall(software_resume
);
816 static const char * const hibernation_modes
[] = {
817 [HIBERNATION_PLATFORM
] = "platform",
818 [HIBERNATION_SHUTDOWN
] = "shutdown",
819 [HIBERNATION_REBOOT
] = "reboot",
820 [HIBERNATION_TEST
] = "test",
821 [HIBERNATION_TESTPROC
] = "testproc",
825 * /sys/power/disk - Control hibernation mode.
827 * Hibernation can be handled in several ways. There are a few different ways
828 * to put the system into the sleep state: using the platform driver (e.g. ACPI
829 * or other hibernation_ops), powering it off or rebooting it (for testing
830 * mostly), or using one of the two available test modes.
832 * The sysfs file /sys/power/disk provides an interface for selecting the
833 * hibernation mode to use. Reading from this file causes the available modes
834 * to be printed. There are 5 modes that can be supported:
842 * If a platform hibernation driver is in use, 'platform' will be supported
843 * and will be used by default. Otherwise, 'shutdown' will be used by default.
844 * The selected option (i.e. the one corresponding to the current value of
845 * hibernation_mode) is enclosed by a square bracket.
847 * To select a given hibernation mode it is necessary to write the mode's
848 * string representation (as returned by reading from /sys/power/disk) back
849 * into /sys/power/disk.
852 static ssize_t
disk_show(struct kobject
*kobj
, struct kobj_attribute
*attr
,
858 for (i
= HIBERNATION_FIRST
; i
<= HIBERNATION_MAX
; i
++) {
859 if (!hibernation_modes
[i
])
862 case HIBERNATION_SHUTDOWN
:
863 case HIBERNATION_REBOOT
:
864 case HIBERNATION_TEST
:
865 case HIBERNATION_TESTPROC
:
867 case HIBERNATION_PLATFORM
:
870 /* not a valid mode, continue with loop */
873 if (i
== hibernation_mode
)
874 buf
+= sprintf(buf
, "[%s] ", hibernation_modes
[i
]);
876 buf
+= sprintf(buf
, "%s ", hibernation_modes
[i
]);
878 buf
+= sprintf(buf
, "\n");
882 static ssize_t
disk_store(struct kobject
*kobj
, struct kobj_attribute
*attr
,
883 const char *buf
, size_t n
)
889 int mode
= HIBERNATION_INVALID
;
891 p
= memchr(buf
, '\n', n
);
892 len
= p
? p
- buf
: n
;
894 mutex_lock(&pm_mutex
);
895 for (i
= HIBERNATION_FIRST
; i
<= HIBERNATION_MAX
; i
++) {
896 if (len
== strlen(hibernation_modes
[i
])
897 && !strncmp(buf
, hibernation_modes
[i
], len
)) {
902 if (mode
!= HIBERNATION_INVALID
) {
904 case HIBERNATION_SHUTDOWN
:
905 case HIBERNATION_REBOOT
:
906 case HIBERNATION_TEST
:
907 case HIBERNATION_TESTPROC
:
908 hibernation_mode
= mode
;
910 case HIBERNATION_PLATFORM
:
912 hibernation_mode
= mode
;
920 pr_debug("PM: Hibernation mode set to '%s'\n",
921 hibernation_modes
[mode
]);
922 mutex_unlock(&pm_mutex
);
923 return error
? error
: n
;
928 static ssize_t
resume_show(struct kobject
*kobj
, struct kobj_attribute
*attr
,
931 return sprintf(buf
,"%d:%d\n", MAJOR(swsusp_resume_device
),
932 MINOR(swsusp_resume_device
));
935 static ssize_t
resume_store(struct kobject
*kobj
, struct kobj_attribute
*attr
,
936 const char *buf
, size_t n
)
938 unsigned int maj
, min
;
942 if (sscanf(buf
, "%u:%u", &maj
, &min
) != 2)
945 res
= MKDEV(maj
,min
);
946 if (maj
!= MAJOR(res
) || min
!= MINOR(res
))
949 mutex_lock(&pm_mutex
);
950 swsusp_resume_device
= res
;
951 mutex_unlock(&pm_mutex
);
952 printk(KERN_INFO
"PM: Starting manual resume from disk\n");
962 static ssize_t
image_size_show(struct kobject
*kobj
, struct kobj_attribute
*attr
,
965 return sprintf(buf
, "%lu\n", image_size
);
968 static ssize_t
image_size_store(struct kobject
*kobj
, struct kobj_attribute
*attr
,
969 const char *buf
, size_t n
)
973 if (sscanf(buf
, "%lu", &size
) == 1) {
981 power_attr(image_size
);
983 static ssize_t
reserved_size_show(struct kobject
*kobj
,
984 struct kobj_attribute
*attr
, char *buf
)
986 return sprintf(buf
, "%lu\n", reserved_size
);
989 static ssize_t
reserved_size_store(struct kobject
*kobj
,
990 struct kobj_attribute
*attr
,
991 const char *buf
, size_t n
)
995 if (sscanf(buf
, "%lu", &size
) == 1) {
996 reserved_size
= size
;
1003 power_attr(reserved_size
);
1005 static struct attribute
* g
[] = {
1008 &image_size_attr
.attr
,
1009 &reserved_size_attr
.attr
,
1014 static struct attribute_group attr_group
= {
1019 static int __init
pm_disk_init(void)
1021 return sysfs_create_group(power_kobj
, &attr_group
);
1024 core_initcall(pm_disk_init
);
1027 static int __init
resume_setup(char *str
)
1032 strncpy( resume_file
, str
, 255 );
1036 static int __init
resume_offset_setup(char *str
)
1038 unsigned long long offset
;
1043 if (sscanf(str
, "%llu", &offset
) == 1)
1044 swsusp_resume_block
= offset
;
1049 static int __init
hibernate_setup(char *str
)
1051 if (!strncmp(str
, "noresume", 8))
1053 else if (!strncmp(str
, "nocompress", 10))
1058 static int __init
noresume_setup(char *str
)
1064 __setup("noresume", noresume_setup
);
1065 __setup("resume_offset=", resume_offset_setup
);
1066 __setup("resume=", resume_setup
);
1067 __setup("hibernate=", hibernate_setup
);