diff options
author | Jimi Xenidis <jimix@watson.ibm.com> | 2005-09-01 11:57:10 -0400 |
---|---|---|
committer | Paul Mackerras <paulus@samba.org> | 2005-09-06 02:07:52 -0400 |
commit | 2f4cf721eb2ff23b60af2932fd9fa4026f2a1164 (patch) | |
tree | f66ec191168b8aefcdbf0fb7aea53fde1ef2f284 /arch/ppc64 | |
parent | 8d9273918635f0301368c01b56c03a6f339e8d51 (diff) |
[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>
Diffstat (limited to 'arch/ppc64')
-rw-r--r-- | arch/ppc64/kernel/head.S | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/arch/ppc64/kernel/head.S b/arch/ppc64/kernel/head.S index 036959775623..b436206e317d 100644 --- a/arch/ppc64/kernel/head.S +++ b/arch/ppc64/kernel/head.S | |||
@@ -1646,8 +1646,9 @@ _GLOBAL(__secondary_start) | |||
1646 | #else | 1646 | #else |
1647 | /* set the ASR */ | 1647 | /* set the ASR */ |
1648 | ld r3,systemcfg@got(r2) /* r3 = ptr to systemcfg */ | 1648 | ld r3,systemcfg@got(r2) /* r3 = ptr to systemcfg */ |
1649 | ld r3,0(r3) | ||
1649 | lwz r3,PLATFORM(r3) /* r3 = platform flags */ | 1650 | lwz r3,PLATFORM(r3) /* r3 = platform flags */ |
1650 | cmpldi r3,PLATFORM_PSERIES_LPAR | 1651 | andi. r3,r3,PLATFORM_LPAR /* Test if bit 0 is set (LPAR bit) */ |
1651 | bne 98f | 1652 | bne 98f |
1652 | mfspr r3,PVR | 1653 | mfspr r3,PVR |
1653 | srwi r3,r3,16 | 1654 | srwi r3,r3,16 |
@@ -1809,8 +1810,9 @@ _STATIC(start_here_multiplatform) | |||
1809 | ld r3,PACASTABREAL(r13) | 1810 | ld r3,PACASTABREAL(r13) |
1810 | ori r4,r3,1 /* turn on valid bit */ | 1811 | ori r4,r3,1 /* turn on valid bit */ |
1811 | ld r3,systemcfg@got(r2) /* r3 = ptr to systemcfg */ | 1812 | ld r3,systemcfg@got(r2) /* r3 = ptr to systemcfg */ |
1813 | ld r3,0(r3) | ||
1812 | lwz r3,PLATFORM(r3) /* r3 = platform flags */ | 1814 | lwz r3,PLATFORM(r3) /* r3 = platform flags */ |
1813 | cmpldi r3,PLATFORM_PSERIES_LPAR | 1815 | andi. r3,r3,PLATFORM_LPAR /* Test if bit 0 is set (LPAR bit) */ |
1814 | bne 98f | 1816 | bne 98f |
1815 | mfspr r3,PVR | 1817 | mfspr r3,PVR |
1816 | srwi r3,r3,16 | 1818 | srwi r3,r3,16 |
@@ -1828,9 +1830,10 @@ _STATIC(start_here_multiplatform) | |||
1828 | 99: | 1830 | 99: |
1829 | /* Set SDR1 (hash table pointer) */ | 1831 | /* Set SDR1 (hash table pointer) */ |
1830 | ld r3,systemcfg@got(r2) /* r3 = ptr to systemcfg */ | 1832 | ld r3,systemcfg@got(r2) /* r3 = ptr to systemcfg */ |
1833 | ld r3,0(r3) | ||
1831 | lwz r3,PLATFORM(r3) /* r3 = platform flags */ | 1834 | lwz r3,PLATFORM(r3) /* r3 = platform flags */ |
1832 | /* Test if bit 0 is set (LPAR bit) */ | 1835 | /* Test if bit 0 is set (LPAR bit) */ |
1833 | andi. r3,r3,0x1 | 1836 | andi. r3,r3,PLATFORM_LPAR |
1834 | bne 98f | 1837 | bne 98f |
1835 | LOADADDR(r6,_SDR1) /* Only if NOT LPAR */ | 1838 | LOADADDR(r6,_SDR1) /* Only if NOT LPAR */ |
1836 | sub r6,r6,r26 | 1839 | sub r6,r6,r26 |