aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/kernel/entry_64.S
diff options
context:
space:
mode:
authorBreno Leitao <leitao@debian.org>2018-11-26 18:11:58 -0200
committerMichael Ellerman <mpe@ellerman.id.au>2018-12-21 14:46:50 +1100
commit63a0d6b03b8e6fdd8c8ce5eec0ac04ef8e67d63f (patch)
treed684da9d4c8abd124ddcb37d061f483e3edd4cb7 /arch/powerpc/kernel/entry_64.S
parente1c3743e1a20647c53b719dbf28b48f45d23f2cd (diff)
downloadlinux-63a0d6b03b8e6fdd8c8ce5eec0ac04ef8e67d63f.tar.gz
powerpc/tm: Save MSR to PACA before RFID
As other exit points, move SRR1 (MSR) into paca->tm_scratch, so, if there is a TM Bad Thing in RFID, it is easy to understand what was the SRR1 value being used. Signed-off-by: Breno Leitao <leitao@debian.org> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Diffstat (limited to 'arch/powerpc/kernel/entry_64.S')
-rw-r--r--arch/powerpc/kernel/entry_64.S4
1 files changed, 4 insertions, 0 deletions
diff --git a/arch/powerpc/kernel/entry_64.S b/arch/powerpc/kernel/entry_64.S
index 7c2032e83ce7b4..5fe1431083a5ba 100644
--- a/arch/powerpc/kernel/entry_64.S
+++ b/arch/powerpc/kernel/entry_64.S
@@ -291,6 +291,10 @@ BEGIN_FTR_SECTION
HMT_MEDIUM_LOW
END_FTR_SECTION_IFSET(CPU_FTR_HAS_PPR)
+#ifdef CONFIG_PPC_TRANSACTIONAL_MEM
+ std r8, PACATMSCRATCH(r13)
+#endif
+
ld r13,GPR13(r1) /* only restore r13 if returning to usermode */
ld r2,GPR2(r1)
ld r1,GPR1(r1)