summaryrefslogtreecommitdiff
path: root/arch/powerpc/kernel/head_64.S
diff options
context:
space:
mode:
authorPaul Mackerras <paulus@samba.org>2005-10-10 22:41:25 +1000
committerPaul Mackerras <paulus@samba.org>2005-10-10 22:41:25 +1000
commit5a408329ed19cf2a80e831d28cbd93d2e36155a6 (patch)
treedc5ae749f1da14819ef6947893b0c4f2d9e1ed1c /arch/powerpc/kernel/head_64.S
parent4a2885630bc0735e573bced7001dae9750cb80d5 (diff)
powerpc: Fix bug caused by negation of 64-bit reloc_offset value
Although both ppc32 and ppc64 have a reloc_offset function, the ppc64 one produced the opposite sign to the ppc32 one. This standardizes on the ppc32 sign and fixes the merged 64-bit code to account for that. Signed-off-by: Paul Mackerras <paulus@samba.org>
Diffstat (limited to 'arch/powerpc/kernel/head_64.S')
-rw-r--r--arch/powerpc/kernel/head_64.S20
1 files changed, 10 insertions, 10 deletions
diff --git a/arch/powerpc/kernel/head_64.S b/arch/powerpc/kernel/head_64.S
index 7889ff8473b9..3fcac3c37b9b 100644
--- a/arch/powerpc/kernel/head_64.S
+++ b/arch/powerpc/kernel/head_64.S
@@ -1385,7 +1385,7 @@ _STATIC(__boot_from_prom)
addi r2,r2,0x4000
/* Relocate the TOC from a virt addr to a real addr */
- sub r2,r2,r3
+ add r2,r2,r3
/* Restore parameters */
mr r3,r31
@@ -1424,7 +1424,7 @@ _STATIC(__after_prom_start)
li r3,0 /* target addr */
// XXX FIXME: Use phys returned by OF (r30)
- sub r4,r27,r26 /* source addr */
+ add r4,r27,r26 /* source addr */
/* current address of _start */
/* i.e. where we are running */
/* the source addr */
@@ -1444,7 +1444,7 @@ _STATIC(__after_prom_start)
bctr
4: LOADADDR(r5,klimit)
- sub r5,r5,r26
+ add r5,r5,r26
ld r5,0(r5) /* get the value of klimit */
sub r5,r5,r27
bl .copy_and_flush /* copy the rest */
@@ -1703,7 +1703,7 @@ _STATIC(start_here_multiplatform)
/* kernel but are still running in real mode. */
LOADADDR(r3,init_thread_union)
- sub r3,r3,r26
+ add r3,r3,r26
/* set up a stack pointer (physical address) */
addi r1,r3,THREAD_SIZE
@@ -1714,12 +1714,12 @@ _STATIC(start_here_multiplatform)
LOADADDR(r2,__toc_start)
addi r2,r2,0x4000
addi r2,r2,0x4000
- sub r2,r2,r26
+ add r2,r2,r26
LOADADDR(r3,cpu_specs)
- sub r3,r3,r26
+ add r3,r3,r26
LOADADDR(r4,cur_cpu_spec)
- sub r4,r4,r26
+ add r4,r4,r26
mr r5,r26
bl .identify_cpu
@@ -1735,13 +1735,13 @@ _STATIC(start_here_multiplatform)
* code
*/
LOADADDR(r27, boot_cpuid)
- sub r27,r27,r26
+ add r27,r27,r26
lwz r27,0(r27)
LOADADDR(r24, paca) /* Get base vaddr of paca array */
mulli r13,r27,PACA_SIZE /* Calculate vaddr of right paca */
add r13,r13,r24 /* for this processor. */
- sub r13,r13,r26 /* convert to physical addr */
+ add r13,r13,r26 /* convert to physical addr */
mtspr SPRN_SPRG3,r13 /* PPPBBB: Temp... -Peter */
/* Do very early kernel initializations, including initial hash table,
@@ -1781,7 +1781,7 @@ _STATIC(start_here_multiplatform)
andi. r3,r3,PLATFORM_LPAR
bne 98f /* branch if result is !0 */
LOADADDR(r6,_SDR1) /* Only if NOT LPAR */
- sub r6,r6,r26
+ add r6,r6,r26
ld r6,0(r6) /* get the value of _SDR1 */
mtspr SPRN_SDR1,r6 /* set the htab location */
98: