aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc
diff options
context:
space:
mode:
authorMichael Neuling <mikey@neuling.org>2013-02-13 11:21:31 -0500
committerBenjamin Herrenschmidt <benh@kernel.crashing.org>2013-02-15 00:58:50 -0500
commitf4c3aff2230bfe696a0683073b77446248d7895c (patch)
tree997bcea60e598438260933d14c87f0c63fde0eba /arch/powerpc
parent14c39a4cf6bc4c3ef8ec40caa366047a87b0e031 (diff)
powerpc: Add additional state needed for transactional memory to thread struct
Set of new archtected state for saving away on context switch. 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>
Diffstat (limited to 'arch/powerpc')
-rw-r--r--arch/powerpc/include/asm/processor.h28
1 files changed, 28 insertions, 0 deletions
diff --git a/arch/powerpc/include/asm/processor.h b/arch/powerpc/include/asm/processor.h
index 42ac53cebacd..fc41ab3aa114 100644
--- a/arch/powerpc/include/asm/processor.h
+++ b/arch/powerpc/include/asm/processor.h
@@ -246,6 +246,34 @@ struct thread_struct {
246 unsigned long spefscr; /* SPE & eFP status */ 246 unsigned long spefscr; /* SPE & eFP status */
247 int used_spe; /* set if process has used spe */ 247 int used_spe; /* set if process has used spe */
248#endif /* CONFIG_SPE */ 248#endif /* CONFIG_SPE */
249#ifdef CONFIG_PPC_TRANSACTIONAL_MEM
250 u64 tm_tfhar; /* Transaction fail handler addr */
251 u64 tm_texasr; /* Transaction exception & summary */
252 u64 tm_tfiar; /* Transaction fail instr address reg */
253 unsigned long tm_orig_msr; /* Thread's MSR on ctx switch */
254 struct pt_regs ckpt_regs; /* Checkpointed registers */
255
256 /*
257 * Transactional FP and VSX 0-31 register set.
258 * NOTE: the sense of these is the opposite of the integer ckpt_regs!
259 *
260 * When a transaction is active/signalled/scheduled etc., *regs is the
261 * most recent set of/speculated GPRs with ckpt_regs being the older
262 * checkpointed regs to which we roll back if transaction aborts.
263 *
264 * However, fpr[] is the checkpointed 'base state' of FP regs, and
265 * transact_fpr[] is the new set of transactional values.
266 * VRs work the same way.
267 */
268 double transact_fpr[32][TS_FPRWIDTH];
269 struct {
270 unsigned int pad;
271 unsigned int val; /* Floating point status */
272 } transact_fpscr;
273 vector128 transact_vr[32] __attribute__((aligned(16)));
274 vector128 transact_vscr __attribute__((aligned(16)));
275 unsigned long transact_vrsave;
276#endif /* CONFIG_PPC_TRANSACTIONAL_MEM */
249#ifdef CONFIG_KVM_BOOK3S_32_HANDLER 277#ifdef CONFIG_KVM_BOOK3S_32_HANDLER
250 void* kvm_shadow_vcpu; /* KVM internal data */ 278 void* kvm_shadow_vcpu; /* KVM internal data */
251#endif /* CONFIG_KVM_BOOK3S_32_HANDLER */ 279#endif /* CONFIG_KVM_BOOK3S_32_HANDLER */