]> git.baikalelectronics.ru Git - kernel.git/commit
pm/sleep: Add PM_USERSPACE_AUTOSLEEP Kconfig
authorKalesh Singh <kaleshsingh@google.com>
Thu, 30 Jun 2022 19:12:29 +0000 (19:12 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 1 Jul 2022 08:39:20 +0000 (10:39 +0200)
commit556a5165fe51f2547b85194c9fb5d9c3708f7164
tree396865844df8f25f504e2fe66b52bbce4610d832
parent5cd1d4309af1a7e07c24363f1afa7760292c6944
pm/sleep: Add PM_USERSPACE_AUTOSLEEP Kconfig

Systems that initiate frequent suspend/resume from userspace
can make the kernel aware by enabling PM_USERSPACE_AUTOSLEEP
config.

This allows for certain sleep-sensitive code (wireguard/rng) to
decide on what preparatory work should be performed (or not) in
their pm_notification callbacks.

This patch was prompted by the discussion at [1] which attempts
to remove CONFIG_ANDROID that currently guards these code paths.

[1] https://lore.kernel.org/r/20220629150102.1582425-1-hch@lst.de/

Suggested-by: Jason A. Donenfeld <Jason@zx2c4.com>
Acked-by: Jason A. Donenfeld <Jason@zx2c4.com>
Signed-off-by: Kalesh Singh <kaleshsingh@google.com>
Link: https://lore.kernel.org/r/20220630191230.235306-1-kaleshsingh@google.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/char/random.c
drivers/net/wireguard/device.c
kernel/power/Kconfig