diff options
author | Michael Neuling <mikey@neuling.org> | 2013-02-13 11:21:32 -0500 |
---|---|---|
committer | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2013-02-15 00:58:50 -0500 |
commit | 8b3c34cf0e0ab334a24aad7367cd06a5ba09a898 (patch) | |
tree | a0dbebeaee859a25117559f7a4aff9c59224d847 /arch/powerpc/kernel/asm-offsets.c | |
parent | f4c3aff2230bfe696a0683073b77446248d7895c (diff) |
powerpc: New macros for transactional memory support
This adds new macros for saving and restoring checkpointed architected state
from and to the thread_struct.
It also adds some debugging macros for when your brain explodes trying to debug
your transactional memory enabled kernel.
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/kernel/asm-offsets.c')
-rw-r--r-- | arch/powerpc/kernel/asm-offsets.c | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/arch/powerpc/kernel/asm-offsets.c b/arch/powerpc/kernel/asm-offsets.c index e295a09b1f06..0fdc97496d7c 100644 --- a/arch/powerpc/kernel/asm-offsets.c +++ b/arch/powerpc/kernel/asm-offsets.c | |||
@@ -125,6 +125,29 @@ int main(void) | |||
125 | #ifdef CONFIG_PPC_BOOK3S_64 | 125 | #ifdef CONFIG_PPC_BOOK3S_64 |
126 | DEFINE(THREAD_TAR, offsetof(struct thread_struct, tar)); | 126 | DEFINE(THREAD_TAR, offsetof(struct thread_struct, tar)); |
127 | #endif | 127 | #endif |
128 | #ifdef CONFIG_PPC_TRANSACTIONAL_MEM | ||
129 | DEFINE(THREAD_TM_TFHAR, offsetof(struct thread_struct, tm_tfhar)); | ||
130 | DEFINE(THREAD_TM_TEXASR, offsetof(struct thread_struct, tm_texasr)); | ||
131 | DEFINE(THREAD_TM_TFIAR, offsetof(struct thread_struct, tm_tfiar)); | ||
132 | DEFINE(PT_CKPT_REGS, offsetof(struct thread_struct, ckpt_regs)); | ||
133 | DEFINE(THREAD_TRANSACT_VR0, offsetof(struct thread_struct, | ||
134 | transact_vr[0])); | ||
135 | DEFINE(THREAD_TRANSACT_VSCR, offsetof(struct thread_struct, | ||
136 | transact_vscr)); | ||
137 | DEFINE(THREAD_TRANSACT_VRSAVE, offsetof(struct thread_struct, | ||
138 | transact_vrsave)); | ||
139 | DEFINE(THREAD_TRANSACT_FPR0, offsetof(struct thread_struct, | ||
140 | transact_fpr[0])); | ||
141 | DEFINE(THREAD_TRANSACT_FPSCR, offsetof(struct thread_struct, | ||
142 | transact_fpscr)); | ||
143 | #ifdef CONFIG_VSX | ||
144 | DEFINE(THREAD_TRANSACT_VSR0, offsetof(struct thread_struct, | ||
145 | transact_fpr[0])); | ||
146 | #endif | ||
147 | /* Local pt_regs on stack for Transactional Memory funcs. */ | ||
148 | DEFINE(TM_FRAME_SIZE, STACK_FRAME_OVERHEAD + | ||
149 | sizeof(struct pt_regs) + 16); | ||
150 | #endif /* CONFIG_PPC_TRANSACTIONAL_MEM */ | ||
128 | 151 | ||
129 | DEFINE(TI_FLAGS, offsetof(struct thread_info, flags)); | 152 | DEFINE(TI_FLAGS, offsetof(struct thread_info, flags)); |
130 | DEFINE(TI_LOCAL_FLAGS, offsetof(struct thread_info, local_flags)); | 153 | DEFINE(TI_LOCAL_FLAGS, offsetof(struct thread_info, local_flags)); |