diff options
Diffstat (limited to 'kernel/smpboot.c')
-rw-r--r-- | kernel/smpboot.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/kernel/smpboot.c b/kernel/smpboot.c index d6c5fc054242..8eaed9aa9cf0 100644 --- a/kernel/smpboot.c +++ b/kernel/smpboot.c | |||
@@ -183,9 +183,10 @@ __smpboot_create_thread(struct smp_hotplug_thread *ht, unsigned int cpu) | |||
183 | kfree(td); | 183 | kfree(td); |
184 | return PTR_ERR(tsk); | 184 | return PTR_ERR(tsk); |
185 | } | 185 | } |
186 | |||
187 | get_task_struct(tsk); | 186 | get_task_struct(tsk); |
188 | *per_cpu_ptr(ht->store, cpu) = tsk; | 187 | *per_cpu_ptr(ht->store, cpu) = tsk; |
188 | if (ht->create) | ||
189 | ht->create(cpu); | ||
189 | return 0; | 190 | return 0; |
190 | } | 191 | } |
191 | 192 | ||
@@ -208,6 +209,8 @@ static void smpboot_unpark_thread(struct smp_hotplug_thread *ht, unsigned int cp | |||
208 | { | 209 | { |
209 | struct task_struct *tsk = *per_cpu_ptr(ht->store, cpu); | 210 | struct task_struct *tsk = *per_cpu_ptr(ht->store, cpu); |
210 | 211 | ||
212 | if (ht->pre_unpark) | ||
213 | ht->pre_unpark(cpu); | ||
211 | kthread_unpark(tsk); | 214 | kthread_unpark(tsk); |
212 | } | 215 | } |
213 | 216 | ||
@@ -225,7 +228,7 @@ static void smpboot_park_thread(struct smp_hotplug_thread *ht, unsigned int cpu) | |||
225 | { | 228 | { |
226 | struct task_struct *tsk = *per_cpu_ptr(ht->store, cpu); | 229 | struct task_struct *tsk = *per_cpu_ptr(ht->store, cpu); |
227 | 230 | ||
228 | if (tsk) | 231 | if (tsk && !ht->selfparking) |
229 | kthread_park(tsk); | 232 | kthread_park(tsk); |
230 | } | 233 | } |
231 | 234 | ||