Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 177306
b: refs/heads/master
c: 578d36f
h: refs/heads/master
v: v3
  • Loading branch information
Yi Li authored and Mike Frysinger committed Dec 15, 2009
1 parent 3b8cfa7 commit 6352cfa
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 19 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: ad774b7cb0604d02c3596b79921fcb812df4dc71
refs/heads/master: 578d36f5e160208821e8f51037ac1038e065ecaf
17 changes: 7 additions & 10 deletions trunk/arch/blackfin/mach-bf561/smp.c
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,6 @@ int __init setup_profiling_timer(unsigned int multiplier) /* not supported */

void __cpuinit platform_secondary_init(unsigned int cpu)
{
local_irq_disable();

/* Clone setup for peripheral interrupt sources from CoreA. */
bfin_write_SICB_IMASK0(bfin_read_SICA_IMASK0());
bfin_write_SICB_IMASK1(bfin_read_SICA_IMASK1());
Expand All @@ -70,11 +68,6 @@ void __cpuinit platform_secondary_init(unsigned int cpu)
bfin_write_SICB_IAR7(bfin_read_SICA_IAR7());
SSYNC();

local_irq_enable();

/* Calibrate loops per jiffy value. */
calibrate_delay();

/* Store CPU-private information to the cpu_data array. */
bfin_setup_cpudata(cpu);

Expand Down Expand Up @@ -108,9 +101,13 @@ int __cpuinit platform_boot_secondary(unsigned int cpu, struct task_struct *idle
barrier();
}

spin_unlock(&boot_lock);

return cpu_isset(cpu, cpu_callin_map) ? 0 : -ENOSYS;
if (cpu_isset(cpu, cpu_callin_map)) {
cpu_set(cpu, cpu_online_map);
/* release the lock and let coreb run */
spin_unlock(&boot_lock);
return 0;
} else
panic("CPU%u: processor failed to boot\n", cpu);
}

void __init platform_request_ipi(irq_handler_t handler)
Expand Down
16 changes: 8 additions & 8 deletions trunk/arch/blackfin/mach-common/smp.c
Original file line number Diff line number Diff line change
Expand Up @@ -336,13 +336,6 @@ int __cpuinit __cpu_up(unsigned int cpu)

ret = platform_boot_secondary(cpu, idle);

if (ret) {
cpu_clear(cpu, cpu_present_map);
printk(KERN_CRIT "CPU%u: processor failed to boot (%d)\n", cpu, ret);
free_task(idle);
} else
cpu_set(cpu, cpu_online_map);

secondary_stack = NULL;

return ret;
Expand Down Expand Up @@ -418,9 +411,16 @@ void __cpuinit secondary_start_kernel(void)

setup_secondary(cpu);

platform_secondary_init(cpu);

local_irq_enable();

platform_secondary_init(cpu);
/*
* Calibrate loops per jiffy value.
* IRQs need to be enabled here - D-cache can be invalidated
* in timer irq handler, so core B can read correct jiffies.
*/
calibrate_delay();

cpu_idle();
}
Expand Down

0 comments on commit 6352cfa

Please sign in to comment.