Kconfig 21 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620
  1. config SUSPEND
  2. bool "Suspend to RAM and standby"
  3. depends on ARCH_SUSPEND_POSSIBLE
  4. default y
  5. ---help---
  6. Allow the system to enter sleep states in which main memory is
  7. powered and thus its contents are preserved, such as the
  8. suspend-to-RAM state (e.g. the ACPI S3 state).
  9. config SUSPEND_FREEZER
  10. bool "Enable freezer for suspend to RAM/standby" \
  11. if ARCH_WANTS_FREEZER_CONTROL || BROKEN
  12. depends on SUSPEND
  13. default y
  14. help
  15. This allows you to turn off the freezer for suspend. If this is
  16. done, no tasks are frozen for suspend to RAM/standby.
  17. Turning OFF this setting is NOT recommended! If in doubt, say Y.
  18. config WAKELOCK
  19. bool "Android's method of preventing suspend"
  20. default y
  21. ---help---
  22. This allows applications to prevent the CPU from suspending while
  23. they need it.
  24. Say Y if you are running an android userspace.
  25. config HIBERNATE_CALLBACKS
  26. bool
  27. config HIBERNATION
  28. bool "Hibernation (aka 'suspend to disk')"
  29. depends on SWAP && ARCH_HIBERNATION_POSSIBLE
  30. select HIBERNATE_CALLBACKS
  31. select LZO_COMPRESS
  32. select LZO_DECOMPRESS
  33. select CRC32
  34. ---help---
  35. Enable the suspend to disk (STD) functionality, which is usually
  36. called "hibernation" in user interfaces. STD checkpoints the
  37. system and powers it off; and restores that checkpoint on reboot.
  38. You can suspend your machine with 'echo disk > /sys/power/state'
  39. after placing resume=/dev/swappartition on the kernel command line
  40. in your bootloader's configuration file.
  41. Alternatively, you can use the additional userland tools available
  42. from <http://suspend.sf.net>.
  43. In principle it does not require ACPI or APM, although for example
  44. ACPI will be used for the final steps when it is available. One
  45. of the reasons to use software suspend is that the firmware hooks
  46. for suspend states like suspend-to-RAM (STR) often don't work very
  47. well with Linux.
  48. It creates an image which is saved in your active swap. Upon the next
  49. boot, pass the 'resume=/dev/swappartition' argument to the kernel to
  50. have it detect the saved image, restore memory state from it, and
  51. continue to run as before. If you do not want the previous state to
  52. be reloaded, then use the 'noresume' kernel command line argument.
  53. Note, however, that fsck will be run on your filesystems and you will
  54. need to run mkswap against the swap partition used for the suspend.
  55. It also works with swap files to a limited extent (for details see
  56. <file:Documentation/power/swsusp-and-swap-files.txt>).
  57. Right now you may boot without resuming and resume later but in the
  58. meantime you cannot use the swap partition(s)/file(s) involved in
  59. suspending. Also in this case you must not use the filesystems
  60. that were mounted before the suspend. In particular, you MUST NOT
  61. MOUNT any journaled filesystems mounted before the suspend or they
  62. will get corrupted in a nasty way.
  63. For more information take a look at <file:Documentation/power/swsusp.txt>.
  64. config ARCH_SAVE_PAGE_KEYS
  65. bool
  66. config PM_STD_PARTITION
  67. string "Default resume partition"
  68. depends on HIBERNATION
  69. default ""
  70. ---help---
  71. The default resume partition is the partition that the suspend-
  72. to-disk implementation will look for a suspended disk image.
  73. The partition specified here will be different for almost every user.
  74. It should be a valid swap partition (at least for now) that is turned
  75. on before suspending.
  76. The partition specified can be overridden by specifying:
  77. resume=/dev/<other device>
  78. which will set the resume partition to the device specified.
  79. Note there is currently not a way to specify which device to save the
  80. suspended image to. It will simply pick the first available swap
  81. device.
  82. menuconfig TOI_CORE
  83. tristate "Enhanced Hibernation (TuxOnIce)"
  84. depends on HIBERNATION
  85. default n
  86. ---help---
  87. TuxOnIce is the 'new and improved' suspend support.
  88. See the TuxOnIce home page (tuxonice.net)
  89. for FAQs, HOWTOs and other documentation.
  90. comment "Image Storage (you need at least one allocator)"
  91. depends on TOI_CORE
  92. config TOI_FILE
  93. tristate "File Allocator"
  94. depends on TOI_CORE
  95. default y
  96. ---help---
  97. This option enables support for storing an image in a
  98. simple file. You might want this if your swap is
  99. sometimes full enough that you don't have enough spare
  100. space to store an image.
  101. config TOI_SWAP
  102. tristate "Swap Allocator"
  103. depends on TOI_CORE && SWAP
  104. default y
  105. ---help---
  106. This option enables support for storing an image in your
  107. swap space.
  108. comment "General Options"
  109. depends on TOI_CORE
  110. config TOI_PRUNE
  111. tristate "Image pruning support"
  112. depends on TOI_CORE && CRYPTO && BROKEN
  113. default y
  114. ---help---
  115. This option adds support for using cryptoapi hashing
  116. algorithms to identify pages with the same content. We
  117. then write a much smaller pointer to the first copy of
  118. the data instead of a complete (perhaps compressed)
  119. additional copy.
  120. You probably want this, so say Y here.
  121. comment "No image pruning support available without Cryptoapi support."
  122. depends on TOI_CORE && !CRYPTO
  123. config TOI_CRYPTO
  124. tristate "Compression support"
  125. depends on TOI_CORE && CRYPTO
  126. default y
  127. ---help---
  128. This option adds support for using cryptoapi compression
  129. algorithms. Compression is particularly useful as it can
  130. more than double your suspend and resume speed (depending
  131. upon how well your image compresses).
  132. You probably want this, so say Y here.
  133. comment "No compression support available without Cryptoapi support."
  134. depends on TOI_CORE && !CRYPTO
  135. config TOI_USERUI
  136. tristate "Userspace User Interface support"
  137. depends on TOI_CORE && NET && (VT || SERIAL_CONSOLE)
  138. default y
  139. ---help---
  140. This option enabled support for a userspace based user interface
  141. to TuxOnIce, which allows you to have a nice display while suspending
  142. and resuming, and also enables features such as pressing escape to
  143. cancel a cycle or interactive debugging.
  144. config TOI_USERUI_DEFAULT_PATH
  145. string "Default userui program location"
  146. default "/usr/local/sbin/tuxoniceui_text"
  147. depends on TOI_USERUI
  148. ---help---
  149. This entry allows you to specify a default path to the userui binary.
  150. config TOI_DEFAULT_IMAGE_SIZE_LIMIT
  151. int "Default image size limit"
  152. range -2 65536
  153. default "-2"
  154. depends on TOI_CORE
  155. ---help---
  156. This entry allows you to specify a default image size limit. It can
  157. be overridden at run-time using /sys/power/tuxonice/image_size_limit.
  158. config TOI_KEEP_IMAGE
  159. bool "Allow Keep Image Mode"
  160. depends on TOI_CORE
  161. ---help---
  162. This option allows you to keep and image and reuse it. It is intended
  163. __ONLY__ for use with systems where all filesystems are mounted read-
  164. only (kiosks, for example). To use it, compile this option in and boot
  165. normally. Set the KEEP_IMAGE flag in /sys/power/tuxonice and suspend.
  166. When you resume, the image will not be removed. You will be unable to turn
  167. off swap partitions (assuming you are using the swap allocator), but future
  168. suspends simply do a power-down. The image can be updated using the
  169. kernel command line parameter suspend_act= to turn off the keep image
  170. bit. Keep image mode is a little less user friendly on purpose - it
  171. should not be used without thought!
  172. config TOI_INCREMENTAL
  173. bool "Incremental Image Support"
  174. depends on TOI_CORE && 64BIT
  175. default n
  176. ---help---
  177. This option enables the work in progress toward using the dirty page
  178. tracking to record changes to pages. It is hoped that
  179. this will be an initial step toward implementing storing just
  180. the differences between consecutive images, which will
  181. increase the amount of storage needed for the image, but also
  182. increase the speed at which writing an image occurs and
  183. reduce the wear and tear on drives.
  184. At the moment, all that is implemented is the first step of keeping
  185. an existing image and then comparing it to the contents in memory
  186. (by setting /sys/power/tuxonice/verify_image to 1 and triggering a
  187. (fake) resume) to see what the page change tracking should find to be
  188. different. If you have verify_image set to 1, TuxOnIce will automatically
  189. invalidate the old image when you next try to hibernate, so there's no
  190. greater chance of disk corruption than normal.
  191. comment "No incremental image support available without Keep Image support."
  192. depends on TOI_CORE && !TOI_KEEP_IMAGE
  193. config TOI_REPLACE_SWSUSP
  194. bool "Replace swsusp by default"
  195. default y
  196. depends on TOI_CORE
  197. ---help---
  198. TuxOnIce can replace swsusp. This option makes that the default state,
  199. requiring you to echo 0 > /sys/power/tuxonice/replace_swsusp if you want
  200. to use the vanilla kernel functionality. Note that your initrd/ramfs will
  201. need to do this before trying to resume, too.
  202. With overriding swsusp enabled, echoing disk to /sys/power/state will
  203. start a TuxOnIce cycle. If resume= doesn't specify an allocator and both
  204. the swap and file allocators are compiled in, the swap allocator will be
  205. used by default.
  206. config TOI_IGNORE_LATE_INITCALL
  207. bool "Wait for initrd/ramfs to run, by default"
  208. default n
  209. depends on TOI_CORE
  210. ---help---
  211. When booting, TuxOnIce can check for an image and start to resume prior
  212. to any initrd/ramfs running (via a late initcall).
  213. If you don't have an initrd/ramfs, this is what you want to happen -
  214. otherwise you won't be able to safely resume. You should set this option
  215. to 'No'.
  216. If, however, you want your initrd/ramfs to run anyway before resuming,
  217. you need to tell TuxOnIce to ignore that earlier opportunity to resume.
  218. This can be done either by using this compile time option, or by
  219. overriding this option with the boot-time parameter toi_initramfs_resume_only=1.
  220. Note that if TuxOnIce can't resume at the earlier opportunity, the
  221. value of this option won't matter - the initramfs/initrd (if any) will
  222. run anyway.
  223. menuconfig TOI_CLUSTER
  224. tristate "Cluster support"
  225. default n
  226. depends on TOI_CORE && NET && BROKEN
  227. ---help---
  228. Support for linking multiple machines in a cluster so that they suspend
  229. and resume together.
  230. config TOI_DEFAULT_CLUSTER_INTERFACE
  231. string "Default cluster interface"
  232. depends on TOI_CLUSTER
  233. ---help---
  234. The default interface on which to communicate with other nodes in
  235. the cluster.
  236. If no value is set here, cluster support will be disabled by default.
  237. config TOI_DEFAULT_CLUSTER_KEY
  238. string "Default cluster key"
  239. default "Default"
  240. depends on TOI_CLUSTER
  241. ---help---
  242. The default key used by this node. All nodes in the same cluster
  243. have the same key. Multiple clusters may coexist on the same lan
  244. by using different values for this key.
  245. config TOI_CLUSTER_IMAGE_TIMEOUT
  246. int "Timeout when checking for image"
  247. default 15
  248. depends on TOI_CLUSTER
  249. ---help---
  250. Timeout (seconds) before continuing to boot when waiting to see
  251. whether other nodes might have an image. Set to -1 to wait
  252. indefinitely. In WAIT_UNTIL_NODES is non zero, we might continue
  253. booting sooner than this timeout.
  254. config TOI_CLUSTER_WAIT_UNTIL_NODES
  255. int "Nodes without image before continuing"
  256. default 0
  257. depends on TOI_CLUSTER
  258. ---help---
  259. When booting and no image is found, we wait to see if other nodes
  260. have an image before continuing to boot. This value lets us
  261. continue after seeing a certain number of nodes without an image,
  262. instead of continuing to wait for the timeout. Set to 0 to only
  263. use the timeout.
  264. config TOI_DEFAULT_CLUSTER_PRE_HIBERNATE
  265. string "Default pre-hibernate script"
  266. depends on TOI_CLUSTER
  267. ---help---
  268. The default script to be called when starting to hibernate.
  269. config TOI_DEFAULT_CLUSTER_POST_HIBERNATE
  270. string "Default post-hibernate script"
  271. depends on TOI_CLUSTER
  272. ---help---
  273. The default script to be called after resuming from hibernation.
  274. config TOI_DEFAULT_WAIT
  275. int "Default waiting time for emergency boot messages"
  276. default "25"
  277. range -1 32768
  278. depends on TOI_CORE
  279. help
  280. TuxOnIce can display warnings very early in the process of resuming,
  281. if (for example) it appears that you have booted a kernel that doesn't
  282. match an image on disk. It can then give you the opportunity to either
  283. continue booting that kernel, or reboot the machine. This option can be
  284. used to control how long to wait in such circumstances. -1 means wait
  285. forever. 0 means don't wait at all (do the default action, which will
  286. generally be to continue booting and remove the image). Values of 1 or
  287. more indicate a number of seconds (up to 255) to wait before doing the
  288. default.
  289. config TOI_DEFAULT_EXTRA_PAGES_ALLOWANCE
  290. int "Default extra pages allowance"
  291. default "2000"
  292. range 500 32768
  293. depends on TOI_CORE
  294. help
  295. This value controls the default for the allowance TuxOnIce makes for
  296. drivers to allocate extra memory during the atomic copy. The default
  297. value of 2000 will be okay in most cases. If you are using
  298. DRI, the easiest way to find what value to use is to try to hibernate
  299. and look at how many pages were actually needed in the sysfs entry
  300. /sys/power/tuxonice/debug_info (first number on the last line), adding
  301. a little extra because the value is not always the same.
  302. config TOI_CHECKSUM
  303. bool "Checksum pageset2"
  304. default n
  305. depends on TOI_CORE
  306. select CRYPTO
  307. select CRYPTO_ALGAPI
  308. select CRYPTO_MD4
  309. ---help---
  310. Adds support for checksumming pageset2 pages, to ensure you really get an
  311. atomic copy. Since some filesystems (XFS especially) change metadata even
  312. when there's no other activity, we need this to check for pages that have
  313. been changed while we were saving the page cache. If your debugging output
  314. always says no pages were resaved, you may be able to safely disable this
  315. option.
  316. config TOI
  317. bool
  318. depends on TOI_CORE!=n
  319. default y
  320. config TOI_EXPORTS
  321. bool
  322. depends on TOI_SWAP=m || TOI_FILE=m || \
  323. TOI_CRYPTO=m || TOI_CLUSTER=m || \
  324. TOI_USERUI=m || TOI_CORE=m
  325. default y
  326. config TOI_ZRAM_SUPPORT
  327. def_bool y
  328. depends on TOI && ZRAM!=n
  329. config TOI_FIXUP
  330. def_bool y
  331. depends on TOI
  332. config TOI_ENHANCE
  333. def_bool y
  334. depends on TOI
  335. config PM_SLEEP
  336. def_bool y
  337. depends on SUSPEND || HIBERNATE_CALLBACKS
  338. config PM_SLEEP_SMP
  339. def_bool y
  340. depends on SMP
  341. depends on ARCH_SUSPEND_POSSIBLE || ARCH_HIBERNATION_POSSIBLE
  342. depends on PM_SLEEP
  343. select HOTPLUG_CPU
  344. config PM_AUTOSLEEP
  345. bool "Opportunistic sleep"
  346. depends on PM_SLEEP
  347. default n
  348. ---help---
  349. Allow the kernel to trigger a system transition into a global sleep
  350. state automatically whenever there are no active wakeup sources.
  351. config PM_WAKELOCKS
  352. bool "User space wakeup sources interface"
  353. depends on PM_SLEEP
  354. default n
  355. ---help---
  356. Allow user space to create, activate and deactivate wakeup source
  357. objects with the help of a sysfs-based interface.
  358. config PM_WAKELOCKS_LIMIT
  359. int "Maximum number of user space wakeup sources (0 = no limit)"
  360. range 0 100000
  361. default 100
  362. depends on PM_WAKELOCKS
  363. config PM_WAKELOCKS_GC
  364. bool "Garbage collector for user space wakeup sources"
  365. depends on PM_WAKELOCKS
  366. default y
  367. config PM_RUNTIME
  368. bool "Run-time PM core functionality"
  369. depends on !IA64_HP_SIM
  370. ---help---
  371. Enable functionality allowing I/O devices to be put into energy-saving
  372. (low power) states at run time (or autosuspended) after a specified
  373. period of inactivity and woken up in response to a hardware-generated
  374. wake-up event or a driver's request.
  375. Hardware support is generally required for this functionality to work
  376. and the bus type drivers of the buses the devices are on are
  377. responsible for the actual handling of the autosuspend requests and
  378. wake-up events.
  379. config PM
  380. def_bool y
  381. depends on PM_SLEEP || PM_RUNTIME
  382. config PM_DEBUG
  383. bool "Power Management Debug Support"
  384. depends on PM
  385. ---help---
  386. This option enables various debugging support in the Power Management
  387. code. This is helpful when debugging and reporting PM bugs, like
  388. suspend support.
  389. config PM_ADVANCED_DEBUG
  390. bool "Extra PM attributes in sysfs for low-level debugging/testing"
  391. depends on PM_DEBUG
  392. ---help---
  393. Add extra sysfs attributes allowing one to access some Power Management
  394. fields of device objects from user space. If you are not a kernel
  395. developer interested in debugging/testing Power Management, say "no".
  396. config PM_TEST_SUSPEND
  397. bool "Test suspend/resume and wakealarm during bootup"
  398. depends on SUSPEND && PM_DEBUG && RTC_CLASS=y
  399. ---help---
  400. This option will let you suspend your machine during bootup, and
  401. make it wake up a few seconds later using an RTC wakeup alarm.
  402. Enable this with a kernel parameter like "test_suspend=mem".
  403. You probably want to have your system's RTC driver statically
  404. linked, ensuring that it's available when this test runs.
  405. config PM_SLEEP_DEBUG
  406. def_bool y
  407. depends on PM_DEBUG && PM_SLEEP
  408. config DPM_WATCHDOG
  409. bool "Device suspend/resume watchdog"
  410. depends on PM_DEBUG && PSTORE
  411. ---help---
  412. Sets up a watchdog timer to capture drivers that are
  413. locked up attempting to suspend/resume a device.
  414. A detected lockup causes system panic with message
  415. captured in pstore device for inspection in subsequent
  416. boot session.
  417. config DPM_WATCHDOG_TIMEOUT
  418. int "Watchdog timeout in seconds"
  419. range 1 120
  420. default 60
  421. depends on DPM_WATCHDOG
  422. config PM_TRACE
  423. bool
  424. help
  425. This enables code to save the last PM event point across
  426. reboot. The architecture needs to support this, x86 for
  427. example does by saving things in the RTC, see below.
  428. The architecture specific code must provide the extern
  429. functions from <linux/resume-trace.h> as well as the
  430. <asm/resume-trace.h> header with a TRACE_RESUME() macro.
  431. The way the information is presented is architecture-
  432. dependent, x86 will print the information during a
  433. late_initcall.
  434. config PM_TRACE_RTC
  435. bool "Suspend/resume event tracing"
  436. depends on PM_SLEEP_DEBUG
  437. depends on X86
  438. select PM_TRACE
  439. ---help---
  440. This enables some cheesy code to save the last PM event point in the
  441. RTC across reboots, so that you can debug a machine that just hangs
  442. during suspend (or more commonly, during resume).
  443. To use this debugging feature you should attempt to suspend the
  444. machine, reboot it and then run
  445. dmesg -s 1000000 | grep 'hash matches'
  446. CAUTION: this option will cause your machine's real-time clock to be
  447. set to an invalid time after a resume.
  448. config APM_EMULATION
  449. tristate "Advanced Power Management Emulation"
  450. depends on PM && SYS_SUPPORTS_APM_EMULATION
  451. help
  452. APM is a BIOS specification for saving power using several different
  453. techniques. This is mostly useful for battery powered laptops with
  454. APM compliant BIOSes. If you say Y here, the system time will be
  455. reset after a RESUME operation, the /proc/apm device will provide
  456. battery status information, and user-space programs will receive
  457. notification of APM "events" (e.g. battery status change).
  458. In order to use APM, you will need supporting software. For location
  459. and more information, read <file:Documentation/power/apm-acpi.txt>
  460. and the Battery Powered Linux mini-HOWTO, available from
  461. <http://www.tldp.org/docs.html#howto>.
  462. This driver does not spin down disk drives (see the hdparm(8)
  463. manpage ("man 8 hdparm") for that), and it doesn't turn off
  464. VESA-compliant "green" monitors.
  465. Generally, if you don't have a battery in your machine, there isn't
  466. much point in using this driver and you should say N. If you get
  467. random kernel OOPSes or reboots that don't seem to be related to
  468. anything, try disabling/enabling this option (or disabling/enabling
  469. APM in your BIOS).
  470. config PM_OPP
  471. bool
  472. ---help---
  473. SOCs have a standard set of tuples consisting of frequency and
  474. voltage pairs that the device will support per voltage domain. This
  475. is called Operating Performance Point or OPP. The actual definitions
  476. of OPP varies over silicon within the same family of devices.
  477. OPP layer organizes the data internally using device pointers
  478. representing individual voltage domains and provides SOC
  479. implementations a ready to use framework to manage OPPs.
  480. For more information, read <file:Documentation/power/opp.txt>
  481. config PM_CLK
  482. def_bool y
  483. depends on PM && HAVE_CLK
  484. config PM_GENERIC_DOMAINS
  485. bool
  486. depends on PM
  487. config WQ_POWER_EFFICIENT_DEFAULT
  488. bool "Enable workqueue power-efficient mode by default"
  489. depends on PM
  490. default n
  491. help
  492. Per-cpu workqueues are generally preferred because they show
  493. better performance thanks to cache locality; unfortunately,
  494. per-cpu workqueues tend to be more power hungry than unbound
  495. workqueues.
  496. Enabling workqueue.power_efficient kernel parameter makes the
  497. per-cpu workqueues which were observed to contribute
  498. significantly to power consumption unbound, leading to measurably
  499. lower power usage at the cost of small performance overhead.
  500. This config option determines whether workqueue.power_efficient
  501. is enabled by default.
  502. If in doubt, say N.
  503. config PM_GENERIC_DOMAINS_SLEEP
  504. def_bool y
  505. depends on PM_SLEEP && PM_GENERIC_DOMAINS
  506. config PM_GENERIC_DOMAINS_RUNTIME
  507. def_bool y
  508. depends on PM_RUNTIME && PM_GENERIC_DOMAINS
  509. config PM_GENERIC_DOMAINS_OF
  510. def_bool y
  511. depends on PM_GENERIC_DOMAINS && OF
  512. config CPU_PM
  513. bool
  514. depends on SUSPEND || CPU_IDLE
  515. config SUSPEND_TIME
  516. bool "Log time spent in suspend"
  517. ---help---
  518. Prints the time spent in suspend in the kernel log, and
  519. keeps statistics on the time spent in suspend in
  520. /sys/kernel/debug/suspend_time