aboutsummaryrefslogtreecommitdiffstats
path: root/arch/ppc64
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
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')
-rw-r--r--arch/ppc64/kernel/head.S25
-rw-r--r--arch/ppc64/kernel/pmac_smp.c21
2 files changed, 15 insertions, 31 deletions
diff --git a/arch/ppc64/kernel/head.S b/arch/ppc64/kernel/head.S
index 15c5f0c48043..f58af9c246cb 100644
--- a/arch/ppc64/kernel/head.S
+++ b/arch/ppc64/kernel/head.S
@@ -1556,20 +1556,17 @@ copy_to_here:
1556 .section ".text"; 1556 .section ".text";
1557 .align 2 ; 1557 .align 2 ;
1558 1558
1559 .globl pmac_secondary_start_1 1559 .globl __secondary_start_pmac_0
1560pmac_secondary_start_1: 1560__secondary_start_pmac_0:
1561 li r24, 1 1561 /* NB the entries for cpus 0, 1, 2 must each occupy 8 bytes. */
1562 b .pmac_secondary_start 1562 li r24,0
1563 1563 b 1f
1564 .globl pmac_secondary_start_2 1564 li r24,1
1565pmac_secondary_start_2: 1565 b 1f
1566 li r24, 2 1566 li r24,2
1567 b .pmac_secondary_start 1567 b 1f
1568 1568 li r24,3
1569 .globl pmac_secondary_start_3 15691:
1570pmac_secondary_start_3:
1571 li r24, 3
1572 b .pmac_secondary_start
1573 1570
1574_GLOBAL(pmac_secondary_start) 1571_GLOBAL(pmac_secondary_start)
1575 /* turn on 64-bit mode */ 1572 /* turn on 64-bit mode */
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 */