Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

Replace CONFIG_SOFTWARE_SUSPEND with CONFIG_HIBERNATION

Replace CONFIG_SOFTWARE_SUSPEND with CONFIG_HIBERNATION to avoid
confusion (among other things, with CONFIG_SUSPEND introduced in the
next patch).

Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>

authored by

Rafael J. Wysocki and committed by
Linus Torvalds
b0cb1a19 6c8dca5d

+47 -47
+2 -2
arch/i386/Kconfig.debug
··· 36 36 This option will slow down process creation somewhat. 37 37 38 38 comment "Page alloc debug is incompatible with Software Suspend on i386" 39 - depends on DEBUG_KERNEL && SOFTWARE_SUSPEND 39 + depends on DEBUG_KERNEL && HIBERNATION 40 40 41 41 config DEBUG_PAGEALLOC 42 42 bool "Debug page memory allocations" 43 - depends on DEBUG_KERNEL && !SOFTWARE_SUSPEND && !HUGETLBFS 43 + depends on DEBUG_KERNEL && !HIBERNATION && !HUGETLBFS 44 44 help 45 45 Unmap pages from the kernel linear mapping after free_pages(). 46 46 This results in a large slowdown, but helps to find certain types
+1 -1
arch/i386/kernel/e820.c
··· 321 321 322 322 subsys_initcall(request_standard_resources); 323 323 324 - #if defined(CONFIG_PM) && defined(CONFIG_SOFTWARE_SUSPEND) 324 + #if defined(CONFIG_PM) && defined(CONFIG_HIBERNATION) 325 325 /** 326 326 * e820_mark_nosave_regions - Find the ranges of physical addresses that do not 327 327 * correspond to e820 RAM areas and mark the corresponding pages as nosave for
+1 -1
arch/i386/mm/init.c
··· 432 432 paravirt_pagetable_setup_done(pgd_base); 433 433 } 434 434 435 - #if defined(CONFIG_SOFTWARE_SUSPEND) || defined(CONFIG_ACPI) 435 + #if defined(CONFIG_HIBERNATION) || defined(CONFIG_ACPI) 436 436 /* 437 437 * Swap suspend & friends need this for resume because things like the intel-agp 438 438 * driver might have split up a kernel 4MB mapping.
+1 -1
arch/i386/power/Makefile
··· 1 1 obj-$(CONFIG_PM) += cpu.o 2 - obj-$(CONFIG_SOFTWARE_SUSPEND) += swsusp.o suspend.o 2 + obj-$(CONFIG_HIBERNATION) += swsusp.o suspend.o
+1 -1
arch/powerpc/Kconfig.debug
··· 20 20 21 21 config DEBUG_PAGEALLOC 22 22 bool "Debug page memory allocations" 23 - depends on DEBUG_KERNEL && !SOFTWARE_SUSPEND 23 + depends on DEBUG_KERNEL && !HIBERNATION 24 24 help 25 25 Unmap pages from the kernel linear mapping after free_pages(). 26 26 This results in a large slowdown, but helps to find certain types
+1 -1
arch/powerpc/configs/lite5200_defconfig
··· 196 196 # CONFIG_PM_LEGACY is not set 197 197 # CONFIG_PM_DEBUG is not set 198 198 # CONFIG_PM_SYSFS_DEPRECATED is not set 199 - # CONFIG_SOFTWARE_SUSPEND is not set 199 + # CONFIG_HIBERNATION is not set 200 200 CONFIG_SECCOMP=y 201 201 # CONFIG_WANT_DEVICE_TREE is not set 202 202 CONFIG_ISA_DMA_API=y
+1 -1
arch/powerpc/configs/pmac32_defconfig
··· 218 218 CONFIG_PM_DEBUG=y 219 219 # CONFIG_DISABLE_CONSOLE_SUSPEND is not set 220 220 CONFIG_PM_SYSFS_DEPRECATED=y 221 - CONFIG_SOFTWARE_SUSPEND=y 221 + CONFIG_HIBERNATION=y 222 222 CONFIG_PM_STD_PARTITION="" 223 223 CONFIG_APM_EMULATION=y 224 224 CONFIG_SECCOMP=y
+3 -3
arch/powerpc/kernel/Makefile
··· 37 37 obj-$(CONFIG_CRASH_DUMP) += crash_dump.o 38 38 obj-$(CONFIG_6xx) += idle_6xx.o l2cr_6xx.o cpu_setup_6xx.o 39 39 obj-$(CONFIG_TAU) += tau_6xx.o 40 - obj-$(CONFIG_SOFTWARE_SUSPEND) += swsusp.o suspend.o 41 - obj32-$(CONFIG_SOFTWARE_SUSPEND) += swsusp_32.o 42 - obj64-$(CONFIG_SOFTWARE_SUSPEND) += swsusp_64.o swsusp_asm64.o 40 + obj-$(CONFIG_HIBERNATION) += swsusp.o suspend.o 41 + obj32-$(CONFIG_HIBERNATION) += swsusp_32.o 42 + obj64-$(CONFIG_HIBERNATION) += swsusp_64.o swsusp_asm64.o 43 43 obj32-$(CONFIG_MODULES) += module_32.o 44 44 45 45 ifeq ($(CONFIG_PPC_MERGE),y)
+1 -1
arch/ppc/configs/TQM8540_defconfig
··· 136 136 # CONFIG_BINFMT_MISC is not set 137 137 # CONFIG_CMDLINE_BOOL is not set 138 138 # CONFIG_PM is not set 139 - # CONFIG_SOFTWARE_SUSPEND is not set 139 + # CONFIG_HIBERNATION is not set 140 140 CONFIG_SECCOMP=y 141 141 CONFIG_ISA_DMA_API=y 142 142
+1 -1
arch/ppc/configs/TQM8541_defconfig
··· 138 138 # CONFIG_BINFMT_MISC is not set 139 139 # CONFIG_CMDLINE_BOOL is not set 140 140 # CONFIG_PM is not set 141 - # CONFIG_SOFTWARE_SUSPEND is not set 141 + # CONFIG_HIBERNATION is not set 142 142 CONFIG_SECCOMP=y 143 143 CONFIG_ISA_DMA_API=y 144 144
+1 -1
arch/ppc/configs/TQM8555_defconfig
··· 138 138 # CONFIG_BINFMT_MISC is not set 139 139 # CONFIG_CMDLINE_BOOL is not set 140 140 # CONFIG_PM is not set 141 - # CONFIG_SOFTWARE_SUSPEND is not set 141 + # CONFIG_HIBERNATION is not set 142 142 CONFIG_SECCOMP=y 143 143 CONFIG_ISA_DMA_API=y 144 144
+1 -1
arch/ppc/configs/TQM8560_defconfig
··· 137 137 # CONFIG_BINFMT_MISC is not set 138 138 # CONFIG_CMDLINE_BOOL is not set 139 139 # CONFIG_PM is not set 140 - # CONFIG_SOFTWARE_SUSPEND is not set 140 + # CONFIG_HIBERNATION is not set 141 141 CONFIG_SECCOMP=y 142 142 CONFIG_ISA_DMA_API=y 143 143
+1 -1
arch/ppc/configs/ev64360_defconfig
··· 142 142 CONFIG_CMDLINE_BOOL=y 143 143 CONFIG_CMDLINE="console=ttyMM0,115200 root=/dev/mtdblock1 rw rootfstype=jffs2" 144 144 # CONFIG_PM is not set 145 - # CONFIG_SOFTWARE_SUSPEND is not set 145 + # CONFIG_HIBERNATION is not set 146 146 CONFIG_SECCOMP=y 147 147 CONFIG_ISA_DMA_API=y 148 148
+1 -1
arch/ppc/configs/ml300_defconfig
··· 148 148 CONFIG_CMDLINE_BOOL=y 149 149 CONFIG_CMDLINE="console=ttyS0,9600" 150 150 # CONFIG_PM is not set 151 - # CONFIG_SOFTWARE_SUSPEND is not set 151 + # CONFIG_HIBERNATION is not set 152 152 CONFIG_SECCOMP=y 153 153 CONFIG_ISA_DMA_API=y 154 154
+1 -1
arch/ppc/configs/ml403_defconfig
··· 149 149 CONFIG_CMDLINE_BOOL=y 150 150 CONFIG_CMDLINE="console=ttyS0,9600" 151 151 # CONFIG_PM is not set 152 - # CONFIG_SOFTWARE_SUSPEND is not set 152 + # CONFIG_HIBERNATION is not set 153 153 CONFIG_SECCOMP=y 154 154 CONFIG_ISA_DMA_API=y 155 155
+1 -1
arch/ppc/configs/mpc834x_sys_defconfig
··· 130 130 # CONFIG_BINFMT_MISC is not set 131 131 # CONFIG_CMDLINE_BOOL is not set 132 132 # CONFIG_PM is not set 133 - # CONFIG_SOFTWARE_SUSPEND is not set 133 + # CONFIG_HIBERNATION is not set 134 134 CONFIG_SECCOMP=y 135 135 CONFIG_ISA_DMA_API=y 136 136
+1 -1
arch/ppc/configs/prep_defconfig
··· 166 166 CONFIG_PM=y 167 167 # CONFIG_PM_LEGACY is not set 168 168 # CONFIG_PM_DEBUG is not set 169 - CONFIG_SOFTWARE_SUSPEND=y 169 + CONFIG_HIBERNATION=y 170 170 CONFIG_PM_STD_PARTITION="" 171 171 # CONFIG_SECCOMP is not set 172 172 CONFIG_ISA_DMA_API=y
+1 -1
arch/sparc64/Kconfig.debug
··· 29 29 30 30 config DEBUG_PAGEALLOC 31 31 bool "Debug page memory allocations" 32 - depends on DEBUG_KERNEL && !SOFTWARE_SUSPEND 32 + depends on DEBUG_KERNEL && !HIBERNATION 33 33 help 34 34 Unmap pages from the kernel linear mapping after free_pages(). 35 35 This results in a large slowdown, but helps to find certain types
+1 -1
arch/x86_64/defconfig
··· 199 199 CONFIG_PM=y 200 200 # CONFIG_PM_LEGACY is not set 201 201 # CONFIG_PM_DEBUG is not set 202 - CONFIG_SOFTWARE_SUSPEND=y 202 + CONFIG_HIBERNATION=y 203 203 CONFIG_PM_STD_PARTITION="" 204 204 CONFIG_SUSPEND_SMP=y 205 205
+1 -1
arch/x86_64/kernel/Makefile
··· 26 26 obj-$(CONFIG_KEXEC) += machine_kexec.o relocate_kernel.o crash.o 27 27 obj-$(CONFIG_CRASH_DUMP) += crash_dump.o 28 28 obj-$(CONFIG_PM) += suspend.o 29 - obj-$(CONFIG_SOFTWARE_SUSPEND) += suspend_asm.o 29 + obj-$(CONFIG_HIBERNATION) += suspend_asm.o 30 30 obj-$(CONFIG_CPU_FREQ) += cpufreq/ 31 31 obj-$(CONFIG_EARLY_PRINTK) += early_printk.o 32 32 obj-$(CONFIG_IOMMU) += pci-gart.o aperture.o
+2 -2
arch/x86_64/kernel/suspend.c
··· 146 146 147 147 } 148 148 149 - #ifdef CONFIG_SOFTWARE_SUSPEND 149 + #ifdef CONFIG_HIBERNATION 150 150 /* Defined in arch/x86_64/kernel/suspend_asm.S */ 151 151 extern int restore_image(void); 152 152 ··· 236 236 unsigned long nosave_end_pfn = PAGE_ALIGN(__pa_symbol(&__nosave_end)) >> PAGE_SHIFT; 237 237 return (pfn >= nosave_begin_pfn) && (pfn < nosave_end_pfn); 238 238 } 239 - #endif /* CONFIG_SOFTWARE_SUSPEND */ 239 + #endif /* CONFIG_HIBERNATION */
+3 -3
drivers/acpi/sleep/main.c
··· 202 202 .finish = acpi_pm_finish, 203 203 }; 204 204 205 - #ifdef CONFIG_SOFTWARE_SUSPEND 205 + #ifdef CONFIG_HIBERNATION 206 206 static int acpi_hibernation_prepare(void) 207 207 { 208 208 return acpi_sleep_prepare(ACPI_STATE_S4); ··· 254 254 .pre_restore = acpi_hibernation_pre_restore, 255 255 .restore_cleanup = acpi_hibernation_restore_cleanup, 256 256 }; 257 - #endif /* CONFIG_SOFTWARE_SUSPEND */ 257 + #endif /* CONFIG_HIBERNATION */ 258 258 259 259 /** 260 260 * acpi_pm_device_sleep_state - return preferred power state of ACPI device ··· 374 374 375 375 pm_set_ops(&acpi_pm_ops); 376 376 377 - #ifdef CONFIG_SOFTWARE_SUSPEND 377 + #ifdef CONFIG_HIBERNATION 378 378 if (sleep_states[ACPI_STATE_S4]) 379 379 hibernation_set_ops(&acpi_hibernation_ops); 380 380 #else
+1 -1
drivers/acpi/sleep/proc.c
··· 66 66 goto Done; 67 67 } 68 68 state = simple_strtoul(str, NULL, 0); 69 - #ifdef CONFIG_SOFTWARE_SUSPEND 69 + #ifdef CONFIG_HIBERNATION 70 70 if (state == 4) { 71 71 error = hibernate(); 72 72 goto Done;
+1 -1
drivers/i2c/chips/tps65010.c
··· 352 352 /* REVISIT: this might need its own workqueue 353 353 * plus tweaks including deadlock avoidance ... 354 354 * also needs to get error handling and probably 355 - * an #ifdef CONFIG_SOFTWARE_SUSPEND 355 + * an #ifdef CONFIG_HIBERNATION 356 356 */ 357 357 hibernate(); 358 358 #endif
+1 -1
include/asm-i386/e820.h
··· 47 47 extern void limit_regions(unsigned long long size); 48 48 extern void print_memory_map(char *who); 49 49 50 - #if defined(CONFIG_PM) && defined(CONFIG_SOFTWARE_SUSPEND) 50 + #if defined(CONFIG_PM) && defined(CONFIG_HIBERNATION) 51 51 extern void e820_mark_nosave_regions(void); 52 52 #else 53 53 static inline void e820_mark_nosave_regions(void)
+4 -4
include/linux/suspend.h
··· 55 55 }; 56 56 57 57 #ifdef CONFIG_PM 58 - #ifdef CONFIG_SOFTWARE_SUSPEND 58 + #ifdef CONFIG_HIBERNATION 59 59 /* kernel/power/snapshot.c */ 60 60 extern void __register_nosave_region(unsigned long b, unsigned long e, int km); 61 61 static inline void register_nosave_region(unsigned long b, unsigned long e) ··· 73 73 74 74 extern void hibernation_set_ops(struct hibernation_ops *ops); 75 75 extern int hibernate(void); 76 - #else /* CONFIG_SOFTWARE_SUSPEND */ 76 + #else /* CONFIG_HIBERNATION */ 77 77 static inline int swsusp_page_is_forbidden(struct page *p) { return 0; } 78 78 static inline void swsusp_set_page_free(struct page *p) {} 79 79 static inline void swsusp_unset_page_free(struct page *p) {} 80 80 81 81 static inline void hibernation_set_ops(struct hibernation_ops *ops) {} 82 82 static inline int hibernate(void) { return -ENOSYS; } 83 - #endif /* CONFIG_SOFTWARE_SUSPEND */ 83 + #endif /* CONFIG_HIBERNATION */ 84 84 85 85 void save_processor_state(void); 86 86 void restore_processor_state(void); ··· 121 121 #define pm_notifier(fn, pri) do { (void)(fn); } while (0) 122 122 #endif /* CONFIG_PM */ 123 123 124 - #if !defined CONFIG_SOFTWARE_SUSPEND || !defined(CONFIG_PM) 124 + #if !defined CONFIG_HIBERNATION || !defined(CONFIG_PM) 125 125 static inline void register_nosave_region(unsigned long b, unsigned long e) 126 126 { 127 127 }
+3 -3
kernel/power/Kconfig
··· 72 72 CAUTION: this option will cause your machine's real-time clock to be 73 73 set to an invalid time after a resume. 74 74 75 - config SOFTWARE_SUSPEND 76 - bool "Software Suspend (Hibernation)" 75 + config HIBERNATION 76 + bool "Hibernation" 77 77 depends on PM && SWAP && (((X86 || PPC64_SWSUSP) && (!SMP || SUSPEND_SMP)) || ((FRV || PPC32) && !SMP)) 78 78 ---help--- 79 79 Enable the suspend to disk (STD) functionality, which is usually ··· 112 112 113 113 config PM_STD_PARTITION 114 114 string "Default resume partition" 115 - depends on SOFTWARE_SUSPEND 115 + depends on HIBERNATION 116 116 default "" 117 117 ---help--- 118 118 The default resume partition is the partition that the suspend-
+1 -1
kernel/power/Makefile
··· 5 5 6 6 obj-y := main.o process.o console.o 7 7 obj-$(CONFIG_PM_LEGACY) += pm.o 8 - obj-$(CONFIG_SOFTWARE_SUSPEND) += swsusp.o disk.o snapshot.o swap.o user.o 8 + obj-$(CONFIG_HIBERNATION) += swsusp.o disk.o snapshot.o swap.o user.o 9 9 10 10 obj-$(CONFIG_MAGIC_SYSRQ) += poweroff.o
+1 -1
kernel/power/main.c
··· 292 292 if (pm_states[i] && valid_state(i)) 293 293 s += sprintf(s,"%s ", pm_states[i]); 294 294 } 295 - #ifdef CONFIG_SOFTWARE_SUSPEND 295 + #ifdef CONFIG_HIBERNATION 296 296 s += sprintf(s, "%s\n", "disk"); 297 297 #else 298 298 if (s != buf)
+1 -1
kernel/power/power.h
··· 13 13 14 14 15 15 16 - #ifdef CONFIG_SOFTWARE_SUSPEND 16 + #ifdef CONFIG_HIBERNATION 17 17 /* 18 18 * Keep some memory free so that I/O operations can succeed without paging 19 19 * [Might this be more than 4 MB?]
+1 -1
kernel/sys.c
··· 954 954 unlock_kernel(); 955 955 return -EINVAL; 956 956 957 - #ifdef CONFIG_SOFTWARE_SUSPEND 957 + #ifdef CONFIG_HIBERNATION 958 958 case LINUX_REBOOT_CMD_SW_SUSPEND: 959 959 { 960 960 int ret = hibernate();
+2 -2
mm/Kconfig
··· 116 116 config MEMORY_HOTPLUG 117 117 bool "Allow for memory hot-add" 118 118 depends on SPARSEMEM || X86_64_ACPI_NUMA 119 - depends on HOTPLUG && !SOFTWARE_SUSPEND && ARCH_ENABLE_MEMORY_HOTPLUG 119 + depends on HOTPLUG && !HIBERNATION && ARCH_ENABLE_MEMORY_HOTPLUG 120 120 depends on (IA64 || X86 || PPC64 || SUPERH) 121 121 122 122 comment "Memory hotplug is currently incompatible with Software Suspend" 123 - depends on SPARSEMEM && HOTPLUG && SOFTWARE_SUSPEND 123 + depends on SPARSEMEM && HOTPLUG && HIBERNATION 124 124 125 125 config MEMORY_HOTPLUG_SPARSE 126 126 def_bool y
+3 -3
mm/swapfile.c
··· 425 425 } 426 426 } 427 427 428 - #ifdef CONFIG_SOFTWARE_SUSPEND 428 + #ifdef CONFIG_HIBERNATION 429 429 /* 430 430 * Find the swap type that corresponds to given device (if any). 431 431 * ··· 951 951 } 952 952 } 953 953 954 - #ifdef CONFIG_SOFTWARE_SUSPEND 954 + #ifdef CONFIG_HIBERNATION 955 955 /* 956 956 * Get the (PAGE_SIZE) block corresponding to given offset on the swapdev 957 957 * corresponding to given index in swap_info (swap type). ··· 966 966 sis = swap_info + swap_type; 967 967 return (sis->flags & SWP_WRITEOK) ? map_swap_page(sis, offset) : 0; 968 968 } 969 - #endif /* CONFIG_SOFTWARE_SUSPEND */ 969 + #endif /* CONFIG_HIBERNATION */ 970 970 971 971 /* 972 972 * Free all of a swapdev's extent information