smp.c (4ee93d80ad73980826d582c7c37caa9597822001) | smp.c (4553474d977d1ee8a81067cfbc588f1df84ce3e9) |
---|---|
1/* 2 * Copyright (C) 2014 Stefan Kristiansson <stefan.kristiansson@saunalahti.fi> 3 * Copyright (C) 2017 Stafford Horne <shorne@gmail.com> 4 * 5 * Based on arm64 and arc implementations 6 * Copyright (C) 2013 ARM Ltd. 7 * Copyright (C) 2004, 2007-2010, 2011-2012 Synopsys, Inc. (www.synopsys.com) 8 * --- 86 unchanged lines hidden (view full) --- 95 current_pgd[cpu] = init_mm.pgd; 96 97 boot_secondary(cpu, idle); 98 if (!wait_for_completion_timeout(&cpu_running, 99 msecs_to_jiffies(1000))) { 100 pr_crit("CPU%u: failed to start\n", cpu); 101 return -EIO; 102 } | 1/* 2 * Copyright (C) 2014 Stefan Kristiansson <stefan.kristiansson@saunalahti.fi> 3 * Copyright (C) 2017 Stafford Horne <shorne@gmail.com> 4 * 5 * Based on arm64 and arc implementations 6 * Copyright (C) 2013 ARM Ltd. 7 * Copyright (C) 2004, 2007-2010, 2011-2012 Synopsys, Inc. (www.synopsys.com) 8 * --- 86 unchanged lines hidden (view full) --- 95 current_pgd[cpu] = init_mm.pgd; 96 97 boot_secondary(cpu, idle); 98 if (!wait_for_completion_timeout(&cpu_running, 99 msecs_to_jiffies(1000))) { 100 pr_crit("CPU%u: failed to start\n", cpu); 101 return -EIO; 102 } |
103 synchronise_count_master(cpu); |
|
103 104 return 0; 105} 106 107asmlinkage __init void secondary_start_kernel(void) 108{ 109 struct mm_struct *mm = &init_mm; 110 unsigned int cpu = smp_processor_id(); --- 13 unchanged lines hidden (view full) --- 124 notify_cpu_starting(cpu); 125 126 /* 127 * OK, now it's safe to let the boot CPU continue 128 */ 129 set_cpu_online(cpu, true); 130 complete(&cpu_running); 131 | 104 105 return 0; 106} 107 108asmlinkage __init void secondary_start_kernel(void) 109{ 110 struct mm_struct *mm = &init_mm; 111 unsigned int cpu = smp_processor_id(); --- 13 unchanged lines hidden (view full) --- 125 notify_cpu_starting(cpu); 126 127 /* 128 * OK, now it's safe to let the boot CPU continue 129 */ 130 set_cpu_online(cpu, true); 131 complete(&cpu_running); 132 |
133 synchronise_count_slave(cpu); 134 |
|
132 local_irq_enable(); 133 134 preempt_disable(); 135 /* 136 * OK, it's off to the idle thread for us 137 */ 138 cpu_startup_entry(CPUHP_AP_ONLINE_IDLE); 139} --- 117 unchanged lines hidden --- | 135 local_irq_enable(); 136 137 preempt_disable(); 138 /* 139 * OK, it's off to the idle thread for us 140 */ 141 cpu_startup_entry(CPUHP_AP_ONLINE_IDLE); 142} --- 117 unchanged lines hidden --- |