Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

powerpc: Register defines for various transactional memory registers

Defines for MSR bits and transactional memory related SPRs TFIAR, TEXASR and
TEXASRU.

Signed-off-by: Matt Evans <matt@ozlabs.org>
Signed-off-by: Michael Neuling <mikey@neuling.org>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>

authored by

Michael Neuling and committed by
Benjamin Herrenschmidt
97a0aac9 8b3c34cf

+27
+27
arch/powerpc/include/asm/reg.h
··· 29 29 #define MSR_SF_LG 63 /* Enable 64 bit mode */ 30 30 #define MSR_ISF_LG 61 /* Interrupt 64b mode valid on 630 */ 31 31 #define MSR_HV_LG 60 /* Hypervisor state */ 32 + #define MSR_TS_T_LG 34 /* Trans Mem state: Transactional */ 33 + #define MSR_TS_S_LG 33 /* Trans Mem state: Suspended */ 34 + #define MSR_TS_LG 33 /* Trans Mem state (2 bits) */ 35 + #define MSR_TM_LG 32 /* Trans Mem Available */ 32 36 #define MSR_VEC_LG 25 /* Enable AltiVec */ 33 37 #define MSR_VSX_LG 23 /* Enable VSX */ 34 38 #define MSR_POW_LG 18 /* Enable Power Management */ ··· 101 97 #endif 102 98 #define MSR_RI __MASK(MSR_RI_LG) /* Recoverable Exception */ 103 99 #define MSR_LE __MASK(MSR_LE_LG) /* Little Endian */ 100 + 101 + #define MSR_TM __MASK(MSR_TM_LG) /* Transactional Mem Available */ 102 + #define MSR_TS_N 0 /* Non-transactional */ 103 + #define MSR_TS_S __MASK(MSR_TS_S_LG) /* Transaction Suspended */ 104 + #define MSR_TS_T __MASK(MSR_TS_T_LG) /* Transaction Transactional */ 105 + #define MSR_TS_MASK (MSR_TS_T | MSR_TS_S) /* Transaction State bits */ 106 + #define MSR_TM_ACTIVE(x) (((x) & MSR_TS_MASK) != 0) /* Transaction active? */ 107 + #define MSR_TM_TRANSACTIONAL(x) (((x) & MSR_TS_MASK) == MSR_TS_T) 108 + #define MSR_TM_SUSPENDED(x) (((x) & MSR_TS_MASK) == MSR_TS_S) 109 + 110 + /* Reason codes describing kernel causes for transaction aborts. By 111 + convention, bit0 is copied to TEXASR[56] (IBM bit 7) which is set if 112 + the failure is persistent. 113 + */ 114 + #define TM_CAUSE_RESCHED 0xfe 115 + #define TM_CAUSE_TLBI 0xfc 116 + #define TM_CAUSE_FAC_UNAV 0xfa 117 + #define TM_CAUSE_SYSCALL 0xf9 /* Persistent */ 118 + #define TM_CAUSE_MISC 0xf6 104 119 105 120 #if defined(CONFIG_PPC_BOOK3S_64) 106 121 #define MSR_64BIT MSR_SF ··· 216 193 #define SPRN_UAMOR 0x9d /* User Authority Mask Override Register */ 217 194 #define SPRN_AMOR 0x15d /* Authority Mask Override Register */ 218 195 #define SPRN_ACOP 0x1F /* Available Coprocessor Register */ 196 + #define SPRN_TFIAR 0x81 /* Transaction Failure Inst Addr */ 197 + #define SPRN_TEXASR 0x82 /* Transaction EXception & Summary */ 198 + #define SPRN_TEXASRU 0x83 /* '' '' '' Upper 32 */ 199 + #define SPRN_TFHAR 0x80 /* Transaction Failure Handler Addr */ 219 200 #define SPRN_CTRLF 0x088 220 201 #define SPRN_CTRLT 0x098 221 202 #define CTRL_CT 0xc0000000 /* current thread */