diff options
| -rw-r--r-- | arch/blackfin/mach-bf561/smp.c | 17 | ||||
| -rw-r--r-- | arch/blackfin/mach-common/smp.c | 16 |
2 files changed, 15 insertions, 18 deletions
diff --git a/arch/blackfin/mach-bf561/smp.c b/arch/blackfin/mach-bf561/smp.c index 510f57641495..0192532e96a2 100644 --- a/arch/blackfin/mach-bf561/smp.c +++ b/arch/blackfin/mach-bf561/smp.c | |||
| @@ -52,8 +52,6 @@ int __init setup_profiling_timer(unsigned int multiplier) /* not supported */ | |||
| 52 | 52 | ||
| 53 | void __cpuinit platform_secondary_init(unsigned int cpu) | 53 | void __cpuinit platform_secondary_init(unsigned int cpu) |
| 54 | { | 54 | { |
| 55 | local_irq_disable(); | ||
| 56 | |||
| 57 | /* Clone setup for peripheral interrupt sources from CoreA. */ | 55 | /* Clone setup for peripheral interrupt sources from CoreA. */ |
| 58 | bfin_write_SICB_IMASK0(bfin_read_SICA_IMASK0()); | 56 | bfin_write_SICB_IMASK0(bfin_read_SICA_IMASK0()); |
| 59 | bfin_write_SICB_IMASK1(bfin_read_SICA_IMASK1()); | 57 | bfin_write_SICB_IMASK1(bfin_read_SICA_IMASK1()); |
| @@ -70,11 +68,6 @@ void __cpuinit platform_secondary_init(unsigned int cpu) | |||
| 70 | bfin_write_SICB_IAR7(bfin_read_SICA_IAR7()); | 68 | bfin_write_SICB_IAR7(bfin_read_SICA_IAR7()); |
| 71 | SSYNC(); | 69 | SSYNC(); |
| 72 | 70 | ||
| 73 | local_irq_enable(); | ||
| 74 | |||
| 75 | /* Calibrate loops per jiffy value. */ | ||
| 76 | calibrate_delay(); | ||
| 77 | |||
| 78 | /* Store CPU-private information to the cpu_data array. */ | 71 | /* Store CPU-private information to the cpu_data array. */ |
| 79 | bfin_setup_cpudata(cpu); | 72 | bfin_setup_cpudata(cpu); |
| 80 | 73 | ||
| @@ -108,9 +101,13 @@ int __cpuinit platform_boot_secondary(unsigned int cpu, struct task_struct *idle | |||
| 108 | barrier(); | 101 | barrier(); |
| 109 | } | 102 | } |
| 110 | 103 | ||
| 111 | spin_unlock(&boot_lock); | 104 | if (cpu_isset(cpu, cpu_callin_map)) { |
| 112 | 105 | cpu_set(cpu, cpu_online_map); | |
| 113 | return cpu_isset(cpu, cpu_callin_map) ? 0 : -ENOSYS; | 106 | /* release the lock and let coreb run */ |
| 107 | spin_unlock(&boot_lock); | ||
| 108 | return 0; | ||
| 109 | } else | ||
| 110 | panic("CPU%u: processor failed to boot\n", cpu); | ||
| 114 | } | 111 | } |
| 115 | 112 | ||
| 116 | void __init platform_request_ipi(irq_handler_t handler) | 113 | void __init platform_request_ipi(irq_handler_t handler) |
diff --git a/arch/blackfin/mach-common/smp.c b/arch/blackfin/mach-common/smp.c index d92b168c8328..369e687582b7 100644 --- a/arch/blackfin/mach-common/smp.c +++ b/arch/blackfin/mach-common/smp.c | |||
| @@ -336,13 +336,6 @@ int __cpuinit __cpu_up(unsigned int cpu) | |||
| 336 | 336 | ||
| 337 | ret = platform_boot_secondary(cpu, idle); | 337 | ret = platform_boot_secondary(cpu, idle); |
| 338 | 338 | ||
| 339 | if (ret) { | ||
| 340 | cpu_clear(cpu, cpu_present_map); | ||
| 341 | printk(KERN_CRIT "CPU%u: processor failed to boot (%d)\n", cpu, ret); | ||
| 342 | free_task(idle); | ||
| 343 | } else | ||
| 344 | cpu_set(cpu, cpu_online_map); | ||
| 345 | |||
| 346 | secondary_stack = NULL; | 339 | secondary_stack = NULL; |
| 347 | 340 | ||
| 348 | return ret; | 341 | return ret; |
| @@ -418,9 +411,16 @@ void __cpuinit secondary_start_kernel(void) | |||
| 418 | 411 | ||
| 419 | setup_secondary(cpu); | 412 | setup_secondary(cpu); |
| 420 | 413 | ||
| 414 | platform_secondary_init(cpu); | ||
| 415 | |||
| 421 | local_irq_enable(); | 416 | local_irq_enable(); |
| 422 | 417 | ||
| 423 | platform_secondary_init(cpu); | 418 | /* |
| 419 | * Calibrate loops per jiffy value. | ||
| 420 | * IRQs need to be enabled here - D-cache can be invalidated | ||
| 421 | * in timer irq handler, so core B can read correct jiffies. | ||
| 422 | */ | ||
| 423 | calibrate_delay(); | ||
| 424 | 424 | ||
| 425 | cpu_idle(); | 425 | cpu_idle(); |
| 426 | } | 426 | } |
