aboutsummaryrefslogtreecommitdiffstats
path: root/arch/um/kernel/process.c
diff options
context:
space:
mode:
authorJohannes Berg <johannes.berg@intel.com>2020-12-02 20:58:07 +0100
committerRichard Weinberger <richard@nod.at>2020-12-13 22:22:49 +0100
commita374b7cb1ea648a27ceaa2dea19aa967725e938b (patch)
tree3caccdb36c1cc214f10a2f2d2e267acee1f101a6 /arch/um/kernel/process.c
parentum: Allow PM with suspend-to-idle (diff)
downloadlinux-dev-a374b7cb1ea648a27ceaa2dea19aa967725e938b.tar.xz
linux-dev-a374b7cb1ea648a27ceaa2dea19aa967725e938b.zip
um: Support suspend to RAM
With all the previous bits in place, we can now also support suspend to RAM, in the sense that everything is suspended, not just most, including userspace, processes like in s2idle. Since um_idle_sleep() now waits forever, we can simply call that to "suspend" the system. As before, you can wake it up using SIGUSR1 since we're just in a pause() call that only needs to return. In order to implement selective resume from certain devices, and not have any arbitrary device interrupt wake up, suspend interrupts by removing SIGIO notification (O_ASYNC) from all the FDs that are not supposed to wake up the system. However, swap out the handler so we don't actually handle the SIGIO as an interrupt. Since we're in pause(), the mere act of receiving SIGIO wakes us up, and then after things have been restored enough, re-set O_ASYNC for all previously suspended FDs, reinstall the proper SIGIO handler, and send SIGIO to self to process anything that might now be pending. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Richard Weinberger <richard@nod.at>
Diffstat (limited to 'arch/um/kernel/process.c')
-rw-r--r--arch/um/kernel/process.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/um/kernel/process.c b/arch/um/kernel/process.c
index a85c48ac2b27..81d508daf67c 100644
--- a/arch/um/kernel/process.c
+++ b/arch/um/kernel/process.c
@@ -203,7 +203,7 @@ void initial_thread_cb(void (*proc)(void *), void *arg)
kmalloc_ok = save_kmalloc_ok;
}
-static void um_idle_sleep(void)
+void um_idle_sleep(void)
{
if (time_travel_mode != TT_MODE_OFF)
time_travel_sleep();