From: Kevin Hao <haokexin@gmail.com>
To: Michael Ellerman <mpe@ellerman.id.au>
Cc: "Rafael J. Wysocki" <rafael@kernel.org>,
Geoff Levand <geoff@infradead.org>,
Nicholas Piggin <npiggin@gmail.com>,
"Aneesh Kumar K.V" <aneesh.kumar@kernel.org>,
Pavel Machek <pavel@ucw.cz>,
"Naveen N. Rao" <naveen.n.rao@linux.ibm.com>,
linuxppc-dev@lists.ozlabs.org
Subject: [PATCH 3/3] powerpc: ps3: Add missing set_freezable() for ps3_probe_thread()
Date: Thu, 21 Dec 2023 12:45:10 +0800 [thread overview]
Message-ID: <20231221044510.1802429-4-haokexin@gmail.com> (raw)
In-Reply-To: <20231221044510.1802429-1-haokexin@gmail.com>
The kernel thread function ps3_probe_thread() 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>
---
arch/powerpc/platforms/ps3/device-init.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/arch/powerpc/platforms/ps3/device-init.c b/arch/powerpc/platforms/ps3/device-init.c
index e87360a0fb40..878bc160246e 100644
--- a/arch/powerpc/platforms/ps3/device-init.c
+++ b/arch/powerpc/platforms/ps3/device-init.c
@@ -827,6 +827,7 @@ static int ps3_probe_thread(void *data)
if (res)
goto fail_free_irq;
+ set_freezable();
/* Loop here processing the requested notification events. */
do {
try_to_freeze();
--
2.39.2
next prev parent reply other threads:[~2023-12-21 4:48 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-12-21 4:45 [PATCH 0/3] powerpc: Fixes and optimization for the freezable kthread Kevin Hao
2023-12-21 4:45 ` [PATCH 1/3] powerpc: mpc83xx: Add the missing set_freezable() for agent_thread_fn() Kevin Hao
2023-12-21 4:45 ` [PATCH 2/3] powerpc: mpc83xx: Use wait_event_freezable() for freezable kthread Kevin Hao
2023-12-21 4:45 ` Kevin Hao [this message]
2023-12-21 6:36 ` [PATCH 3/3] powerpc: ps3: Add missing set_freezable() for ps3_probe_thread() Geoff Levand
2023-12-21 11:17 ` Michael Ellerman
2023-12-31 11:07 ` [PATCH 0/3] powerpc: Fixes and optimization for the freezable kthread Michael Ellerman
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20231221044510.1802429-4-haokexin@gmail.com \
--to=haokexin@gmail.com \
--cc=aneesh.kumar@kernel.org \
--cc=geoff@infradead.org \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=mpe@ellerman.id.au \
--cc=naveen.n.rao@linux.ibm.com \
--cc=npiggin@gmail.com \
--cc=pavel@ucw.cz \
--cc=rafael@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).