From: Oleg Nesterov Date: Fri, 25 Jul 2008 08:47:51 +0000 (-0700) Subject: S390 topology: don't use kthread() for arch_reinit_sched_domains() X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=69b895fd13d73aebf62b75502eb6513d43057ba3;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git S390 topology: don't use kthread() for arch_reinit_sched_domains() Now that it is safe to use get_online_cpus() we can revert [S390] cpu topology: Fix possible deadlock. commit: fd781fa25c9e9c6fd1599df060b05e7c4ad724e5 and call arch_reinit_sched_domains() directly from topology_work_fn(). Signed-off-by: Oleg Nesterov Cc: Gautham R Shenoy Tested-by: Heiko Carstens Cc: Max Krasnyansky Cc: Paul Jackson Cc: Paul Menage Cc: Peter Zijlstra Cc: Vegard Nossum Cc: Martin Schwidefsky Cc: Ingo Molnar Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/arch/s390/kernel/topology.c b/arch/s390/kernel/topology.c index 212d618b0095..632b13e10053 100644 --- a/arch/s390/kernel/topology.c +++ b/arch/s390/kernel/topology.c @@ -9,7 +9,6 @@ #include #include #include -#include #include #include #include @@ -230,20 +229,9 @@ void arch_update_cpu_topology(void) } } -static int topology_kthread(void *data) -{ - arch_reinit_sched_domains(); - return 0; -} - static void topology_work_fn(struct work_struct *work) { - /* We can't call arch_reinit_sched_domains() from a multi-threaded - * workqueue context since it may deadlock in case of cpu hotplug. - * So we have to create a kernel thread in order to call - * arch_reinit_sched_domains(). - */ - kthread_run(topology_kthread, NULL, "topology_update"); + arch_reinit_sched_domains(); } void topology_schedule_update(void)