Loading arch/powerpc/include/asm/processor.h +4 −4 Original line number Diff line number Diff line Loading @@ -147,7 +147,7 @@ typedef struct { } mm_segment_t; #define TS_FPR(i) fp_state.fpr[i][TS_FPROFFSET] #define TS_TRANS_FPR(i) transact_fp.fpr[i][TS_FPROFFSET] #define TS_CKFPR(i) ckfp_state.fpr[i][TS_FPROFFSET] /* FP and VSX 0-31 register set */ struct thread_fp_state { Loading Loading @@ -275,9 +275,9 @@ struct thread_struct { * * These are analogous to how ckpt_regs and pt_regs work */ struct thread_fp_state transact_fp; struct thread_vr_state transact_vr; unsigned long transact_vrsave; struct thread_fp_state ckfp_state; /* Checkpointed FP state */ struct thread_vr_state ckvr_state; /* Checkpointed VR state */ unsigned long ckvrsave; /* Checkpointed VRSAVE */ #endif /* CONFIG_PPC_TRANSACTIONAL_MEM */ #ifdef CONFIG_KVM_BOOK3S_32_HANDLER void* kvm_shadow_vcpu; /* KVM internal data */ Loading arch/powerpc/kernel/asm-offsets.c +6 −6 Original line number Diff line number Diff line Loading @@ -142,12 +142,12 @@ int main(void) DEFINE(THREAD_TM_PPR, offsetof(struct thread_struct, tm_ppr)); DEFINE(THREAD_TM_DSCR, offsetof(struct thread_struct, tm_dscr)); DEFINE(PT_CKPT_REGS, offsetof(struct thread_struct, ckpt_regs)); DEFINE(THREAD_TRANSACT_VRSTATE, offsetof(struct thread_struct, transact_vr)); DEFINE(THREAD_TRANSACT_VRSAVE, offsetof(struct thread_struct, transact_vrsave)); DEFINE(THREAD_TRANSACT_FPSTATE, offsetof(struct thread_struct, transact_fp)); DEFINE(THREAD_CKVRSTATE, offsetof(struct thread_struct, ckvr_state)); DEFINE(THREAD_CKVRSAVE, offsetof(struct thread_struct, ckvrsave)); DEFINE(THREAD_CKFPSTATE, offsetof(struct thread_struct, ckfp_state)); /* Local pt_regs on stack for Transactional Memory funcs. */ DEFINE(TM_FRAME_SIZE, STACK_FRAME_OVERHEAD + sizeof(struct pt_regs) + 16); Loading arch/powerpc/kernel/fpu.S +1 −1 Original line number Diff line number Diff line Loading @@ -68,7 +68,7 @@ END_FTR_SECTION_IFSET(CPU_FTR_VSX) SYNC MTMSRD(r5) addi r7,r3,THREAD_TRANSACT_FPSTATE addi r7,r3,THREAD_CKFPSTATE lfd fr0,FPSTATE_FPSCR(r7) MTFSF_L(fr0) REST_32FPVSRS(0, R4, R7) Loading arch/powerpc/kernel/process.c +2 −2 Original line number Diff line number Diff line Loading @@ -851,8 +851,8 @@ static inline void tm_reclaim_task(struct task_struct *tsk) * * In switching we need to maintain a 2nd register state as * oldtask->thread.ckpt_regs. We tm_reclaim(oldproc); this saves the * checkpointed (tbegin) state in ckpt_regs and saves the transactional * (current) FPRs into oldtask->thread.transact_fpr[]. * checkpointed (tbegin) state in ckpt_regs, ckfp_state and * ckvr_state * * We also context switch (save) TFHAR/TEXASR/TFIAR in here. */ Loading arch/powerpc/kernel/ptrace.c +23 −23 Original line number Diff line number Diff line Loading @@ -404,7 +404,7 @@ static int gpr_set(struct task_struct *target, const struct user_regset *regset, /* * Regardless of transactions, 'fp_state' holds the current running * value of all FPR registers and 'transact_fp' holds the last checkpointed * value of all FPR registers and 'ckfp_state' holds the last checkpointed * value of all FPR registers for the current transaction. * * Userspace interface buffer layout: Loading Loading @@ -442,7 +442,7 @@ static int fpr_get(struct task_struct *target, const struct user_regset *regset, /* * Regardless of transactions, 'fp_state' holds the current running * value of all FPR registers and 'transact_fp' holds the last checkpointed * value of all FPR registers and 'ckfp_state' holds the last checkpointed * value of all FPR registers for the current transaction. * * Userspace interface buffer layout: Loading Loading @@ -506,7 +506,7 @@ static int vr_active(struct task_struct *target, /* * Regardless of transactions, 'vr_state' holds the current running * value of all the VMX registers and 'transact_vr' holds the last * value of all the VMX registers and 'ckvr_state' holds the last * checkpointed value of all the VMX registers for the current * transaction to fall back on in case it aborts. * Loading Loading @@ -553,7 +553,7 @@ static int vr_get(struct task_struct *target, const struct user_regset *regset, /* * Regardless of transactions, 'vr_state' holds the current running * value of all the VMX registers and 'transact_vr' holds the last * value of all the VMX registers and 'ckvr_state' holds the last * checkpointed value of all the VMX registers for the current * transaction to fall back on in case it aborts. * Loading Loading @@ -617,7 +617,7 @@ static int vsr_active(struct task_struct *target, /* * Regardless of transactions, 'fp_state' holds the current running * value of all FPR registers and 'transact_fp' holds the last * value of all FPR registers and 'ckfp_state' holds the last * checkpointed value of all FPR registers for the current * transaction. * Loading Loading @@ -650,7 +650,7 @@ static int vsr_get(struct task_struct *target, const struct user_regset *regset, /* * Regardless of transactions, 'fp_state' holds the current running * value of all FPR registers and 'transact_fp' holds the last * value of all FPR registers and 'ckfp_state' holds the last * checkpointed value of all FPR registers for the current * transaction. * Loading Loading @@ -945,7 +945,7 @@ static int tm_cfpr_active(struct task_struct *target, * * This function gets in transaction checkpointed FPR registers. * * When the transaction is active 'transact_fp' holds the checkpointed * When the transaction is active 'ckfp_state' holds the checkpointed * values for the current transaction to fall back on if it aborts * in between. This function gets those checkpointed FPR registers. * The userspace interface buffer layout is as follows. Loading Loading @@ -975,8 +975,8 @@ static int tm_cfpr_get(struct task_struct *target, /* copy to local buffer then write that out */ for (i = 0; i < 32 ; i++) buf[i] = target->thread.TS_TRANS_FPR(i); buf[32] = target->thread.transact_fp.fpscr; buf[i] = target->thread.TS_CKFPR(i); buf[32] = target->thread.ckfp_state.fpscr; return user_regset_copyout(&pos, &count, &kbuf, &ubuf, buf, 0, -1); } Loading @@ -991,7 +991,7 @@ static int tm_cfpr_get(struct task_struct *target, * * This function sets in transaction checkpointed FPR registers. * * When the transaction is active 'transact_fp' holds the checkpointed * When the transaction is active 'ckfp_state' holds the checkpointed * FPR register values for the current transaction to fall back on * if it aborts in between. This function sets these checkpointed * FPR registers. The userspace interface buffer layout is as follows. Loading Loading @@ -1024,8 +1024,8 @@ static int tm_cfpr_set(struct task_struct *target, if (i) return i; for (i = 0; i < 32 ; i++) target->thread.TS_TRANS_FPR(i) = buf[i]; target->thread.transact_fp.fpscr = buf[32]; target->thread.TS_CKFPR(i) = buf[i]; target->thread.ckfp_state.fpscr = buf[32]; return 0; } Loading Loading @@ -1060,7 +1060,7 @@ static int tm_cvmx_active(struct task_struct *target, * * This function gets in transaction checkpointed VMX registers. * * When the transaction is active 'transact_vr' and 'transact_vrsave' hold * When the transaction is active 'ckvr_state' and 'ckvrsave' hold * the checkpointed values for the current transaction to fall * back on if it aborts in between. The userspace interface buffer * layout is as follows. Loading Loading @@ -1092,7 +1092,7 @@ static int tm_cvmx_get(struct task_struct *target, flush_altivec_to_thread(target); ret = user_regset_copyout(&pos, &count, &kbuf, &ubuf, &target->thread.transact_vr, 0, &target->thread.ckvr_state, 0, 33 * sizeof(vector128)); if (!ret) { /* Loading @@ -1103,7 +1103,7 @@ static int tm_cvmx_get(struct task_struct *target, u32 word; } vrsave; memset(&vrsave, 0, sizeof(vrsave)); vrsave.word = target->thread.transact_vrsave; vrsave.word = target->thread.ckvrsave; ret = user_regset_copyout(&pos, &count, &kbuf, &ubuf, &vrsave, 33 * sizeof(vector128), -1); } Loading @@ -1122,7 +1122,7 @@ static int tm_cvmx_get(struct task_struct *target, * * This function sets in transaction checkpointed VMX registers. * * When the transaction is active 'transact_vr' and 'transact_vrsave' hold * When the transaction is active 'ckvr_state' and 'ckvrsave' hold * the checkpointed values for the current transaction to fall * back on if it aborts in between. The userspace interface buffer * layout is as follows. Loading Loading @@ -1153,7 +1153,7 @@ static int tm_cvmx_set(struct task_struct *target, flush_altivec_to_thread(target); ret = user_regset_copyin(&pos, &count, &kbuf, &ubuf, &target->thread.transact_vr, 0, &target->thread.ckvr_state, 0, 33 * sizeof(vector128)); if (!ret && count > 0) { /* Loading @@ -1164,11 +1164,11 @@ static int tm_cvmx_set(struct task_struct *target, u32 word; } vrsave; memset(&vrsave, 0, sizeof(vrsave)); vrsave.word = target->thread.transact_vrsave; vrsave.word = target->thread.ckvrsave; ret = user_regset_copyin(&pos, &count, &kbuf, &ubuf, &vrsave, 33 * sizeof(vector128), -1); if (!ret) target->thread.transact_vrsave = vrsave.word; target->thread.ckvrsave = vrsave.word; } return ret; Loading Loading @@ -1206,7 +1206,7 @@ static int tm_cvsx_active(struct task_struct *target, * * This function gets in transaction checkpointed VSX registers. * * When the transaction is active 'transact_fp' holds the checkpointed * When the transaction is active 'ckfp_state' holds the checkpointed * values for the current transaction to fall back on if it aborts * in between. This function gets those checkpointed VSX registers. * The userspace interface buffer layout is as follows. Loading Loading @@ -1236,7 +1236,7 @@ static int tm_cvsx_get(struct task_struct *target, flush_vsx_to_thread(target); for (i = 0; i < 32 ; i++) buf[i] = target->thread.transact_fp.fpr[i][TS_VSRLOWOFFSET]; buf[i] = target->thread.ckfp_state.fpr[i][TS_VSRLOWOFFSET]; ret = user_regset_copyout(&pos, &count, &kbuf, &ubuf, buf, 0, 32 * sizeof(double)); Loading @@ -1254,7 +1254,7 @@ static int tm_cvsx_get(struct task_struct *target, * * This function sets in transaction checkpointed VSX registers. * * When the transaction is active 'transact_fp' holds the checkpointed * When the transaction is active 'ckfp_state' holds the checkpointed * VSX register values for the current transaction to fall back on * if it aborts in between. This function sets these checkpointed * FPR registers. The userspace interface buffer layout is as follows. Loading Loading @@ -1287,7 +1287,7 @@ static int tm_cvsx_set(struct task_struct *target, buf, 0, 32 * sizeof(double)); if (!ret) for (i = 0; i < 32 ; i++) target->thread.transact_fp.fpr[i][TS_VSRLOWOFFSET] = buf[i]; target->thread.ckfp_state.fpr[i][TS_VSRLOWOFFSET] = buf[i]; return ret; } Loading Loading
arch/powerpc/include/asm/processor.h +4 −4 Original line number Diff line number Diff line Loading @@ -147,7 +147,7 @@ typedef struct { } mm_segment_t; #define TS_FPR(i) fp_state.fpr[i][TS_FPROFFSET] #define TS_TRANS_FPR(i) transact_fp.fpr[i][TS_FPROFFSET] #define TS_CKFPR(i) ckfp_state.fpr[i][TS_FPROFFSET] /* FP and VSX 0-31 register set */ struct thread_fp_state { Loading Loading @@ -275,9 +275,9 @@ struct thread_struct { * * These are analogous to how ckpt_regs and pt_regs work */ struct thread_fp_state transact_fp; struct thread_vr_state transact_vr; unsigned long transact_vrsave; struct thread_fp_state ckfp_state; /* Checkpointed FP state */ struct thread_vr_state ckvr_state; /* Checkpointed VR state */ unsigned long ckvrsave; /* Checkpointed VRSAVE */ #endif /* CONFIG_PPC_TRANSACTIONAL_MEM */ #ifdef CONFIG_KVM_BOOK3S_32_HANDLER void* kvm_shadow_vcpu; /* KVM internal data */ Loading
arch/powerpc/kernel/asm-offsets.c +6 −6 Original line number Diff line number Diff line Loading @@ -142,12 +142,12 @@ int main(void) DEFINE(THREAD_TM_PPR, offsetof(struct thread_struct, tm_ppr)); DEFINE(THREAD_TM_DSCR, offsetof(struct thread_struct, tm_dscr)); DEFINE(PT_CKPT_REGS, offsetof(struct thread_struct, ckpt_regs)); DEFINE(THREAD_TRANSACT_VRSTATE, offsetof(struct thread_struct, transact_vr)); DEFINE(THREAD_TRANSACT_VRSAVE, offsetof(struct thread_struct, transact_vrsave)); DEFINE(THREAD_TRANSACT_FPSTATE, offsetof(struct thread_struct, transact_fp)); DEFINE(THREAD_CKVRSTATE, offsetof(struct thread_struct, ckvr_state)); DEFINE(THREAD_CKVRSAVE, offsetof(struct thread_struct, ckvrsave)); DEFINE(THREAD_CKFPSTATE, offsetof(struct thread_struct, ckfp_state)); /* Local pt_regs on stack for Transactional Memory funcs. */ DEFINE(TM_FRAME_SIZE, STACK_FRAME_OVERHEAD + sizeof(struct pt_regs) + 16); Loading
arch/powerpc/kernel/fpu.S +1 −1 Original line number Diff line number Diff line Loading @@ -68,7 +68,7 @@ END_FTR_SECTION_IFSET(CPU_FTR_VSX) SYNC MTMSRD(r5) addi r7,r3,THREAD_TRANSACT_FPSTATE addi r7,r3,THREAD_CKFPSTATE lfd fr0,FPSTATE_FPSCR(r7) MTFSF_L(fr0) REST_32FPVSRS(0, R4, R7) Loading
arch/powerpc/kernel/process.c +2 −2 Original line number Diff line number Diff line Loading @@ -851,8 +851,8 @@ static inline void tm_reclaim_task(struct task_struct *tsk) * * In switching we need to maintain a 2nd register state as * oldtask->thread.ckpt_regs. We tm_reclaim(oldproc); this saves the * checkpointed (tbegin) state in ckpt_regs and saves the transactional * (current) FPRs into oldtask->thread.transact_fpr[]. * checkpointed (tbegin) state in ckpt_regs, ckfp_state and * ckvr_state * * We also context switch (save) TFHAR/TEXASR/TFIAR in here. */ Loading
arch/powerpc/kernel/ptrace.c +23 −23 Original line number Diff line number Diff line Loading @@ -404,7 +404,7 @@ static int gpr_set(struct task_struct *target, const struct user_regset *regset, /* * Regardless of transactions, 'fp_state' holds the current running * value of all FPR registers and 'transact_fp' holds the last checkpointed * value of all FPR registers and 'ckfp_state' holds the last checkpointed * value of all FPR registers for the current transaction. * * Userspace interface buffer layout: Loading Loading @@ -442,7 +442,7 @@ static int fpr_get(struct task_struct *target, const struct user_regset *regset, /* * Regardless of transactions, 'fp_state' holds the current running * value of all FPR registers and 'transact_fp' holds the last checkpointed * value of all FPR registers and 'ckfp_state' holds the last checkpointed * value of all FPR registers for the current transaction. * * Userspace interface buffer layout: Loading Loading @@ -506,7 +506,7 @@ static int vr_active(struct task_struct *target, /* * Regardless of transactions, 'vr_state' holds the current running * value of all the VMX registers and 'transact_vr' holds the last * value of all the VMX registers and 'ckvr_state' holds the last * checkpointed value of all the VMX registers for the current * transaction to fall back on in case it aborts. * Loading Loading @@ -553,7 +553,7 @@ static int vr_get(struct task_struct *target, const struct user_regset *regset, /* * Regardless of transactions, 'vr_state' holds the current running * value of all the VMX registers and 'transact_vr' holds the last * value of all the VMX registers and 'ckvr_state' holds the last * checkpointed value of all the VMX registers for the current * transaction to fall back on in case it aborts. * Loading Loading @@ -617,7 +617,7 @@ static int vsr_active(struct task_struct *target, /* * Regardless of transactions, 'fp_state' holds the current running * value of all FPR registers and 'transact_fp' holds the last * value of all FPR registers and 'ckfp_state' holds the last * checkpointed value of all FPR registers for the current * transaction. * Loading Loading @@ -650,7 +650,7 @@ static int vsr_get(struct task_struct *target, const struct user_regset *regset, /* * Regardless of transactions, 'fp_state' holds the current running * value of all FPR registers and 'transact_fp' holds the last * value of all FPR registers and 'ckfp_state' holds the last * checkpointed value of all FPR registers for the current * transaction. * Loading Loading @@ -945,7 +945,7 @@ static int tm_cfpr_active(struct task_struct *target, * * This function gets in transaction checkpointed FPR registers. * * When the transaction is active 'transact_fp' holds the checkpointed * When the transaction is active 'ckfp_state' holds the checkpointed * values for the current transaction to fall back on if it aborts * in between. This function gets those checkpointed FPR registers. * The userspace interface buffer layout is as follows. Loading Loading @@ -975,8 +975,8 @@ static int tm_cfpr_get(struct task_struct *target, /* copy to local buffer then write that out */ for (i = 0; i < 32 ; i++) buf[i] = target->thread.TS_TRANS_FPR(i); buf[32] = target->thread.transact_fp.fpscr; buf[i] = target->thread.TS_CKFPR(i); buf[32] = target->thread.ckfp_state.fpscr; return user_regset_copyout(&pos, &count, &kbuf, &ubuf, buf, 0, -1); } Loading @@ -991,7 +991,7 @@ static int tm_cfpr_get(struct task_struct *target, * * This function sets in transaction checkpointed FPR registers. * * When the transaction is active 'transact_fp' holds the checkpointed * When the transaction is active 'ckfp_state' holds the checkpointed * FPR register values for the current transaction to fall back on * if it aborts in between. This function sets these checkpointed * FPR registers. The userspace interface buffer layout is as follows. Loading Loading @@ -1024,8 +1024,8 @@ static int tm_cfpr_set(struct task_struct *target, if (i) return i; for (i = 0; i < 32 ; i++) target->thread.TS_TRANS_FPR(i) = buf[i]; target->thread.transact_fp.fpscr = buf[32]; target->thread.TS_CKFPR(i) = buf[i]; target->thread.ckfp_state.fpscr = buf[32]; return 0; } Loading Loading @@ -1060,7 +1060,7 @@ static int tm_cvmx_active(struct task_struct *target, * * This function gets in transaction checkpointed VMX registers. * * When the transaction is active 'transact_vr' and 'transact_vrsave' hold * When the transaction is active 'ckvr_state' and 'ckvrsave' hold * the checkpointed values for the current transaction to fall * back on if it aborts in between. The userspace interface buffer * layout is as follows. Loading Loading @@ -1092,7 +1092,7 @@ static int tm_cvmx_get(struct task_struct *target, flush_altivec_to_thread(target); ret = user_regset_copyout(&pos, &count, &kbuf, &ubuf, &target->thread.transact_vr, 0, &target->thread.ckvr_state, 0, 33 * sizeof(vector128)); if (!ret) { /* Loading @@ -1103,7 +1103,7 @@ static int tm_cvmx_get(struct task_struct *target, u32 word; } vrsave; memset(&vrsave, 0, sizeof(vrsave)); vrsave.word = target->thread.transact_vrsave; vrsave.word = target->thread.ckvrsave; ret = user_regset_copyout(&pos, &count, &kbuf, &ubuf, &vrsave, 33 * sizeof(vector128), -1); } Loading @@ -1122,7 +1122,7 @@ static int tm_cvmx_get(struct task_struct *target, * * This function sets in transaction checkpointed VMX registers. * * When the transaction is active 'transact_vr' and 'transact_vrsave' hold * When the transaction is active 'ckvr_state' and 'ckvrsave' hold * the checkpointed values for the current transaction to fall * back on if it aborts in between. The userspace interface buffer * layout is as follows. Loading Loading @@ -1153,7 +1153,7 @@ static int tm_cvmx_set(struct task_struct *target, flush_altivec_to_thread(target); ret = user_regset_copyin(&pos, &count, &kbuf, &ubuf, &target->thread.transact_vr, 0, &target->thread.ckvr_state, 0, 33 * sizeof(vector128)); if (!ret && count > 0) { /* Loading @@ -1164,11 +1164,11 @@ static int tm_cvmx_set(struct task_struct *target, u32 word; } vrsave; memset(&vrsave, 0, sizeof(vrsave)); vrsave.word = target->thread.transact_vrsave; vrsave.word = target->thread.ckvrsave; ret = user_regset_copyin(&pos, &count, &kbuf, &ubuf, &vrsave, 33 * sizeof(vector128), -1); if (!ret) target->thread.transact_vrsave = vrsave.word; target->thread.ckvrsave = vrsave.word; } return ret; Loading Loading @@ -1206,7 +1206,7 @@ static int tm_cvsx_active(struct task_struct *target, * * This function gets in transaction checkpointed VSX registers. * * When the transaction is active 'transact_fp' holds the checkpointed * When the transaction is active 'ckfp_state' holds the checkpointed * values for the current transaction to fall back on if it aborts * in between. This function gets those checkpointed VSX registers. * The userspace interface buffer layout is as follows. Loading Loading @@ -1236,7 +1236,7 @@ static int tm_cvsx_get(struct task_struct *target, flush_vsx_to_thread(target); for (i = 0; i < 32 ; i++) buf[i] = target->thread.transact_fp.fpr[i][TS_VSRLOWOFFSET]; buf[i] = target->thread.ckfp_state.fpr[i][TS_VSRLOWOFFSET]; ret = user_regset_copyout(&pos, &count, &kbuf, &ubuf, buf, 0, 32 * sizeof(double)); Loading @@ -1254,7 +1254,7 @@ static int tm_cvsx_get(struct task_struct *target, * * This function sets in transaction checkpointed VSX registers. * * When the transaction is active 'transact_fp' holds the checkpointed * When the transaction is active 'ckfp_state' holds the checkpointed * VSX register values for the current transaction to fall back on * if it aborts in between. This function sets these checkpointed * FPR registers. The userspace interface buffer layout is as follows. Loading Loading @@ -1287,7 +1287,7 @@ static int tm_cvsx_set(struct task_struct *target, buf, 0, 32 * sizeof(double)); if (!ret) for (i = 0; i < 32 ; i++) target->thread.transact_fp.fpr[i][TS_VSRLOWOFFSET] = buf[i]; target->thread.ckfp_state.fpr[i][TS_VSRLOWOFFSET] = buf[i]; return ret; } Loading