diff options
author | Jimi Xenidis <jimix@watson.ibm.com> | 2006-06-21 19:15:55 -0400 |
---|---|---|
committer | Paul Mackerras <paulus@samba.org> | 2006-06-28 11:51:12 +1000 |
commit | 6d7c466292fc7c90bb160c1c7df74035c7c12595 (patch) | |
tree | ea1def4bb391060da2a3c4ebad9e3ad281f8a09e /arch | |
parent | 70c3967d4f8029f3d53323a9f0490df61d8cb77d (diff) | |
download | op-kernel-dev-6d7c466292fc7c90bb160c1c7df74035c7c12595.zip op-kernel-dev-6d7c466292fc7c90bb160c1c7df74035c7c12595.tar.gz |
[POWERPC] Don't access HID registers if running on a Hypervisor.
The following patch avoids accessing Hypervisor privilege HID
registers when running on a Hypervisor (MSR[HV]=0).
Signed-off-by: Jimi Xenidis <jimix@watson.ibm.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/powerpc/kernel/cpu_setup_power4.S | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/arch/powerpc/kernel/cpu_setup_power4.S b/arch/powerpc/kernel/cpu_setup_power4.S index 2714183..1fc8632 100644 --- a/arch/powerpc/kernel/cpu_setup_power4.S +++ b/arch/powerpc/kernel/cpu_setup_power4.S @@ -125,7 +125,12 @@ _GLOBAL(__save_cpu_setup) cmpwi r0,0x44 bne 2f -1: /* Save HID0,1,4 and 5 */ +1: /* skip if not running in HV mode */ + mfmsr r0 + rldicl. r0,r0,4,63 + beq 2f + + /* Save HID0,1,4 and 5 */ mfspr r3,SPRN_HID0 std r3,CS_HID0(r5) mfspr r3,SPRN_HID1 @@ -159,7 +164,12 @@ _GLOBAL(__restore_cpu_setup) cmpwi r0,0x44 bnelr -1: /* Before accessing memory, we make sure rm_ci is clear */ +1: /* skip if not running in HV mode */ + mfmsr r0 + rldicl. r0,r0,4,63 + beqlr + + /* Before accessing memory, we make sure rm_ci is clear */ li r0,0 mfspr r3,SPRN_HID4 rldimi r3,r0,40,23 /* clear bit 23 (rm_ci) */ |