hc
2023-12-11 d2ccde1c8e90d38cee87a1b0309ad2827f3fd30d
kernel/kernel/power/Kconfig
....@@ -1,8 +1,9 @@
1
+# SPDX-License-Identifier: GPL-2.0-only
12 config SUSPEND
23 bool "Suspend to RAM and standby"
34 depends on ARCH_SUSPEND_POSSIBLE
45 default y
5
- ---help---
6
+ help
67 Allow the system to enter sleep states in which main memory is
78 powered and thus its contents are preserved, such as the
89 suspend-to-RAM state (e.g. the ACPI S3 state).
....@@ -26,15 +27,10 @@
2627 Skip the kernel sys_sync() before freezing user processes.
2728 Some systems prefer not to pay this cost on every invocation
2829 of suspend, or they are content with invoking sync() from
29
- user-space before invoking suspend. Say Y if that's your case.
30
-
31
-config HAS_WAKELOCK
32
- bool
33
- default y
34
-
35
-config WAKELOCK
36
- bool
37
- default y
30
+ user-space before invoking suspend. There's a run-time switch
31
+ at '/sys/power/sync_on_suspend' to configure this behaviour.
32
+ This setting changes the default for the run-tim switch. Say Y
33
+ to change the default to disable the kernel sys_sync().
3834
3935 config HIBERNATE_CALLBACKS
4036 bool
....@@ -46,7 +42,7 @@
4642 select LZO_COMPRESS
4743 select LZO_DECOMPRESS
4844 select CRC32
49
- ---help---
45
+ help
5046 Enable the suspend to disk (STD) functionality, which is usually
5147 called "hibernation" in user interfaces. STD checkpoints the
5248 system and powers it off; and restores that checkpoint on reboot.
....@@ -73,7 +69,7 @@
7369 need to run mkswap against the swap partition used for the suspend.
7470
7571 It also works with swap files to a limited extent (for details see
76
- <file:Documentation/power/swsusp-and-swap-files.txt>).
72
+ <file:Documentation/power/swsusp-and-swap-files.rst>).
7773
7874 Right now you may boot without resuming and resume later but in the
7975 meantime you cannot use the swap partition(s)/file(s) involved in
....@@ -82,16 +78,25 @@
8278 MOUNT any journaled filesystems mounted before the suspend or they
8379 will get corrupted in a nasty way.
8480
85
- For more information take a look at <file:Documentation/power/swsusp.txt>.
81
+ For more information take a look at <file:Documentation/power/swsusp.rst>.
8682
87
-config ARCH_SAVE_PAGE_KEYS
88
- bool
83
+config HIBERNATION_SNAPSHOT_DEV
84
+ bool "Userspace snapshot device"
85
+ depends on HIBERNATION
86
+ default y
87
+ help
88
+ Device used by the uswsusp tools.
89
+
90
+ Say N if no snapshotting from userspace is needed, this also
91
+ reduces the attack surface of the kernel.
92
+
93
+ If in doubt, say Y.
8994
9095 config PM_STD_PARTITION
9196 string "Default resume partition"
9297 depends on HIBERNATION
9398 default ""
94
- ---help---
99
+ help
95100 The default resume partition is the partition that the suspend-
96101 to-disk implementation will look for a suspended disk image.
97102
....@@ -122,11 +127,20 @@
122127 depends on PM_SLEEP
123128 select HOTPLUG_CPU
124129
130
+config PM_SLEEP_SMP_NONZERO_CPU
131
+ def_bool y
132
+ depends on PM_SLEEP_SMP
133
+ depends on ARCH_SUSPEND_NONZERO_CPU
134
+ help
135
+ If an arch can suspend (for suspend, hibernate, kexec, etc) on a
136
+ non-zero numbered CPU, it may define ARCH_SUSPEND_NONZERO_CPU. This
137
+ will allow nohz_full mask to include CPU0.
138
+
125139 config PM_AUTOSLEEP
126140 bool "Opportunistic sleep"
127141 depends on PM_SLEEP
128142 default n
129
- ---help---
143
+ help
130144 Allow the kernel to trigger a system transition into a global sleep
131145 state automatically whenever there are no active wakeup sources.
132146
....@@ -134,7 +148,7 @@
134148 bool "User space wakeup sources interface"
135149 depends on PM_SLEEP
136150 default n
137
- ---help---
151
+ help
138152 Allow user space to create, activate and deactivate wakeup source
139153 objects with the help of a sysfs-based interface.
140154
....@@ -151,7 +165,7 @@
151165
152166 config PM
153167 bool "Device power management core functionality"
154
- ---help---
168
+ help
155169 Enable functionality allowing I/O devices to be put into energy-saving
156170 (low power) states, for example after a specified period of inactivity
157171 (autosuspended), and woken up in response to a hardware-generated
....@@ -165,7 +179,7 @@
165179 config PM_DEBUG
166180 bool "Power Management Debug Support"
167181 depends on PM
168
- ---help---
182
+ help
169183 This option enables various debugging support in the Power Management
170184 code. This is helpful when debugging and reporting PM bugs, like
171185 suspend support.
....@@ -173,7 +187,7 @@
173187 config PM_ADVANCED_DEBUG
174188 bool "Extra PM attributes in sysfs for low-level debugging/testing"
175189 depends on PM_DEBUG
176
- ---help---
190
+ help
177191 Add extra sysfs attributes allowing one to access some Power Management
178192 fields of device objects from user space. If you are not a kernel
179193 developer interested in debugging/testing Power Management, say "no".
....@@ -181,7 +195,7 @@
181195 config PM_TEST_SUSPEND
182196 bool "Test suspend/resume and wakealarm during bootup"
183197 depends on SUSPEND && PM_DEBUG && RTC_CLASS=y
184
- ---help---
198
+ help
185199 This option will let you suspend your machine during bootup, and
186200 make it wake up a few seconds later using an RTC wakeup alarm.
187201 Enable this with a kernel parameter like "test_suspend=mem".
....@@ -196,7 +210,7 @@
196210 config DPM_WATCHDOG
197211 bool "Device suspend/resume watchdog"
198212 depends on PM_DEBUG && PSTORE && EXPERT
199
- ---help---
213
+ help
200214 Sets up a watchdog timer to capture drivers that are
201215 locked up attempting to suspend/resume a device.
202216 A detected lockup causes system panic with message
....@@ -229,7 +243,7 @@
229243 depends on PM_SLEEP_DEBUG
230244 depends on X86
231245 select PM_TRACE
232
- ---help---
246
+ help
233247 This enables some cheesy code to save the last PM event point in the
234248 RTC across reboots, so that you can debug a machine that just hangs
235249 during suspend (or more commonly, during resume).
....@@ -254,7 +268,7 @@
254268 notification of APM "events" (e.g. battery status change).
255269
256270 In order to use APM, you will need supporting software. For location
257
- and more information, read <file:Documentation/power/apm-acpi.txt>
271
+ and more information, read <file:Documentation/power/apm-acpi.rst>
258272 and the Battery Powered Linux mini-HOWTO, available from
259273 <http://www.tldp.org/docs.html#howto>.
260274