powerpc/tm: Save MSR to PACA before RFID
authorBreno Leitao <leitao@debian.org>
Mon, 26 Nov 2018 20:11:58 +0000 (18:11 -0200)
committerMichael Ellerman <mpe@ellerman.id.au>
Fri, 21 Dec 2018 03:46:50 +0000 (14:46 +1100)
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>
arch/powerpc/kernel/entry_64.S

index 7c2032e83ce7b47166c9b04c6146775d43b0a6e4..5fe1431083a5bad2c8bde200b32663365917f5d3 100644 (file)
@@ -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)