diff options
Diffstat (limited to 'arch/sparc/kernel/leon_smp.c')
-rw-r--r-- | arch/sparc/kernel/leon_smp.c | 33 |
1 files changed, 9 insertions, 24 deletions
diff --git a/arch/sparc/kernel/leon_smp.c b/arch/sparc/kernel/leon_smp.c index 0f3fb6d9c8ef..9b40c9c12a0c 100644 --- a/arch/sparc/kernel/leon_smp.c +++ b/arch/sparc/kernel/leon_smp.c | |||
@@ -69,31 +69,19 @@ static inline unsigned long do_swap(volatile unsigned long *ptr, | |||
69 | return val; | 69 | return val; |
70 | } | 70 | } |
71 | 71 | ||
72 | void __cpuinit leon_callin(void) | 72 | void __cpuinit leon_cpu_pre_starting(void *arg) |
73 | { | 73 | { |
74 | int cpuid = hard_smp_processor_id(); | ||
75 | |||
76 | local_ops->cache_all(); | ||
77 | local_ops->tlb_all(); | ||
78 | leon_configure_cache_smp(); | 74 | leon_configure_cache_smp(); |
75 | } | ||
79 | 76 | ||
80 | notify_cpu_starting(cpuid); | 77 | void __cpuinit leon_cpu_pre_online(void *arg) |
81 | 78 | { | |
82 | /* Get our local ticker going. */ | 79 | int cpuid = hard_smp_processor_id(); |
83 | register_percpu_ce(cpuid); | ||
84 | |||
85 | calibrate_delay(); | ||
86 | smp_store_cpu_info(cpuid); | ||
87 | |||
88 | local_ops->cache_all(); | ||
89 | local_ops->tlb_all(); | ||
90 | 80 | ||
91 | /* | 81 | /* Allow master to continue. The master will then give us the |
92 | * Unblock the master CPU _only_ when the scheduler state | 82 | * go-ahead by setting the smp_commenced_mask and will wait without |
93 | * of all secondary CPUs will be up-to-date, so after | 83 | * timeouts until our setup is completed fully (signified by |
94 | * the SMP initialization the master will be just allowed | 84 | * our bit being set in the cpu_online_mask). |
95 | * to call the scheduler code. | ||
96 | * Allow master to continue. | ||
97 | */ | 85 | */ |
98 | do_swap(&cpu_callin_map[cpuid], 1); | 86 | do_swap(&cpu_callin_map[cpuid], 1); |
99 | 87 | ||
@@ -110,9 +98,6 @@ void __cpuinit leon_callin(void) | |||
110 | 98 | ||
111 | while (!cpumask_test_cpu(cpuid, &smp_commenced_mask)) | 99 | while (!cpumask_test_cpu(cpuid, &smp_commenced_mask)) |
112 | mb(); | 100 | mb(); |
113 | |||
114 | local_irq_enable(); | ||
115 | set_cpu_online(cpuid, true); | ||
116 | } | 101 | } |
117 | 102 | ||
118 | /* | 103 | /* |