diff options
Diffstat (limited to 'arch/parisc/kernel/smp.c')
-rw-r--r-- | arch/parisc/kernel/smp.c | 33 |
1 files changed, 10 insertions, 23 deletions
diff --git a/arch/parisc/kernel/smp.c b/arch/parisc/kernel/smp.c index 0bb1d63907f8..a47828d31fe6 100644 --- a/arch/parisc/kernel/smp.c +++ b/arch/parisc/kernel/smp.c | |||
@@ -31,6 +31,7 @@ | |||
31 | #include <linux/delay.h> | 31 | #include <linux/delay.h> |
32 | #include <linux/bitops.h> | 32 | #include <linux/bitops.h> |
33 | #include <linux/ftrace.h> | 33 | #include <linux/ftrace.h> |
34 | #include <linux/cpu.h> | ||
34 | 35 | ||
35 | #include <linux/atomic.h> | 36 | #include <linux/atomic.h> |
36 | #include <asm/current.h> | 37 | #include <asm/current.h> |
@@ -295,8 +296,13 @@ smp_cpu_init(int cpunum) | |||
295 | 296 | ||
296 | printk(KERN_CRIT "CPU#%d already initialized!\n", cpunum); | 297 | printk(KERN_CRIT "CPU#%d already initialized!\n", cpunum); |
297 | machine_halt(); | 298 | machine_halt(); |
298 | } | 299 | } |
300 | |||
301 | notify_cpu_starting(cpunum); | ||
302 | |||
303 | ipi_call_lock(); | ||
299 | set_cpu_online(cpunum, true); | 304 | set_cpu_online(cpunum, true); |
305 | ipi_call_unlock(); | ||
300 | 306 | ||
301 | /* Initialise the idle task for this CPU */ | 307 | /* Initialise the idle task for this CPU */ |
302 | atomic_inc(&init_mm.mm_count); | 308 | atomic_inc(&init_mm.mm_count); |
@@ -334,26 +340,11 @@ void __init smp_callin(void) | |||
334 | /* | 340 | /* |
335 | * Bring one cpu online. | 341 | * Bring one cpu online. |
336 | */ | 342 | */ |
337 | int __cpuinit smp_boot_one_cpu(int cpuid) | 343 | int __cpuinit smp_boot_one_cpu(int cpuid, struct task_struct *idle) |
338 | { | 344 | { |
339 | const struct cpuinfo_parisc *p = &per_cpu(cpu_data, cpuid); | 345 | const struct cpuinfo_parisc *p = &per_cpu(cpu_data, cpuid); |
340 | struct task_struct *idle; | ||
341 | long timeout; | 346 | long timeout; |
342 | 347 | ||
343 | /* | ||
344 | * Create an idle task for this CPU. Note the address wed* give | ||
345 | * to kernel_thread is irrelevant -- it's going to start | ||
346 | * where OS_BOOT_RENDEVZ vector in SAL says to start. But | ||
347 | * this gets all the other task-y sort of data structures set | ||
348 | * up like we wish. We need to pull the just created idle task | ||
349 | * off the run queue and stuff it into the init_tasks[] array. | ||
350 | * Sheesh . . . | ||
351 | */ | ||
352 | |||
353 | idle = fork_idle(cpuid); | ||
354 | if (IS_ERR(idle)) | ||
355 | panic("SMP: fork failed for CPU:%d", cpuid); | ||
356 | |||
357 | task_thread_info(idle)->cpu = cpuid; | 348 | task_thread_info(idle)->cpu = cpuid; |
358 | 349 | ||
359 | /* Let _start know what logical CPU we're booting | 350 | /* Let _start know what logical CPU we're booting |
@@ -397,10 +388,6 @@ int __cpuinit smp_boot_one_cpu(int cpuid) | |||
397 | udelay(100); | 388 | udelay(100); |
398 | barrier(); | 389 | barrier(); |
399 | } | 390 | } |
400 | |||
401 | put_task_struct(idle); | ||
402 | idle = NULL; | ||
403 | |||
404 | printk(KERN_CRIT "SMP: CPU:%d is stuck.\n", cpuid); | 391 | printk(KERN_CRIT "SMP: CPU:%d is stuck.\n", cpuid); |
405 | return -1; | 392 | return -1; |
406 | 393 | ||
@@ -449,10 +436,10 @@ void smp_cpus_done(unsigned int cpu_max) | |||
449 | } | 436 | } |
450 | 437 | ||
451 | 438 | ||
452 | int __cpuinit __cpu_up(unsigned int cpu) | 439 | int __cpuinit __cpu_up(unsigned int cpu, struct task_struct *tidle) |
453 | { | 440 | { |
454 | if (cpu != 0 && cpu < parisc_max_cpus) | 441 | if (cpu != 0 && cpu < parisc_max_cpus) |
455 | smp_boot_one_cpu(cpu); | 442 | smp_boot_one_cpu(cpu, tidle); |
456 | 443 | ||
457 | return cpu_online(cpu) ? 0 : -ENOSYS; | 444 | return cpu_online(cpu) ? 0 : -ENOSYS; |
458 | } | 445 | } |