aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--arch/s390/kernel/topology.c14
1 files changed, 13 insertions, 1 deletions
diff --git a/arch/s390/kernel/topology.c b/arch/s390/kernel/topology.c
index 0becefcf19b9..661a07217057 100644
--- a/arch/s390/kernel/topology.c
+++ b/arch/s390/kernel/topology.c
@@ -9,6 +9,7 @@
9#include <linux/device.h> 9#include <linux/device.h>
10#include <linux/bootmem.h> 10#include <linux/bootmem.h>
11#include <linux/sched.h> 11#include <linux/sched.h>
12#include <linux/kthread.h>
12#include <linux/workqueue.h> 13#include <linux/workqueue.h>
13#include <linux/cpu.h> 14#include <linux/cpu.h>
14#include <linux/smp.h> 15#include <linux/smp.h>
@@ -229,9 +230,20 @@ void arch_update_cpu_topology(void)
229 } 230 }
230} 231}
231 232
232static void topology_work_fn(struct work_struct *work) 233static int topology_kthread(void *data)
233{ 234{
234 arch_reinit_sched_domains(); 235 arch_reinit_sched_domains();
236 return 0;
237}
238
239static void topology_work_fn(struct work_struct *work)
240{
241 /* We can't call arch_reinit_sched_domains() from a multi-threaded
242 * workqueue context since it may deadlock in case of cpu hotplug.
243 * So we have to create a kernel thread in order to call
244 * arch_reinit_sched_domains().
245 */
246 kthread_run(topology_kthread, NULL, "topology_update");
235} 247}
236 248
237void topology_schedule_update(void) 249void topology_schedule_update(void)