aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCyril Bur <cyrilbur@gmail.com>2016-09-23 02:18:25 -0400
committerMichael Ellerman <mpe@ellerman.id.au>2016-10-04 05:33:16 -0400
commit000ec280e3dd5c77a5227db27bfda1511e26db9a (patch)
tree85e359de526c95627c3b11bc8f31050800e48a8a
parentdc3106690b20305c3df06b42456fe386dd632ac9 (diff)
powerpc: tm: Rename transct_(*) to ck(\1)_state
Make the structures being used for checkpointed state named consistently with the pt_regs/ckpt_regs. Signed-off-by: Cyril Bur <cyrilbur@gmail.com> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
-rw-r--r--arch/powerpc/include/asm/processor.h8
-rw-r--r--arch/powerpc/kernel/asm-offsets.c12
-rw-r--r--arch/powerpc/kernel/fpu.S2
-rw-r--r--arch/powerpc/kernel/process.c4
-rw-r--r--arch/powerpc/kernel/ptrace.c46
-rw-r--r--arch/powerpc/kernel/signal.h8
-rw-r--r--arch/powerpc/kernel/signal_32.c60
-rw-r--r--arch/powerpc/kernel/signal_64.c32
-rw-r--r--arch/powerpc/kernel/tm.S12
-rw-r--r--arch/powerpc/kernel/vector.S4
10 files changed, 94 insertions, 94 deletions
diff --git a/arch/powerpc/include/asm/processor.h b/arch/powerpc/include/asm/processor.h
index feab2ce72940..b3e0cfcc84f6 100644
--- a/arch/powerpc/include/asm/processor.h
+++ b/arch/powerpc/include/asm/processor.h
@@ -147,7 +147,7 @@ typedef struct {
147} mm_segment_t; 147} mm_segment_t;
148 148
149#define TS_FPR(i) fp_state.fpr[i][TS_FPROFFSET] 149#define TS_FPR(i) fp_state.fpr[i][TS_FPROFFSET]
150#define TS_TRANS_FPR(i) transact_fp.fpr[i][TS_FPROFFSET] 150#define TS_CKFPR(i) ckfp_state.fpr[i][TS_FPROFFSET]
151 151
152/* FP and VSX 0-31 register set */ 152/* FP and VSX 0-31 register set */
153struct thread_fp_state { 153struct thread_fp_state {
@@ -275,9 +275,9 @@ struct thread_struct {
275 * 275 *
276 * These are analogous to how ckpt_regs and pt_regs work 276 * These are analogous to how ckpt_regs and pt_regs work
277 */ 277 */
278 struct thread_fp_state transact_fp; 278 struct thread_fp_state ckfp_state; /* Checkpointed FP state */
279 struct thread_vr_state transact_vr; 279 struct thread_vr_state ckvr_state; /* Checkpointed VR state */
280 unsigned long transact_vrsave; 280 unsigned long ckvrsave; /* Checkpointed VRSAVE */
281#endif /* CONFIG_PPC_TRANSACTIONAL_MEM */ 281#endif /* CONFIG_PPC_TRANSACTIONAL_MEM */
282#ifdef CONFIG_KVM_BOOK3S_32_HANDLER 282#ifdef CONFIG_KVM_BOOK3S_32_HANDLER
283 void* kvm_shadow_vcpu; /* KVM internal data */ 283 void* kvm_shadow_vcpu; /* KVM internal data */
diff --git a/arch/powerpc/kernel/asm-offsets.c b/arch/powerpc/kernel/asm-offsets.c
index b89d14c0352c..dd0fc339ba40 100644
--- a/arch/powerpc/kernel/asm-offsets.c
+++ b/arch/powerpc/kernel/asm-offsets.c
@@ -142,12 +142,12 @@ int main(void)
142 DEFINE(THREAD_TM_PPR, offsetof(struct thread_struct, tm_ppr)); 142 DEFINE(THREAD_TM_PPR, offsetof(struct thread_struct, tm_ppr));
143 DEFINE(THREAD_TM_DSCR, offsetof(struct thread_struct, tm_dscr)); 143 DEFINE(THREAD_TM_DSCR, offsetof(struct thread_struct, tm_dscr));
144 DEFINE(PT_CKPT_REGS, offsetof(struct thread_struct, ckpt_regs)); 144 DEFINE(PT_CKPT_REGS, offsetof(struct thread_struct, ckpt_regs));
145 DEFINE(THREAD_TRANSACT_VRSTATE, offsetof(struct thread_struct, 145 DEFINE(THREAD_CKVRSTATE, offsetof(struct thread_struct,
146 transact_vr)); 146 ckvr_state));
147 DEFINE(THREAD_TRANSACT_VRSAVE, offsetof(struct thread_struct, 147 DEFINE(THREAD_CKVRSAVE, offsetof(struct thread_struct,
148 transact_vrsave)); 148 ckvrsave));
149 DEFINE(THREAD_TRANSACT_FPSTATE, offsetof(struct thread_struct, 149 DEFINE(THREAD_CKFPSTATE, offsetof(struct thread_struct,
150 transact_fp)); 150 ckfp_state));
151 /* Local pt_regs on stack for Transactional Memory funcs. */ 151 /* Local pt_regs on stack for Transactional Memory funcs. */
152 DEFINE(TM_FRAME_SIZE, STACK_FRAME_OVERHEAD + 152 DEFINE(TM_FRAME_SIZE, STACK_FRAME_OVERHEAD +
153 sizeof(struct pt_regs) + 16); 153 sizeof(struct pt_regs) + 16);
diff --git a/arch/powerpc/kernel/fpu.S b/arch/powerpc/kernel/fpu.S
index 15da2b5df85e..181c18707f08 100644
--- a/arch/powerpc/kernel/fpu.S
+++ b/arch/powerpc/kernel/fpu.S
@@ -68,7 +68,7 @@ END_FTR_SECTION_IFSET(CPU_FTR_VSX)
68 SYNC 68 SYNC
69 MTMSRD(r5) 69 MTMSRD(r5)
70 70
71 addi r7,r3,THREAD_TRANSACT_FPSTATE 71 addi r7,r3,THREAD_CKFPSTATE
72 lfd fr0,FPSTATE_FPSCR(r7) 72 lfd fr0,FPSTATE_FPSCR(r7)
73 MTFSF_L(fr0) 73 MTFSF_L(fr0)
74 REST_32FPVSRS(0, R4, R7) 74 REST_32FPVSRS(0, R4, R7)
diff --git a/arch/powerpc/kernel/process.c b/arch/powerpc/kernel/process.c
index 6e9a0543da12..e22033005d15 100644
--- a/arch/powerpc/kernel/process.c
+++ b/arch/powerpc/kernel/process.c
@@ -851,8 +851,8 @@ static inline void tm_reclaim_task(struct task_struct *tsk)
851 * 851 *
852 * In switching we need to maintain a 2nd register state as 852 * In switching we need to maintain a 2nd register state as
853 * oldtask->thread.ckpt_regs. We tm_reclaim(oldproc); this saves the 853 * oldtask->thread.ckpt_regs. We tm_reclaim(oldproc); this saves the
854 * checkpointed (tbegin) state in ckpt_regs and saves the transactional 854 * checkpointed (tbegin) state in ckpt_regs, ckfp_state and
855 * (current) FPRs into oldtask->thread.transact_fpr[]. 855 * ckvr_state
856 * 856 *
857 * We also context switch (save) TFHAR/TEXASR/TFIAR in here. 857 * We also context switch (save) TFHAR/TEXASR/TFIAR in here.
858 */ 858 */
diff --git a/arch/powerpc/kernel/ptrace.c b/arch/powerpc/kernel/ptrace.c
index 7ae744fe8cb1..b1ec62f2cc31 100644
--- a/arch/powerpc/kernel/ptrace.c
+++ b/arch/powerpc/kernel/ptrace.c
@@ -404,7 +404,7 @@ static int gpr_set(struct task_struct *target, const struct user_regset *regset,
404 404
405/* 405/*
406 * Regardless of transactions, 'fp_state' holds the current running 406 * Regardless of transactions, 'fp_state' holds the current running
407 * value of all FPR registers and 'transact_fp' holds the last checkpointed 407 * value of all FPR registers and 'ckfp_state' holds the last checkpointed
408 * value of all FPR registers for the current transaction. 408 * value of all FPR registers for the current transaction.
409 * 409 *
410 * Userspace interface buffer layout: 410 * Userspace interface buffer layout:
@@ -442,7 +442,7 @@ static int fpr_get(struct task_struct *target, const struct user_regset *regset,
442 442
443/* 443/*
444 * Regardless of transactions, 'fp_state' holds the current running 444 * Regardless of transactions, 'fp_state' holds the current running
445 * value of all FPR registers and 'transact_fp' holds the last checkpointed 445 * value of all FPR registers and 'ckfp_state' holds the last checkpointed
446 * value of all FPR registers for the current transaction. 446 * value of all FPR registers for the current transaction.
447 * 447 *
448 * Userspace interface buffer layout: 448 * Userspace interface buffer layout:
@@ -506,7 +506,7 @@ static int vr_active(struct task_struct *target,
506 506
507/* 507/*
508 * Regardless of transactions, 'vr_state' holds the current running 508 * Regardless of transactions, 'vr_state' holds the current running
509 * value of all the VMX registers and 'transact_vr' holds the last 509 * value of all the VMX registers and 'ckvr_state' holds the last
510 * checkpointed value of all the VMX registers for the current 510 * checkpointed value of all the VMX registers for the current
511 * transaction to fall back on in case it aborts. 511 * transaction to fall back on in case it aborts.
512 * 512 *
@@ -553,7 +553,7 @@ static int vr_get(struct task_struct *target, const struct user_regset *regset,
553 553
554/* 554/*
555 * Regardless of transactions, 'vr_state' holds the current running 555 * Regardless of transactions, 'vr_state' holds the current running
556 * value of all the VMX registers and 'transact_vr' holds the last 556 * value of all the VMX registers and 'ckvr_state' holds the last
557 * checkpointed value of all the VMX registers for the current 557 * checkpointed value of all the VMX registers for the current
558 * transaction to fall back on in case it aborts. 558 * transaction to fall back on in case it aborts.
559 * 559 *
@@ -617,7 +617,7 @@ static int vsr_active(struct task_struct *target,
617 617
618/* 618/*
619 * Regardless of transactions, 'fp_state' holds the current running 619 * Regardless of transactions, 'fp_state' holds the current running
620 * value of all FPR registers and 'transact_fp' holds the last 620 * value of all FPR registers and 'ckfp_state' holds the last
621 * checkpointed value of all FPR registers for the current 621 * checkpointed value of all FPR registers for the current
622 * transaction. 622 * transaction.
623 * 623 *
@@ -650,7 +650,7 @@ static int vsr_get(struct task_struct *target, const struct user_regset *regset,
650 650
651/* 651/*
652 * Regardless of transactions, 'fp_state' holds the current running 652 * Regardless of transactions, 'fp_state' holds the current running
653 * value of all FPR registers and 'transact_fp' holds the last 653 * value of all FPR registers and 'ckfp_state' holds the last
654 * checkpointed value of all FPR registers for the current 654 * checkpointed value of all FPR registers for the current
655 * transaction. 655 * transaction.
656 * 656 *
@@ -945,7 +945,7 @@ static int tm_cfpr_active(struct task_struct *target,
945 * 945 *
946 * This function gets in transaction checkpointed FPR registers. 946 * This function gets in transaction checkpointed FPR registers.
947 * 947 *
948 * When the transaction is active 'transact_fp' holds the checkpointed 948 * When the transaction is active 'ckfp_state' holds the checkpointed
949 * values for the current transaction to fall back on if it aborts 949 * values for the current transaction to fall back on if it aborts
950 * in between. This function gets those checkpointed FPR registers. 950 * in between. This function gets those checkpointed FPR registers.
951 * The userspace interface buffer layout is as follows. 951 * The userspace interface buffer layout is as follows.
@@ -975,8 +975,8 @@ static int tm_cfpr_get(struct task_struct *target,
975 975
976 /* copy to local buffer then write that out */ 976 /* copy to local buffer then write that out */
977 for (i = 0; i < 32 ; i++) 977 for (i = 0; i < 32 ; i++)
978 buf[i] = target->thread.TS_TRANS_FPR(i); 978 buf[i] = target->thread.TS_CKFPR(i);
979 buf[32] = target->thread.transact_fp.fpscr; 979 buf[32] = target->thread.ckfp_state.fpscr;
980 return user_regset_copyout(&pos, &count, &kbuf, &ubuf, buf, 0, -1); 980 return user_regset_copyout(&pos, &count, &kbuf, &ubuf, buf, 0, -1);
981} 981}
982 982
@@ -991,7 +991,7 @@ static int tm_cfpr_get(struct task_struct *target,
991 * 991 *
992 * This function sets in transaction checkpointed FPR registers. 992 * This function sets in transaction checkpointed FPR registers.
993 * 993 *
994 * When the transaction is active 'transact_fp' holds the checkpointed 994 * When the transaction is active 'ckfp_state' holds the checkpointed
995 * FPR register values for the current transaction to fall back on 995 * FPR register values for the current transaction to fall back on
996 * if it aborts in between. This function sets these checkpointed 996 * if it aborts in between. This function sets these checkpointed
997 * FPR registers. The userspace interface buffer layout is as follows. 997 * FPR registers. The userspace interface buffer layout is as follows.
@@ -1024,8 +1024,8 @@ static int tm_cfpr_set(struct task_struct *target,
1024 if (i) 1024 if (i)
1025 return i; 1025 return i;
1026 for (i = 0; i < 32 ; i++) 1026 for (i = 0; i < 32 ; i++)
1027 target->thread.TS_TRANS_FPR(i) = buf[i]; 1027 target->thread.TS_CKFPR(i) = buf[i];
1028 target->thread.transact_fp.fpscr = buf[32]; 1028 target->thread.ckfp_state.fpscr = buf[32];
1029 return 0; 1029 return 0;
1030} 1030}
1031 1031
@@ -1060,7 +1060,7 @@ static int tm_cvmx_active(struct task_struct *target,
1060 * 1060 *
1061 * This function gets in transaction checkpointed VMX registers. 1061 * This function gets in transaction checkpointed VMX registers.
1062 * 1062 *
1063 * When the transaction is active 'transact_vr' and 'transact_vrsave' hold 1063 * When the transaction is active 'ckvr_state' and 'ckvrsave' hold
1064 * the checkpointed values for the current transaction to fall 1064 * the checkpointed values for the current transaction to fall
1065 * back on if it aborts in between. The userspace interface buffer 1065 * back on if it aborts in between. The userspace interface buffer
1066 * layout is as follows. 1066 * layout is as follows.
@@ -1092,7 +1092,7 @@ static int tm_cvmx_get(struct task_struct *target,
1092 flush_altivec_to_thread(target); 1092 flush_altivec_to_thread(target);
1093 1093
1094 ret = user_regset_copyout(&pos, &count, &kbuf, &ubuf, 1094 ret = user_regset_copyout(&pos, &count, &kbuf, &ubuf,
1095 &target->thread.transact_vr, 0, 1095 &target->thread.ckvr_state, 0,
1096 33 * sizeof(vector128)); 1096 33 * sizeof(vector128));
1097 if (!ret) { 1097 if (!ret) {
1098 /* 1098 /*
@@ -1103,7 +1103,7 @@ static int tm_cvmx_get(struct task_struct *target,
1103 u32 word; 1103 u32 word;
1104 } vrsave; 1104 } vrsave;
1105 memset(&vrsave, 0, sizeof(vrsave)); 1105 memset(&vrsave, 0, sizeof(vrsave));
1106 vrsave.word = target->thread.transact_vrsave; 1106 vrsave.word = target->thread.ckvrsave;
1107 ret = user_regset_copyout(&pos, &count, &kbuf, &ubuf, &vrsave, 1107 ret = user_regset_copyout(&pos, &count, &kbuf, &ubuf, &vrsave,
1108 33 * sizeof(vector128), -1); 1108 33 * sizeof(vector128), -1);
1109 } 1109 }
@@ -1122,7 +1122,7 @@ static int tm_cvmx_get(struct task_struct *target,
1122 * 1122 *
1123 * This function sets in transaction checkpointed VMX registers. 1123 * This function sets in transaction checkpointed VMX registers.
1124 * 1124 *
1125 * When the transaction is active 'transact_vr' and 'transact_vrsave' hold 1125 * When the transaction is active 'ckvr_state' and 'ckvrsave' hold
1126 * the checkpointed values for the current transaction to fall 1126 * the checkpointed values for the current transaction to fall
1127 * back on if it aborts in between. The userspace interface buffer 1127 * back on if it aborts in between. The userspace interface buffer
1128 * layout is as follows. 1128 * layout is as follows.
@@ -1153,7 +1153,7 @@ static int tm_cvmx_set(struct task_struct *target,
1153 flush_altivec_to_thread(target); 1153 flush_altivec_to_thread(target);
1154 1154
1155 ret = user_regset_copyin(&pos, &count, &kbuf, &ubuf, 1155 ret = user_regset_copyin(&pos, &count, &kbuf, &ubuf,
1156 &target->thread.transact_vr, 0, 1156 &target->thread.ckvr_state, 0,
1157 33 * sizeof(vector128)); 1157 33 * sizeof(vector128));
1158 if (!ret && count > 0) { 1158 if (!ret && count > 0) {
1159 /* 1159 /*
@@ -1164,11 +1164,11 @@ static int tm_cvmx_set(struct task_struct *target,
1164 u32 word; 1164 u32 word;
1165 } vrsave; 1165 } vrsave;
1166 memset(&vrsave, 0, sizeof(vrsave)); 1166 memset(&vrsave, 0, sizeof(vrsave));
1167 vrsave.word = target->thread.transact_vrsave; 1167 vrsave.word = target->thread.ckvrsave;
1168 ret = user_regset_copyin(&pos, &count, &kbuf, &ubuf, &vrsave, 1168 ret = user_regset_copyin(&pos, &count, &kbuf, &ubuf, &vrsave,
1169 33 * sizeof(vector128), -1); 1169 33 * sizeof(vector128), -1);
1170 if (!ret) 1170 if (!ret)
1171 target->thread.transact_vrsave = vrsave.word; 1171 target->thread.ckvrsave = vrsave.word;
1172 } 1172 }
1173 1173
1174 return ret; 1174 return ret;
@@ -1206,7 +1206,7 @@ static int tm_cvsx_active(struct task_struct *target,
1206 * 1206 *
1207 * This function gets in transaction checkpointed VSX registers. 1207 * This function gets in transaction checkpointed VSX registers.
1208 * 1208 *
1209 * When the transaction is active 'transact_fp' holds the checkpointed 1209 * When the transaction is active 'ckfp_state' holds the checkpointed
1210 * values for the current transaction to fall back on if it aborts 1210 * values for the current transaction to fall back on if it aborts
1211 * in between. This function gets those checkpointed VSX registers. 1211 * in between. This function gets those checkpointed VSX registers.
1212 * The userspace interface buffer layout is as follows. 1212 * The userspace interface buffer layout is as follows.
@@ -1236,7 +1236,7 @@ static int tm_cvsx_get(struct task_struct *target,
1236 flush_vsx_to_thread(target); 1236 flush_vsx_to_thread(target);
1237 1237
1238 for (i = 0; i < 32 ; i++) 1238 for (i = 0; i < 32 ; i++)
1239 buf[i] = target->thread.transact_fp.fpr[i][TS_VSRLOWOFFSET]; 1239 buf[i] = target->thread.ckfp_state.fpr[i][TS_VSRLOWOFFSET];
1240 ret = user_regset_copyout(&pos, &count, &kbuf, &ubuf, 1240 ret = user_regset_copyout(&pos, &count, &kbuf, &ubuf,
1241 buf, 0, 32 * sizeof(double)); 1241 buf, 0, 32 * sizeof(double));
1242 1242
@@ -1254,7 +1254,7 @@ static int tm_cvsx_get(struct task_struct *target,
1254 * 1254 *
1255 * This function sets in transaction checkpointed VSX registers. 1255 * This function sets in transaction checkpointed VSX registers.
1256 * 1256 *
1257 * When the transaction is active 'transact_fp' holds the checkpointed 1257 * When the transaction is active 'ckfp_state' holds the checkpointed
1258 * VSX register values for the current transaction to fall back on 1258 * VSX register values for the current transaction to fall back on
1259 * if it aborts in between. This function sets these checkpointed 1259 * if it aborts in between. This function sets these checkpointed
1260 * FPR registers. The userspace interface buffer layout is as follows. 1260 * FPR registers. The userspace interface buffer layout is as follows.
@@ -1287,7 +1287,7 @@ static int tm_cvsx_set(struct task_struct *target,
1287 buf, 0, 32 * sizeof(double)); 1287 buf, 0, 32 * sizeof(double));
1288 if (!ret) 1288 if (!ret)
1289 for (i = 0; i < 32 ; i++) 1289 for (i = 0; i < 32 ; i++)
1290 target->thread.transact_fp.fpr[i][TS_VSRLOWOFFSET] = buf[i]; 1290 target->thread.ckfp_state.fpr[i][TS_VSRLOWOFFSET] = buf[i];
1291 1291
1292 return ret; 1292 return ret;
1293} 1293}
diff --git a/arch/powerpc/kernel/signal.h b/arch/powerpc/kernel/signal.h
index 254ca074504f..7c59d88b9d86 100644
--- a/arch/powerpc/kernel/signal.h
+++ b/arch/powerpc/kernel/signal.h
@@ -23,22 +23,22 @@ extern int handle_rt_signal32(struct ksignal *ksig, sigset_t *oldset,
23 23
24extern unsigned long copy_fpr_to_user(void __user *to, 24extern unsigned long copy_fpr_to_user(void __user *to,
25 struct task_struct *task); 25 struct task_struct *task);
26extern unsigned long copy_transact_fpr_to_user(void __user *to, 26extern unsigned long copy_ckfpr_to_user(void __user *to,
27 struct task_struct *task); 27 struct task_struct *task);
28extern unsigned long copy_fpr_from_user(struct task_struct *task, 28extern unsigned long copy_fpr_from_user(struct task_struct *task,
29 void __user *from); 29 void __user *from);
30extern unsigned long copy_transact_fpr_from_user(struct task_struct *task, 30extern unsigned long copy_ckfpr_from_user(struct task_struct *task,
31 void __user *from); 31 void __user *from);
32extern unsigned long get_tm_stackpointer(struct task_struct *tsk); 32extern unsigned long get_tm_stackpointer(struct task_struct *tsk);
33 33
34#ifdef CONFIG_VSX 34#ifdef CONFIG_VSX
35extern unsigned long copy_vsx_to_user(void __user *to, 35extern unsigned long copy_vsx_to_user(void __user *to,
36 struct task_struct *task); 36 struct task_struct *task);
37extern unsigned long copy_transact_vsx_to_user(void __user *to, 37extern unsigned long copy_ckvsx_to_user(void __user *to,
38 struct task_struct *task); 38 struct task_struct *task);
39extern unsigned long copy_vsx_from_user(struct task_struct *task, 39extern unsigned long copy_vsx_from_user(struct task_struct *task,
40 void __user *from); 40 void __user *from);
41extern unsigned long copy_transact_vsx_from_user(struct task_struct *task, 41extern unsigned long copy_ckvsx_from_user(struct task_struct *task,
42 void __user *from); 42 void __user *from);
43#endif 43#endif
44 44
diff --git a/arch/powerpc/kernel/signal_32.c b/arch/powerpc/kernel/signal_32.c
index 3b9356bb4457..27aa913ac91d 100644
--- a/arch/powerpc/kernel/signal_32.c
+++ b/arch/powerpc/kernel/signal_32.c
@@ -316,7 +316,7 @@ unsigned long copy_vsx_from_user(struct task_struct *task,
316} 316}
317 317
318#ifdef CONFIG_PPC_TRANSACTIONAL_MEM 318#ifdef CONFIG_PPC_TRANSACTIONAL_MEM
319unsigned long copy_transact_fpr_to_user(void __user *to, 319unsigned long copy_ckfpr_to_user(void __user *to,
320 struct task_struct *task) 320 struct task_struct *task)
321{ 321{
322 u64 buf[ELF_NFPREG]; 322 u64 buf[ELF_NFPREG];
@@ -324,12 +324,12 @@ unsigned long copy_transact_fpr_to_user(void __user *to,
324 324
325 /* save FPR copy to local buffer then write to the thread_struct */ 325 /* save FPR copy to local buffer then write to the thread_struct */
326 for (i = 0; i < (ELF_NFPREG - 1) ; i++) 326 for (i = 0; i < (ELF_NFPREG - 1) ; i++)
327 buf[i] = task->thread.TS_TRANS_FPR(i); 327 buf[i] = task->thread.TS_CKFPR(i);
328 buf[i] = task->thread.transact_fp.fpscr; 328 buf[i] = task->thread.ckfp_state.fpscr;
329 return __copy_to_user(to, buf, ELF_NFPREG * sizeof(double)); 329 return __copy_to_user(to, buf, ELF_NFPREG * sizeof(double));
330} 330}
331 331
332unsigned long copy_transact_fpr_from_user(struct task_struct *task, 332unsigned long copy_ckfpr_from_user(struct task_struct *task,
333 void __user *from) 333 void __user *from)
334{ 334{
335 u64 buf[ELF_NFPREG]; 335 u64 buf[ELF_NFPREG];
@@ -338,13 +338,13 @@ unsigned long copy_transact_fpr_from_user(struct task_struct *task,
338 if (__copy_from_user(buf, from, ELF_NFPREG * sizeof(double))) 338 if (__copy_from_user(buf, from, ELF_NFPREG * sizeof(double)))
339 return 1; 339 return 1;
340 for (i = 0; i < (ELF_NFPREG - 1) ; i++) 340 for (i = 0; i < (ELF_NFPREG - 1) ; i++)
341 task->thread.TS_TRANS_FPR(i) = buf[i]; 341 task->thread.TS_CKFPR(i) = buf[i];
342 task->thread.transact_fp.fpscr = buf[i]; 342 task->thread.ckfp_state.fpscr = buf[i];
343 343
344 return 0; 344 return 0;
345} 345}
346 346
347unsigned long copy_transact_vsx_to_user(void __user *to, 347unsigned long copy_ckvsx_to_user(void __user *to,
348 struct task_struct *task) 348 struct task_struct *task)
349{ 349{
350 u64 buf[ELF_NVSRHALFREG]; 350 u64 buf[ELF_NVSRHALFREG];
@@ -352,11 +352,11 @@ unsigned long copy_transact_vsx_to_user(void __user *to,
352 352
353 /* save FPR copy to local buffer then write to the thread_struct */ 353 /* save FPR copy to local buffer then write to the thread_struct */
354 for (i = 0; i < ELF_NVSRHALFREG; i++) 354 for (i = 0; i < ELF_NVSRHALFREG; i++)
355 buf[i] = task->thread.transact_fp.fpr[i][TS_VSRLOWOFFSET]; 355 buf[i] = task->thread.ckfp_state.fpr[i][TS_VSRLOWOFFSET];
356 return __copy_to_user(to, buf, ELF_NVSRHALFREG * sizeof(double)); 356 return __copy_to_user(to, buf, ELF_NVSRHALFREG * sizeof(double));
357} 357}
358 358
359unsigned long copy_transact_vsx_from_user(struct task_struct *task, 359unsigned long copy_ckvsx_from_user(struct task_struct *task,
360 void __user *from) 360 void __user *from)
361{ 361{
362 u64 buf[ELF_NVSRHALFREG]; 362 u64 buf[ELF_NVSRHALFREG];
@@ -365,7 +365,7 @@ unsigned long copy_transact_vsx_from_user(struct task_struct *task,
365 if (__copy_from_user(buf, from, ELF_NVSRHALFREG * sizeof(double))) 365 if (__copy_from_user(buf, from, ELF_NVSRHALFREG * sizeof(double)))
366 return 1; 366 return 1;
367 for (i = 0; i < ELF_NVSRHALFREG ; i++) 367 for (i = 0; i < ELF_NVSRHALFREG ; i++)
368 task->thread.transact_fp.fpr[i][TS_VSRLOWOFFSET] = buf[i]; 368 task->thread.ckfp_state.fpr[i][TS_VSRLOWOFFSET] = buf[i];
369 return 0; 369 return 0;
370} 370}
371#endif /* CONFIG_PPC_TRANSACTIONAL_MEM */ 371#endif /* CONFIG_PPC_TRANSACTIONAL_MEM */
@@ -385,17 +385,17 @@ inline unsigned long copy_fpr_from_user(struct task_struct *task,
385} 385}
386 386
387#ifdef CONFIG_PPC_TRANSACTIONAL_MEM 387#ifdef CONFIG_PPC_TRANSACTIONAL_MEM
388inline unsigned long copy_transact_fpr_to_user(void __user *to, 388inline unsigned long copy_ckfpr_to_user(void __user *to,
389 struct task_struct *task) 389 struct task_struct *task)
390{ 390{
391 return __copy_to_user(to, task->thread.transact_fp.fpr, 391 return __copy_to_user(to, task->thread.ckfp_state.fpr,
392 ELF_NFPREG * sizeof(double)); 392 ELF_NFPREG * sizeof(double));
393} 393}
394 394
395inline unsigned long copy_transact_fpr_from_user(struct task_struct *task, 395inline unsigned long copy_ckfpr_from_user(struct task_struct *task,
396 void __user *from) 396 void __user *from)
397{ 397{
398 return __copy_from_user(task->thread.transact_fp.fpr, from, 398 return __copy_from_user(task->thread.ckfp_state.fpr, from,
399 ELF_NFPREG * sizeof(double)); 399 ELF_NFPREG * sizeof(double));
400} 400}
401#endif /* CONFIG_PPC_TRANSACTIONAL_MEM */ 401#endif /* CONFIG_PPC_TRANSACTIONAL_MEM */
@@ -543,7 +543,7 @@ static int save_tm_user_regs(struct pt_regs *regs,
543#ifdef CONFIG_ALTIVEC 543#ifdef CONFIG_ALTIVEC
544 /* save altivec registers */ 544 /* save altivec registers */
545 if (current->thread.used_vr) { 545 if (current->thread.used_vr) {
546 if (__copy_to_user(&frame->mc_vregs, &current->thread.transact_vr, 546 if (__copy_to_user(&frame->mc_vregs, &current->thread.ckvr_state,
547 ELF_NVRREG * sizeof(vector128))) 547 ELF_NVRREG * sizeof(vector128)))
548 return 1; 548 return 1;
549 if (msr & MSR_VEC) { 549 if (msr & MSR_VEC) {
@@ -553,7 +553,7 @@ static int save_tm_user_regs(struct pt_regs *regs,
553 return 1; 553 return 1;
554 } else { 554 } else {
555 if (__copy_to_user(&tm_frame->mc_vregs, 555 if (__copy_to_user(&tm_frame->mc_vregs,
556 &current->thread.transact_vr, 556 &current->thread.ckvr_state,
557 ELF_NVRREG * sizeof(vector128))) 557 ELF_NVRREG * sizeof(vector128)))
558 return 1; 558 return 1;
559 } 559 }
@@ -570,8 +570,8 @@ static int save_tm_user_regs(struct pt_regs *regs,
570 * most significant bits of that same vector. --BenH 570 * most significant bits of that same vector. --BenH
571 */ 571 */
572 if (cpu_has_feature(CPU_FTR_ALTIVEC)) 572 if (cpu_has_feature(CPU_FTR_ALTIVEC))
573 current->thread.transact_vrsave = mfspr(SPRN_VRSAVE); 573 current->thread.ckvrsave = mfspr(SPRN_VRSAVE);
574 if (__put_user(current->thread.transact_vrsave, 574 if (__put_user(current->thread.ckvrsave,
575 (u32 __user *)&frame->mc_vregs[32])) 575 (u32 __user *)&frame->mc_vregs[32]))
576 return 1; 576 return 1;
577 if (msr & MSR_VEC) { 577 if (msr & MSR_VEC) {
@@ -579,19 +579,19 @@ static int save_tm_user_regs(struct pt_regs *regs,
579 (u32 __user *)&tm_frame->mc_vregs[32])) 579 (u32 __user *)&tm_frame->mc_vregs[32]))
580 return 1; 580 return 1;
581 } else { 581 } else {
582 if (__put_user(current->thread.transact_vrsave, 582 if (__put_user(current->thread.ckvrsave,
583 (u32 __user *)&tm_frame->mc_vregs[32])) 583 (u32 __user *)&tm_frame->mc_vregs[32]))
584 return 1; 584 return 1;
585 } 585 }
586#endif /* CONFIG_ALTIVEC */ 586#endif /* CONFIG_ALTIVEC */
587 587
588 if (copy_transact_fpr_to_user(&frame->mc_fregs, current)) 588 if (copy_ckfpr_to_user(&frame->mc_fregs, current))
589 return 1; 589 return 1;
590 if (msr & MSR_FP) { 590 if (msr & MSR_FP) {
591 if (copy_fpr_to_user(&tm_frame->mc_fregs, current)) 591 if (copy_fpr_to_user(&tm_frame->mc_fregs, current))
592 return 1; 592 return 1;
593 } else { 593 } else {
594 if (copy_transact_fpr_to_user(&tm_frame->mc_fregs, current)) 594 if (copy_ckfpr_to_user(&tm_frame->mc_fregs, current))
595 return 1; 595 return 1;
596 } 596 }
597 597
@@ -603,14 +603,14 @@ static int save_tm_user_regs(struct pt_regs *regs,
603 * contains valid data 603 * contains valid data
604 */ 604 */
605 if (current->thread.used_vsr) { 605 if (current->thread.used_vsr) {
606 if (copy_transact_vsx_to_user(&frame->mc_vsregs, current)) 606 if (copy_ckvsx_to_user(&frame->mc_vsregs, current))
607 return 1; 607 return 1;
608 if (msr & MSR_VSX) { 608 if (msr & MSR_VSX) {
609 if (copy_vsx_to_user(&tm_frame->mc_vsregs, 609 if (copy_vsx_to_user(&tm_frame->mc_vsregs,
610 current)) 610 current))
611 return 1; 611 return 1;
612 } else { 612 } else {
613 if (copy_transact_vsx_to_user(&tm_frame->mc_vsregs, current)) 613 if (copy_ckvsx_to_user(&tm_frame->mc_vsregs, current))
614 return 1; 614 return 1;
615 } 615 }
616 616
@@ -792,7 +792,7 @@ static long restore_tm_user_regs(struct pt_regs *regs,
792 regs->msr &= ~MSR_VEC; 792 regs->msr &= ~MSR_VEC;
793 if (msr & MSR_VEC) { 793 if (msr & MSR_VEC) {
794 /* restore altivec registers from the stack */ 794 /* restore altivec registers from the stack */
795 if (__copy_from_user(&current->thread.transact_vr, &sr->mc_vregs, 795 if (__copy_from_user(&current->thread.ckvr_state, &sr->mc_vregs,
796 sizeof(sr->mc_vregs)) || 796 sizeof(sr->mc_vregs)) ||
797 __copy_from_user(&current->thread.vr_state, 797 __copy_from_user(&current->thread.vr_state,
798 &tm_sr->mc_vregs, 798 &tm_sr->mc_vregs,
@@ -802,24 +802,24 @@ static long restore_tm_user_regs(struct pt_regs *regs,
802 } else if (current->thread.used_vr) { 802 } else if (current->thread.used_vr) {
803 memset(&current->thread.vr_state, 0, 803 memset(&current->thread.vr_state, 0,
804 ELF_NVRREG * sizeof(vector128)); 804 ELF_NVRREG * sizeof(vector128));
805 memset(&current->thread.transact_vr, 0, 805 memset(&current->thread.ckvr_state, 0,
806 ELF_NVRREG * sizeof(vector128)); 806 ELF_NVRREG * sizeof(vector128));
807 } 807 }
808 808
809 /* Always get VRSAVE back */ 809 /* Always get VRSAVE back */
810 if (__get_user(current->thread.transact_vrsave, 810 if (__get_user(current->thread.ckvrsave,
811 (u32 __user *)&sr->mc_vregs[32]) || 811 (u32 __user *)&sr->mc_vregs[32]) ||
812 __get_user(current->thread.vrsave, 812 __get_user(current->thread.vrsave,
813 (u32 __user *)&tm_sr->mc_vregs[32])) 813 (u32 __user *)&tm_sr->mc_vregs[32]))
814 return 1; 814 return 1;
815 if (cpu_has_feature(CPU_FTR_ALTIVEC)) 815 if (cpu_has_feature(CPU_FTR_ALTIVEC))
816 mtspr(SPRN_VRSAVE, current->thread.transact_vrsave); 816 mtspr(SPRN_VRSAVE, current->thread.ckvrsave);
817#endif /* CONFIG_ALTIVEC */ 817#endif /* CONFIG_ALTIVEC */
818 818
819 regs->msr &= ~(MSR_FP | MSR_FE0 | MSR_FE1); 819 regs->msr &= ~(MSR_FP | MSR_FE0 | MSR_FE1);
820 820
821 if (copy_fpr_from_user(current, &sr->mc_fregs) || 821 if (copy_fpr_from_user(current, &sr->mc_fregs) ||
822 copy_transact_fpr_from_user(current, &tm_sr->mc_fregs)) 822 copy_ckfpr_from_user(current, &tm_sr->mc_fregs))
823 return 1; 823 return 1;
824 824
825#ifdef CONFIG_VSX 825#ifdef CONFIG_VSX
@@ -830,13 +830,13 @@ static long restore_tm_user_regs(struct pt_regs *regs,
830 * buffer, then write this out to the thread_struct 830 * buffer, then write this out to the thread_struct
831 */ 831 */
832 if (copy_vsx_from_user(current, &tm_sr->mc_vsregs) || 832 if (copy_vsx_from_user(current, &tm_sr->mc_vsregs) ||
833 copy_transact_vsx_from_user(current, &sr->mc_vsregs)) 833 copy_ckvsx_from_user(current, &sr->mc_vsregs))
834 return 1; 834 return 1;
835 current->thread.used_vsr = true; 835 current->thread.used_vsr = true;
836 } else if (current->thread.used_vsr) 836 } else if (current->thread.used_vsr)
837 for (i = 0; i < 32 ; i++) { 837 for (i = 0; i < 32 ; i++) {
838 current->thread.fp_state.fpr[i][TS_VSRLOWOFFSET] = 0; 838 current->thread.fp_state.fpr[i][TS_VSRLOWOFFSET] = 0;
839 current->thread.transact_fp.fpr[i][TS_VSRLOWOFFSET] = 0; 839 current->thread.ckfp_state.fpr[i][TS_VSRLOWOFFSET] = 0;
840 } 840 }
841#endif /* CONFIG_VSX */ 841#endif /* CONFIG_VSX */
842 842
diff --git a/arch/powerpc/kernel/signal_64.c b/arch/powerpc/kernel/signal_64.c
index af58af520472..96698fdf93b4 100644
--- a/arch/powerpc/kernel/signal_64.c
+++ b/arch/powerpc/kernel/signal_64.c
@@ -228,7 +228,7 @@ static long setup_tm_sigcontexts(struct sigcontext __user *sc,
228 /* save altivec registers */ 228 /* save altivec registers */
229 if (tsk->thread.used_vr) { 229 if (tsk->thread.used_vr) {
230 /* Copy 33 vec registers (vr0..31 and vscr) to the stack */ 230 /* Copy 33 vec registers (vr0..31 and vscr) to the stack */
231 err |= __copy_to_user(v_regs, &tsk->thread.transact_vr, 231 err |= __copy_to_user(v_regs, &tsk->thread.ckvr_state,
232 33 * sizeof(vector128)); 232 33 * sizeof(vector128));
233 /* If VEC was enabled there are transactional VRs valid too, 233 /* If VEC was enabled there are transactional VRs valid too,
234 * else they're a copy of the checkpointed VRs. 234 * else they're a copy of the checkpointed VRs.
@@ -239,7 +239,7 @@ static long setup_tm_sigcontexts(struct sigcontext __user *sc,
239 33 * sizeof(vector128)); 239 33 * sizeof(vector128));
240 else 240 else
241 err |= __copy_to_user(tm_v_regs, 241 err |= __copy_to_user(tm_v_regs,
242 &tsk->thread.transact_vr, 242 &tsk->thread.ckvr_state,
243 33 * sizeof(vector128)); 243 33 * sizeof(vector128));
244 244
245 /* set MSR_VEC in the MSR value in the frame to indicate 245 /* set MSR_VEC in the MSR value in the frame to indicate
@@ -251,13 +251,13 @@ static long setup_tm_sigcontexts(struct sigcontext __user *sc,
251 * use altivec. 251 * use altivec.
252 */ 252 */
253 if (cpu_has_feature(CPU_FTR_ALTIVEC)) 253 if (cpu_has_feature(CPU_FTR_ALTIVEC))
254 tsk->thread.transact_vrsave = mfspr(SPRN_VRSAVE); 254 tsk->thread.ckvrsave = mfspr(SPRN_VRSAVE);
255 err |= __put_user(tsk->thread.transact_vrsave, (u32 __user *)&v_regs[33]); 255 err |= __put_user(tsk->thread.ckvrsave, (u32 __user *)&v_regs[33]);
256 if (msr & MSR_VEC) 256 if (msr & MSR_VEC)
257 err |= __put_user(tsk->thread.vrsave, 257 err |= __put_user(tsk->thread.vrsave,
258 (u32 __user *)&tm_v_regs[33]); 258 (u32 __user *)&tm_v_regs[33]);
259 else 259 else
260 err |= __put_user(tsk->thread.transact_vrsave, 260 err |= __put_user(tsk->thread.ckvrsave,
261 (u32 __user *)&tm_v_regs[33]); 261 (u32 __user *)&tm_v_regs[33]);
262 262
263#else /* CONFIG_ALTIVEC */ 263#else /* CONFIG_ALTIVEC */
@@ -266,11 +266,11 @@ static long setup_tm_sigcontexts(struct sigcontext __user *sc,
266#endif /* CONFIG_ALTIVEC */ 266#endif /* CONFIG_ALTIVEC */
267 267
268 /* copy fpr regs and fpscr */ 268 /* copy fpr regs and fpscr */
269 err |= copy_transact_fpr_to_user(&sc->fp_regs, tsk); 269 err |= copy_ckfpr_to_user(&sc->fp_regs, tsk);
270 if (msr & MSR_FP) 270 if (msr & MSR_FP)
271 err |= copy_fpr_to_user(&tm_sc->fp_regs, tsk); 271 err |= copy_fpr_to_user(&tm_sc->fp_regs, tsk);
272 else 272 else
273 err |= copy_transact_fpr_to_user(&tm_sc->fp_regs, tsk); 273 err |= copy_ckfpr_to_user(&tm_sc->fp_regs, tsk);
274 274
275#ifdef CONFIG_VSX 275#ifdef CONFIG_VSX
276 /* 276 /*
@@ -282,12 +282,12 @@ static long setup_tm_sigcontexts(struct sigcontext __user *sc,
282 v_regs += ELF_NVRREG; 282 v_regs += ELF_NVRREG;
283 tm_v_regs += ELF_NVRREG; 283 tm_v_regs += ELF_NVRREG;
284 284
285 err |= copy_transact_vsx_to_user(v_regs, tsk); 285 err |= copy_ckvsx_to_user(v_regs, tsk);
286 286
287 if (msr & MSR_VSX) 287 if (msr & MSR_VSX)
288 err |= copy_vsx_to_user(tm_v_regs, tsk); 288 err |= copy_vsx_to_user(tm_v_regs, tsk);
289 else 289 else
290 err |= copy_transact_vsx_to_user(tm_v_regs, tsk); 290 err |= copy_ckvsx_to_user(tm_v_regs, tsk);
291 291
292 /* set MSR_VSX in the MSR value in the frame to 292 /* set MSR_VSX in the MSR value in the frame to
293 * indicate that sc->vs_reg) contains valid data. 293 * indicate that sc->vs_reg) contains valid data.
@@ -497,7 +497,7 @@ static long restore_tm_sigcontexts(struct task_struct *tsk,
497 return -EFAULT; 497 return -EFAULT;
498 /* Copy 33 vec registers (vr0..31 and vscr) from the stack */ 498 /* Copy 33 vec registers (vr0..31 and vscr) from the stack */
499 if (v_regs != NULL && tm_v_regs != NULL && (msr & MSR_VEC) != 0) { 499 if (v_regs != NULL && tm_v_regs != NULL && (msr & MSR_VEC) != 0) {
500 err |= __copy_from_user(&tsk->thread.transact_vr, v_regs, 500 err |= __copy_from_user(&tsk->thread.ckvr_state, v_regs,
501 33 * sizeof(vector128)); 501 33 * sizeof(vector128));
502 err |= __copy_from_user(&tsk->thread.vr_state, tm_v_regs, 502 err |= __copy_from_user(&tsk->thread.vr_state, tm_v_regs,
503 33 * sizeof(vector128)); 503 33 * sizeof(vector128));
@@ -505,25 +505,25 @@ static long restore_tm_sigcontexts(struct task_struct *tsk,
505 } 505 }
506 else if (tsk->thread.used_vr) { 506 else if (tsk->thread.used_vr) {
507 memset(&tsk->thread.vr_state, 0, 33 * sizeof(vector128)); 507 memset(&tsk->thread.vr_state, 0, 33 * sizeof(vector128));
508 memset(&tsk->thread.transact_vr, 0, 33 * sizeof(vector128)); 508 memset(&tsk->thread.ckvr_state, 0, 33 * sizeof(vector128));
509 } 509 }
510 /* Always get VRSAVE back */ 510 /* Always get VRSAVE back */
511 if (v_regs != NULL && tm_v_regs != NULL) { 511 if (v_regs != NULL && tm_v_regs != NULL) {
512 err |= __get_user(tsk->thread.transact_vrsave, 512 err |= __get_user(tsk->thread.ckvrsave,
513 (u32 __user *)&v_regs[33]); 513 (u32 __user *)&v_regs[33]);
514 err |= __get_user(tsk->thread.vrsave, 514 err |= __get_user(tsk->thread.vrsave,
515 (u32 __user *)&tm_v_regs[33]); 515 (u32 __user *)&tm_v_regs[33]);
516 } 516 }
517 else { 517 else {
518 tsk->thread.vrsave = 0; 518 tsk->thread.vrsave = 0;
519 tsk->thread.transact_vrsave = 0; 519 tsk->thread.ckvrsave = 0;
520 } 520 }
521 if (cpu_has_feature(CPU_FTR_ALTIVEC)) 521 if (cpu_has_feature(CPU_FTR_ALTIVEC))
522 mtspr(SPRN_VRSAVE, tsk->thread.vrsave); 522 mtspr(SPRN_VRSAVE, tsk->thread.vrsave);
523#endif /* CONFIG_ALTIVEC */ 523#endif /* CONFIG_ALTIVEC */
524 /* restore floating point */ 524 /* restore floating point */
525 err |= copy_fpr_from_user(tsk, &tm_sc->fp_regs); 525 err |= copy_fpr_from_user(tsk, &tm_sc->fp_regs);
526 err |= copy_transact_fpr_from_user(tsk, &sc->fp_regs); 526 err |= copy_ckfpr_from_user(tsk, &sc->fp_regs);
527#ifdef CONFIG_VSX 527#ifdef CONFIG_VSX
528 /* 528 /*
529 * Get additional VSX data. Update v_regs to point after the 529 * Get additional VSX data. Update v_regs to point after the
@@ -534,12 +534,12 @@ static long restore_tm_sigcontexts(struct task_struct *tsk,
534 v_regs += ELF_NVRREG; 534 v_regs += ELF_NVRREG;
535 tm_v_regs += ELF_NVRREG; 535 tm_v_regs += ELF_NVRREG;
536 err |= copy_vsx_from_user(tsk, tm_v_regs); 536 err |= copy_vsx_from_user(tsk, tm_v_regs);
537 err |= copy_transact_vsx_from_user(tsk, v_regs); 537 err |= copy_ckvsx_from_user(tsk, v_regs);
538 tsk->thread.used_vsr = true; 538 tsk->thread.used_vsr = true;
539 } else { 539 } else {
540 for (i = 0; i < 32 ; i++) { 540 for (i = 0; i < 32 ; i++) {
541 tsk->thread.fp_state.fpr[i][TS_VSRLOWOFFSET] = 0; 541 tsk->thread.fp_state.fpr[i][TS_VSRLOWOFFSET] = 0;
542 tsk->thread.transact_fp.fpr[i][TS_VSRLOWOFFSET] = 0; 542 tsk->thread.ckfp_state.fpr[i][TS_VSRLOWOFFSET] = 0;
543 } 543 }
544 } 544 }
545#endif 545#endif
diff --git a/arch/powerpc/kernel/tm.S b/arch/powerpc/kernel/tm.S
index 7b7088d8d130..3a2d04134da9 100644
--- a/arch/powerpc/kernel/tm.S
+++ b/arch/powerpc/kernel/tm.S
@@ -257,19 +257,19 @@ _GLOBAL(tm_reclaim)
257 andis. r0, r4, MSR_VEC@h 257 andis. r0, r4, MSR_VEC@h
258 beq dont_backup_vec 258 beq dont_backup_vec
259 259
260 addi r7, r3, THREAD_TRANSACT_VRSTATE 260 addi r7, r3, THREAD_CKVRSTATE
261 SAVE_32VRS(0, r6, r7) /* r6 scratch, r7 transact vr state */ 261 SAVE_32VRS(0, r6, r7) /* r6 scratch, r7 transact vr state */
262 mfvscr v0 262 mfvscr v0
263 li r6, VRSTATE_VSCR 263 li r6, VRSTATE_VSCR
264 stvx v0, r7, r6 264 stvx v0, r7, r6
265dont_backup_vec: 265dont_backup_vec:
266 mfspr r0, SPRN_VRSAVE 266 mfspr r0, SPRN_VRSAVE
267 std r0, THREAD_TRANSACT_VRSAVE(r3) 267 std r0, THREAD_CKVRSAVE(r3)
268 268
269 andi. r0, r4, MSR_FP 269 andi. r0, r4, MSR_FP
270 beq dont_backup_fp 270 beq dont_backup_fp
271 271
272 addi r7, r3, THREAD_TRANSACT_FPSTATE 272 addi r7, r3, THREAD_CKFPSTATE
273 SAVE_32FPRS_VSRS(0, R6, R7) /* r6 scratch, r7 transact fp state */ 273 SAVE_32FPRS_VSRS(0, R6, R7) /* r6 scratch, r7 transact fp state */
274 274
275 mffs fr0 275 mffs fr0
@@ -370,20 +370,20 @@ _GLOBAL(__tm_recheckpoint)
370 andis. r0, r4, MSR_VEC@h 370 andis. r0, r4, MSR_VEC@h
371 beq dont_restore_vec 371 beq dont_restore_vec
372 372
373 addi r8, r3, THREAD_TRANSACT_VRSTATE 373 addi r8, r3, THREAD_CKVRSTATE
374 li r5, VRSTATE_VSCR 374 li r5, VRSTATE_VSCR
375 lvx v0, r8, r5 375 lvx v0, r8, r5
376 mtvscr v0 376 mtvscr v0
377 REST_32VRS(0, r5, r8) /* r5 scratch, r8 ptr */ 377 REST_32VRS(0, r5, r8) /* r5 scratch, r8 ptr */
378dont_restore_vec: 378dont_restore_vec:
379 ld r5, THREAD_TRANSACT_VRSAVE(r3) 379 ld r5, THREAD_CKVRSAVE(r3)
380 mtspr SPRN_VRSAVE, r5 380 mtspr SPRN_VRSAVE, r5
381#endif 381#endif
382 382
383 andi. r0, r4, MSR_FP 383 andi. r0, r4, MSR_FP
384 beq dont_restore_fp 384 beq dont_restore_fp
385 385
386 addi r8, r3, THREAD_TRANSACT_FPSTATE 386 addi r8, r3, THREAD_CKFPSTATE
387 lfd fr0, FPSTATE_FPSCR(r8) 387 lfd fr0, FPSTATE_FPSCR(r8)
388 MTFSF_L(fr0) 388 MTFSF_L(fr0)
389 REST_32FPRS_VSRS(0, R4, R8) 389 REST_32FPRS_VSRS(0, R4, R8)
diff --git a/arch/powerpc/kernel/vector.S b/arch/powerpc/kernel/vector.S
index 616a6d854638..7dc402126b30 100644
--- a/arch/powerpc/kernel/vector.S
+++ b/arch/powerpc/kernel/vector.S
@@ -23,10 +23,10 @@ _GLOBAL(do_load_up_transact_altivec)
23 li r4,1 23 li r4,1
24 stw r4,THREAD_USED_VR(r3) 24 stw r4,THREAD_USED_VR(r3)
25 25
26 li r10,THREAD_TRANSACT_VRSTATE+VRSTATE_VSCR 26 li r10,THREAD_CKVRSTATE+VRSTATE_VSCR
27 lvx v0,r10,r3 27 lvx v0,r10,r3
28 mtvscr v0 28 mtvscr v0
29 addi r10,r3,THREAD_TRANSACT_VRSTATE 29 addi r10,r3,THREAD_CKVRSTATE
30 REST_32VRS(0,r4,r10) 30 REST_32VRS(0,r4,r10)
31 31
32 blr 32 blr