diff options
| -rw-r--r-- | arch/powerpc/kernel/smp.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/arch/powerpc/kernel/smp.c b/arch/powerpc/kernel/smp.c index 3fe4de2b685e..17523a0abf66 100644 --- a/arch/powerpc/kernel/smp.c +++ b/arch/powerpc/kernel/smp.c | |||
| @@ -562,19 +562,22 @@ int setup_profiling_timer(unsigned int multiplier) | |||
| 562 | 562 | ||
| 563 | void __init smp_cpus_done(unsigned int max_cpus) | 563 | void __init smp_cpus_done(unsigned int max_cpus) |
| 564 | { | 564 | { |
| 565 | cpumask_t old_mask; | 565 | cpumask_var_t old_mask; |
| 566 | 566 | ||
| 567 | /* We want the setup_cpu() here to be called from CPU 0, but our | 567 | /* We want the setup_cpu() here to be called from CPU 0, but our |
| 568 | * init thread may have been "borrowed" by another CPU in the meantime | 568 | * init thread may have been "borrowed" by another CPU in the meantime |
| 569 | * se we pin us down to CPU 0 for a short while | 569 | * se we pin us down to CPU 0 for a short while |
| 570 | */ | 570 | */ |
| 571 | old_mask = current->cpus_allowed; | 571 | alloc_cpumask_var(&old_mask, GFP_NOWAIT); |
| 572 | cpumask_copy(old_mask, ¤t->cpus_allowed); | ||
| 572 | set_cpus_allowed_ptr(current, cpumask_of(boot_cpuid)); | 573 | set_cpus_allowed_ptr(current, cpumask_of(boot_cpuid)); |
| 573 | 574 | ||
| 574 | if (smp_ops && smp_ops->setup_cpu) | 575 | if (smp_ops && smp_ops->setup_cpu) |
| 575 | smp_ops->setup_cpu(boot_cpuid); | 576 | smp_ops->setup_cpu(boot_cpuid); |
| 576 | 577 | ||
| 577 | set_cpus_allowed_ptr(current, &old_mask); | 578 | set_cpus_allowed_ptr(current, old_mask); |
| 579 | |||
| 580 | free_cpumask_var(old_mask); | ||
| 578 | 581 | ||
| 579 | snapshot_timebases(); | 582 | snapshot_timebases(); |
| 580 | 583 | ||
