[1/2] pm/sleep: Add PM_USERSPACE_AUTOSLEEP Kconfig
authorKalesh Singh <kaleshsingh@google.com>
Thu, 30 Jun 2022 19:12:29 +0000 (19:12 +0000)
committerSalvatore Bonaccorso <carnil@debian.org>
Sat, 24 Sep 2022 11:05:59 +0000 (12:05 +0100)
commit1b62d6523e959348f97741f80a2a2ae0ed8ea870
tree40c9bc84cae728d1861b6371edcdfcaf7259d9c5
parent4bb105a41da932544c8a690d01b027be015993de
[1/2] pm/sleep: Add PM_USERSPACE_AUTOSLEEP Kconfig

Origin: https://git.kernel.org/linus/261e224d6a5c43e2bb8a07b7662f9b4ec425cfec

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>
Gbp-Pq: Topic bugfix/all
Gbp-Pq: Name pm-sleep-add-pm_userspace_autosleep-kconfig.patch
drivers/char/random.c
drivers/net/wireguard/device.c
kernel/power/Kconfig