From adc15843df234c00c1b19fd2b6c580e089b5fc07 Mon Sep 17 00:00:00 2001 From: Heiko Carstens Date: Wed, 30 Apr 2008 13:38:41 +0200 Subject: [PATCH] --- yaml --- r: 95333 b: refs/heads/master c: fd781fa25c9e9c6fd1599df060b05e7c4ad724e5 h: refs/heads/master i: 95331: d0b7fdd4015078eccc26c8c0fc7ce206c332858a v: v3 --- [refs] | 2 +- trunk/arch/s390/kernel/topology.c | 14 +++++++++++++- 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/[refs] b/[refs] index d10f7e70a621..b194f4d31e4a 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: d00aa4e7d0129983fc4389c85e15a066eb4e69a9 +refs/heads/master: fd781fa25c9e9c6fd1599df060b05e7c4ad724e5 diff --git a/trunk/arch/s390/kernel/topology.c b/trunk/arch/s390/kernel/topology.c index 0becefcf19b9..661a07217057 100644 --- a/trunk/arch/s390/kernel/topology.c +++ b/trunk/arch/s390/kernel/topology.c @@ -9,6 +9,7 @@ #include #include #include +#include #include #include #include @@ -229,9 +230,20 @@ void arch_update_cpu_topology(void) } } -static void topology_work_fn(struct work_struct *work) +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"); } void topology_schedule_update(void)