aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/kernel/entry_64.S
diff options
context:
space:
mode:
authorBenjamin Herrenschmidt <benh@kernel.crashing.org>2011-01-20 01:50:21 -0500
committerBenjamin Herrenschmidt <benh@kernel.crashing.org>2011-04-19 21:03:22 -0400
commit2dd60d79e0202628a47af9812a84d502cc63628c (patch)
tree03a114dcb4a8c3b75ec689d372abd331aff5a555 /arch/powerpc/kernel/entry_64.S
parent24cc67de62eebbda3ce0c46bdd56582c00dccd03 (diff)
powerpc: In HV mode, use HSPRG0 for PACA
When running in Hypervisor mode (arch 2.06 or later), we store the PACA in HSPRG0 instead of SPRG1. The architecture specifies that SPRGs may be lost during a "nap" power management operation (though they aren't currently on POWER7) and this enables use of SPRG1 by KVM guests. Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Diffstat (limited to 'arch/powerpc/kernel/entry_64.S')
-rw-r--r--arch/powerpc/kernel/entry_64.S4
1 files changed, 2 insertions, 2 deletions
diff --git a/arch/powerpc/kernel/entry_64.S b/arch/powerpc/kernel/entry_64.S
index d82878c4daa6..dbf5bfafd7bc 100644
--- a/arch/powerpc/kernel/entry_64.S
+++ b/arch/powerpc/kernel/entry_64.S
@@ -838,7 +838,7 @@ _GLOBAL(enter_rtas)
838 838
839_STATIC(rtas_return_loc) 839_STATIC(rtas_return_loc)
840 /* relocation is off at this point */ 840 /* relocation is off at this point */
841 mfspr r4,SPRN_SPRG_PACA /* Get PACA */ 841 GET_PACA(r4)
842 clrldi r4,r4,2 /* convert to realmode address */ 842 clrldi r4,r4,2 /* convert to realmode address */
843 843
844 bcl 20,31,$+4 844 bcl 20,31,$+4
@@ -869,7 +869,7 @@ _STATIC(rtas_restore_regs)
869 REST_8GPRS(14, r1) /* Restore the non-volatiles */ 869 REST_8GPRS(14, r1) /* Restore the non-volatiles */
870 REST_10GPRS(22, r1) /* ditto */ 870 REST_10GPRS(22, r1) /* ditto */
871 871
872 mfspr r13,SPRN_SPRG_PACA 872 GET_PACA(r13)
873 873
874 ld r4,_CCR(r1) 874 ld r4,_CCR(r1)
875 mtcr r4 875 mtcr r4