systemcfg is now a pointer
Jimi Xenidis
jimix at watson.ibm.com
Sun Aug 21 02:15:38 EST 2005
The following patch "fixes" 2 issues:
1) systemcfg is now a pointer that needs to be deref'd
2) use PLATFORM_LPAR bit to test if running in LPAR mode
let me know if you'd like separate diffs.
Signed-off-by: Jimi Xenidis <jimix at watson.ibm.com>
diff -r e783ced09546 arch/ppc64/kernel/head.S
--- a/arch/ppc64/kernel/head.S Thu Aug 18 22:16:12 2005
+++ b/arch/ppc64/kernel/head.S Sat Aug 20 12:10:24 2005
@@ -1753,8 +1753,9 @@
#else
/* set the ASR */
ld r3,systemcfg at got(r2) /* r3 = ptr to systemcfg */
+ ld r3,0(r3)
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
mfspr r3,PVR
srwi r3,r3,16
@@ -1916,8 +1917,9 @@
ld r3,PACASTABREAL(r13)
ori r4,r3,1 /* turn on valid bit */
ld r3,systemcfg at got(r2) /* r3 = ptr to systemcfg */
+ ld r3,0(r3)
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
mfspr r3,PVR
srwi r3,r3,16
@@ -1935,9 +1937,10 @@
99:
/* Set SDR1 (hash table pointer) */
ld r3,systemcfg at got(r2) /* r3 = ptr to systemcfg */
+ ld r3,0(r3)
lwz r3,PLATFORM(r3) /* r3 = platform flags */
/* Test if bit 0 is set (LPAR bit) */
- andi. r3,r3,0x1
+ andi. r3,r3,PLATFORM_LPAR
bne 98f
LOADADDR(r6,_SDR1) /* Only if NOT LPAR */
sub r6,r6,r26
More information about the Linuxppc64-dev
mailing list