[PATCH] ppc64: systemcfg is now a pointer

The following patch fixes 2 issues:
  1) use PLATFORM_LPAR bit to test if running in LPAR mode
  2) systemcfg pointer is assigned from static data in
     arch/ppc64/kernel/pacaData.c.  The file arch/ppc64/kernel/head.S
     now refers to is using the GOT binding to the pointer and hence
     must deref it.

Signed-off-by: Jimi Xenidis <jimix@watson.ibm.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
This commit is contained in:
Jimi Xenidis 2005-09-01 11:57:10 -04:00 committed by Paul Mackerras
parent 8d92739186
commit 2f4cf721eb
1 changed files with 6 additions and 3 deletions

View File

@ -1646,8 +1646,9 @@ _GLOBAL(__secondary_start)
#else #else
/* set the ASR */ /* set the ASR */
ld r3,systemcfg@got(r2) /* r3 = ptr to systemcfg */ ld r3,systemcfg@got(r2) /* r3 = ptr to systemcfg */
ld r3,0(r3)
lwz r3,PLATFORM(r3) /* r3 = platform flags */ lwz r3,PLATFORM(r3) /* r3 = platform flags */
cmpldi r3,PLATFORM_PSERIES_LPAR andi. r3,r3,PLATFORM_LPAR /* Test if bit 0 is set (LPAR bit) */
bne 98f bne 98f
mfspr r3,PVR mfspr r3,PVR
srwi r3,r3,16 srwi r3,r3,16
@ -1809,8 +1810,9 @@ _STATIC(start_here_multiplatform)
ld r3,PACASTABREAL(r13) ld r3,PACASTABREAL(r13)
ori r4,r3,1 /* turn on valid bit */ ori r4,r3,1 /* turn on valid bit */
ld r3,systemcfg@got(r2) /* r3 = ptr to systemcfg */ ld r3,systemcfg@got(r2) /* r3 = ptr to systemcfg */
ld r3,0(r3)
lwz r3,PLATFORM(r3) /* r3 = platform flags */ lwz r3,PLATFORM(r3) /* r3 = platform flags */
cmpldi r3,PLATFORM_PSERIES_LPAR andi. r3,r3,PLATFORM_LPAR /* Test if bit 0 is set (LPAR bit) */
bne 98f bne 98f
mfspr r3,PVR mfspr r3,PVR
srwi r3,r3,16 srwi r3,r3,16
@ -1828,9 +1830,10 @@ _STATIC(start_here_multiplatform)
99: 99:
/* Set SDR1 (hash table pointer) */ /* Set SDR1 (hash table pointer) */
ld r3,systemcfg@got(r2) /* r3 = ptr to systemcfg */ ld r3,systemcfg@got(r2) /* r3 = ptr to systemcfg */
ld r3,0(r3)
lwz r3,PLATFORM(r3) /* r3 = platform flags */ lwz r3,PLATFORM(r3) /* r3 = platform flags */
/* Test if bit 0 is set (LPAR bit) */ /* Test if bit 0 is set (LPAR bit) */
andi. r3,r3,0x1 andi. r3,r3,PLATFORM_LPAR
bne 98f bne 98f
LOADADDR(r6,_SDR1) /* Only if NOT LPAR */ LOADADDR(r6,_SDR1) /* Only if NOT LPAR */
sub r6,r6,r26 sub r6,r6,r26