aboutsummaryrefslogtreecommitdiffstats
path: root/arch/ppc64/kernel/pmac_smp.c
diff options
context:
space:
mode:
authorPaul Mackerras <paulus@samba.org>2005-10-22 01:55:58 -0400
committerPaul Mackerras <paulus@samba.org>2005-10-22 01:55:58 -0400
commitef1a12817aebc313049d226f96eee86e4bcc94a3 (patch)
tree9c20807e70ef93a3e709e38464b627280bf67b36 /arch/ppc64/kernel/pmac_smp.c
parent529294d59fdc77bf15f00f2308bbeb73e03e7042 (diff)
ppc64: Simplify secondary CPU startup on powermacs
... for consistency with ppc32, and because this way is neater. Signed-off-by: Paul Mackerras <paulus@samba.org>
Diffstat (limited to 'arch/ppc64/kernel/pmac_smp.c')
-rw-r--r--arch/ppc64/kernel/pmac_smp.c21
1 files changed, 4 insertions, 17 deletions
diff --git a/arch/ppc64/kernel/pmac_smp.c b/arch/ppc64/kernel/pmac_smp.c
index 3a1683f5b07f..83c2f8dc1ec6 100644
--- a/arch/ppc64/kernel/pmac_smp.c
+++ b/arch/ppc64/kernel/pmac_smp.c
@@ -59,9 +59,7 @@
59#define DBG(fmt...) 59#define DBG(fmt...)
60#endif 60#endif
61 61
62extern void pmac_secondary_start_1(void); 62extern void __secondary_start_pmac_0(void);
63extern void pmac_secondary_start_2(void);
64extern void pmac_secondary_start_3(void);
65 63
66extern struct smp_ops_t *smp_ops; 64extern struct smp_ops_t *smp_ops;
67 65
@@ -236,7 +234,7 @@ static int __init smp_core99_probe(void)
236 234
237static void __init smp_core99_kick_cpu(int nr) 235static void __init smp_core99_kick_cpu(int nr)
238{ 236{
239 int save_vector, j; 237 unsigned int save_vector, j;
240 unsigned long new_vector; 238 unsigned long new_vector;
241 unsigned long flags; 239 unsigned long flags;
242 volatile unsigned int *vector 240 volatile unsigned int *vector
@@ -253,20 +251,9 @@ static void __init smp_core99_kick_cpu(int nr)
253 save_vector = *vector; 251 save_vector = *vector;
254 252
255 /* Setup fake reset vector that does 253 /* Setup fake reset vector that does
256 * b .pmac_secondary_start - KERNELBASE 254 * b __secondary_start_pmac_0 + nr*8 - KERNELBASE
257 */ 255 */
258 switch(nr) { 256 new_vector = (unsigned long) __secondary_start_pmac_0 + nr * 8;
259 case 1:
260 new_vector = (unsigned long)pmac_secondary_start_1;
261 break;
262 case 2:
263 new_vector = (unsigned long)pmac_secondary_start_2;
264 break;
265 case 3:
266 default:
267 new_vector = (unsigned long)pmac_secondary_start_3;
268 break;
269 }
270 *vector = 0x48000002 + (new_vector - KERNELBASE); 257 *vector = 0x48000002 + (new_vector - KERNELBASE);
271 258
272 /* flush data cache and inval instruction cache */ 259 /* flush data cache and inval instruction cache */