From e356cae9693c1621345e9da93f93a76f1dc87c33 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Arve=20Hj=C3=B8nnev=C3=A5g?= Date: Wed, 22 Mar 2023 12:32:51 -0700 Subject: [PATCH] ANDROID: Export kthread_set_per_cpu MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit kthread_create_on_cpu no longer marks the created thread as a per cpu thread, so the affinity might get lost on suspend or other hotplug events. Export kthread_set_per_cpu so a module that needs a kthread to stay on a specific cpu can accomplish that. Bug: 274202992 Change-Id: Iaafc12f93f341f9e0586cb051b7f1c941f140866 Signed-off-by: Arve Hjønnevåg (cherry picked from commit 4fdc7e4658212c096bd19fe7196296955942f7e5) --- kernel/kthread.c | 1 + 1 file changed, 1 insertion(+) diff --git a/kernel/kthread.c b/kernel/kthread.c index 261021050f6c..b795a8c1de96 100644 --- a/kernel/kthread.c +++ b/kernel/kthread.c @@ -601,6 +601,7 @@ void kthread_set_per_cpu(struct task_struct *k, int cpu) kthread->cpu = cpu; set_bit(KTHREAD_IS_PER_CPU, &kthread->flags); } +EXPORT_SYMBOL_GPL(kthread_set_per_cpu); bool kthread_is_per_cpu(struct task_struct *p) {