summaryrefslogtreecommitdiff
path: root/kernel/smpboot.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2013-02-19 19:04:55 -0800
committerLinus Torvalds <torvalds@linux-foundation.org>2013-02-19 19:04:55 -0800
commitbcbd818c069b9e1bf82517401225b152a33968e2 (patch)
tree3fcdcf02b15fdd77998589a6158d0e36ba137d1c /kernel/smpboot.c
parentd652e1eb8e7b739fccbfb503a3da3e9f640fbf3d (diff)
parent14e568e78f6f80ca1e27256641ddf524c7dbdc51 (diff)
downloadolio-linux-3.10-bcbd818c069b9e1bf82517401225b152a33968e2.tar.xz
olio-linux-3.10-bcbd818c069b9e1bf82517401225b152a33968e2.zip
Merge branch 'smp-hotplug-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
Pull preparatory smp/hotplug patches from Ingo Molnar: "Some early preparatory changes for the WIP hotplug rework by Thomas Gleixner." * 'smp-hotplug-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: stop_machine: Use smpboot threads stop_machine: Store task reference in a separate per cpu variable smpboot: Allow selfparking per cpu threads
Diffstat (limited to 'kernel/smpboot.c')
-rw-r--r--kernel/smpboot.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/kernel/smpboot.c b/kernel/smpboot.c
index d6c5fc05424..d4abac26177 100644
--- a/kernel/smpboot.c
+++ b/kernel/smpboot.c
@@ -183,9 +183,10 @@ __smpboot_create_thread(struct smp_hotplug_thread *ht, unsigned int cpu)
kfree(td);
return PTR_ERR(tsk);
}
-
get_task_struct(tsk);
*per_cpu_ptr(ht->store, cpu) = tsk;
+ if (ht->create)
+ ht->create(cpu);
return 0;
}
@@ -225,7 +226,7 @@ static void smpboot_park_thread(struct smp_hotplug_thread *ht, unsigned int cpu)
{
struct task_struct *tsk = *per_cpu_ptr(ht->store, cpu);
- if (tsk)
+ if (tsk && !ht->selfparking)
kthread_park(tsk);
}