summaryrefslogtreecommitdiff
path: root/arch/powerpc
diff options
context:
space:
mode:
authorKevin Hao <haokexin@gmail.com>2023-12-21 12:45:08 +0800
committerMichael Ellerman <mpe@ellerman.id.au>2023-12-21 22:10:13 +1100
commit6addc560e69cd1b2e68ef43ad62a878ac1956f51 (patch)
tree157d88c95496d91cdbaab9a989e56f9f65c193dc /arch/powerpc
parent9ec1d7486e2520b4898d7f8e1ec3acc7c13c8dc8 (diff)
powerpc/mpc83xx: Add the missing set_freezable() for agent_thread_fn()
The kernel thread function agent_thread_fn() invokes the try_to_freeze() in its loop. But all the kernel threads are non-freezable by default. So if we want to make a kernel thread to be freezable, we have to invoke set_freezable() explicitly. Signed-off-by: Kevin Hao <haokexin@gmail.com> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au> Link: https://msgid.link/20231221044510.1802429-2-haokexin@gmail.com
Diffstat (limited to 'arch/powerpc')
-rw-r--r--arch/powerpc/platforms/83xx/suspend.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/arch/powerpc/platforms/83xx/suspend.c b/arch/powerpc/platforms/83xx/suspend.c
index 9833c36bda83..eed325ed08cc 100644
--- a/arch/powerpc/platforms/83xx/suspend.c
+++ b/arch/powerpc/platforms/83xx/suspend.c
@@ -261,6 +261,8 @@ static int mpc83xx_suspend_begin(suspend_state_t state)
static int agent_thread_fn(void *data)
{
+ set_freezable();
+
while (1) {
wait_event_interruptible(agent_wq, pci_pm_state >= 2);
try_to_freeze();