aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/kernel/setup_64.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/powerpc/kernel/setup_64.c')
-rw-r--r--arch/powerpc/kernel/setup_64.c22
1 files changed, 12 insertions, 10 deletions
diff --git a/arch/powerpc/kernel/setup_64.c b/arch/powerpc/kernel/setup_64.c
index 78f3a5fd43f6..175539c9afa0 100644
--- a/arch/powerpc/kernel/setup_64.c
+++ b/arch/powerpc/kernel/setup_64.c
@@ -149,6 +149,13 @@ early_param("smt-enabled", early_smt_enabled);
149#define check_smt_enabled() 149#define check_smt_enabled()
150#endif /* CONFIG_SMP */ 150#endif /* CONFIG_SMP */
151 151
152/* Put the paca pointer into r13 and SPRG3 */
153void __init setup_paca(int cpu)
154{
155 local_paca = &paca[cpu];
156 mtspr(SPRN_SPRG3, local_paca);
157}
158
152/* 159/*
153 * Early initialization entry point. This is called by head.S 160 * Early initialization entry point. This is called by head.S
154 * with MMU translation disabled. We rely on the "feature" of 161 * with MMU translation disabled. We rely on the "feature" of
@@ -170,6 +177,9 @@ early_param("smt-enabled", early_smt_enabled);
170 177
171void __init early_setup(unsigned long dt_ptr) 178void __init early_setup(unsigned long dt_ptr)
172{ 179{
180 /* Assume we're on cpu 0 for now. Don't write to the paca yet! */
181 setup_paca(0);
182
173 /* Enable early debugging if any specified (see udbg.h) */ 183 /* Enable early debugging if any specified (see udbg.h) */
174 udbg_early_init(); 184 udbg_early_init();
175 185
@@ -183,7 +193,7 @@ void __init early_setup(unsigned long dt_ptr)
183 early_init_devtree(__va(dt_ptr)); 193 early_init_devtree(__va(dt_ptr));
184 194
185 /* Now we know the logical id of our boot cpu, setup the paca. */ 195 /* Now we know the logical id of our boot cpu, setup the paca. */
186 setup_boot_paca(); 196 setup_paca(boot_cpuid);
187 197
188 /* Fix up paca fields required for the boot cpu */ 198 /* Fix up paca fields required for the boot cpu */
189 get_paca()->cpu_start = 1; 199 get_paca()->cpu_start = 1;
@@ -350,19 +360,11 @@ void __init setup_system(void)
350 */ 360 */
351 unflatten_device_tree(); 361 unflatten_device_tree();
352 362
353#ifdef CONFIG_KEXEC
354 kexec_setup(); /* requires unflattened device tree. */
355#endif
356
357 /* 363 /*
358 * Fill the ppc64_caches & systemcfg structures with informations 364 * Fill the ppc64_caches & systemcfg structures with informations
359 * retrieved from the device-tree. Need to be called before 365 * retrieved from the device-tree. Need to be called before
360 * finish_device_tree() since the later requires some of the 366 * finish_device_tree() since the later requires some of the
361 * informations filled up here to properly parse the interrupt 367 * informations filled up here to properly parse the interrupt tree.
362 * tree.
363 * It also sets up the cache line sizes which allows to call
364 * routines like flush_icache_range (used by the hash init
365 * later on).
366 */ 368 */
367 initialize_cache_info(); 369 initialize_cache_info();
368 370