aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/include
diff options
context:
space:
mode:
authorCyril Bur <cyrilbur@gmail.com>2016-09-14 04:02:16 -0400
committerMichael Ellerman <mpe@ellerman.id.au>2016-10-04 05:33:17 -0400
commit5d176f751ee3c6eededd984ad409bff201f436a7 (patch)
treec760a51812c2cfd6c27fccf9bd0f4d303e984509 /arch/powerpc/include
parent172f7aaa75d0eaae167edde25c08aae9059e80fc (diff)
powerpc: tm: Enable transactional memory (TM) lazily for userspace
Currently the MSR TM bit is always set if the hardware is TM capable. This adds extra overhead as it means the TM SPRS (TFHAR, TEXASR and TFAIR) must be swapped for each process regardless of if they use TM. For processes that don't use TM the TM MSR bit can be turned off allowing the kernel to avoid the expensive swap of the TM registers. A TM unavailable exception will occur if a thread does use TM and the kernel will enable MSR_TM and leave it so for some time afterwards. Signed-off-by: Cyril Bur <cyrilbur@gmail.com> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Diffstat (limited to 'arch/powerpc/include')
-rw-r--r--arch/powerpc/include/asm/processor.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/arch/powerpc/include/asm/processor.h b/arch/powerpc/include/asm/processor.h
index b3e0cfcc84f6..c07c31b0e89e 100644
--- a/arch/powerpc/include/asm/processor.h
+++ b/arch/powerpc/include/asm/processor.h
@@ -257,6 +257,7 @@ struct thread_struct {
257 int used_spe; /* set if process has used spe */ 257 int used_spe; /* set if process has used spe */
258#endif /* CONFIG_SPE */ 258#endif /* CONFIG_SPE */
259#ifdef CONFIG_PPC_TRANSACTIONAL_MEM 259#ifdef CONFIG_PPC_TRANSACTIONAL_MEM
260 u8 load_tm;
260 u64 tm_tfhar; /* Transaction fail handler addr */ 261 u64 tm_tfhar; /* Transaction fail handler addr */
261 u64 tm_texasr; /* Transaction exception & summary */ 262 u64 tm_texasr; /* Transaction exception & summary */
262 u64 tm_tfiar; /* Transaction fail instr address reg */ 263 u64 tm_tfiar; /* Transaction fail instr address reg */