diff options
author | Michael Ellerman <michael@ellerman.id.au> | 2005-12-05 16:49:00 -0500 |
---|---|---|
committer | Paul Mackerras <paulus@samba.org> | 2006-01-08 22:52:25 -0500 |
commit | 758438a7b8da593c9116e95cc7fdff6e9e0b0c40 (patch) | |
tree | 5343d8ec40016294902278c27a9f5647bd061890 /arch/powerpc/kernel/setup_64.c | |
parent | 0cc4746cadda16826a1b3214c042a2f75445b71c (diff) |
[PATCH] powerpc: Fixups for kernel linked at 32 MB
There's a few places where we need to fix things up for the kernel to work
if it's linked at 32MB:
- platforms/powermac/smp.c
To start secondary cpus on pmac we patch the reset vector, which is fine.
Except if we're above 32MB we don't have enough bits for an absolute branch,
it needs to relative.
- kernel/head_64.s
- A few branches in the cpu hold code need to load the full target address
and do a bctr.
- after_prom_start needs to load PHYSICAL_START as the dest address, not 0.
- The exception prolog needs to load the low word of the target adddress,
not just the low halfword.
- Fixup handling of the initial stab address.
- kernel/setup_64.c
smp_release_cpus() needs to write 1 to the spinloop flag near 0, not 32 MB.
Signed-off-by: Michael Ellerman <michael@ellerman.id.au>
Signed-off-by: Paul Mackerras <paulus@samba.org>
Diffstat (limited to 'arch/powerpc/kernel/setup_64.c')
-rw-r--r-- | arch/powerpc/kernel/setup_64.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/arch/powerpc/kernel/setup_64.c b/arch/powerpc/kernel/setup_64.c index e67120e34652..419e0b974b96 100644 --- a/arch/powerpc/kernel/setup_64.c +++ b/arch/powerpc/kernel/setup_64.c | |||
@@ -322,6 +322,7 @@ void early_setup_secondary(void) | |||
322 | void smp_release_cpus(void) | 322 | void smp_release_cpus(void) |
323 | { | 323 | { |
324 | extern unsigned long __secondary_hold_spinloop; | 324 | extern unsigned long __secondary_hold_spinloop; |
325 | unsigned long *ptr; | ||
325 | 326 | ||
326 | DBG(" -> smp_release_cpus()\n"); | 327 | DBG(" -> smp_release_cpus()\n"); |
327 | 328 | ||
@@ -332,7 +333,9 @@ void smp_release_cpus(void) | |||
332 | * This is useless but harmless on iSeries, secondaries are already | 333 | * This is useless but harmless on iSeries, secondaries are already |
333 | * waiting on their paca spinloops. */ | 334 | * waiting on their paca spinloops. */ |
334 | 335 | ||
335 | __secondary_hold_spinloop = 1; | 336 | ptr = (unsigned long *)((unsigned long)&__secondary_hold_spinloop |
337 | - PHYSICAL_START); | ||
338 | *ptr = 1; | ||
336 | mb(); | 339 | mb(); |
337 | 340 | ||
338 | DBG(" <- smp_release_cpus()\n"); | 341 | DBG(" <- smp_release_cpus()\n"); |