diff options
author | Anton Blanchard <anton@samba.org> | 2015-10-29 11:44:07 +1100 |
---|---|---|
committer | Michael Ellerman <mpe@ellerman.id.au> | 2015-12-01 13:52:26 +1100 |
commit | 1f2e25b2d552cade43eacb2edc4e7f01c1cfecb3 (patch) | |
tree | c5176a84fe7cfbab1c964015a210b627cf0d879e /arch/powerpc/kernel/process.c | |
parent | 3eb5d5888dc68c9b187998ca4249b8b9fa481eeb (diff) | |
download | op-kernel-dev-1f2e25b2d552cade43eacb2edc4e7f01c1cfecb3.zip op-kernel-dev-1f2e25b2d552cade43eacb2edc4e7f01c1cfecb3.tar.gz |
powerpc: Remove fp_enable() and vec_enable(), use msr_check_and_{set, clear}()
More consolidation of our MSR available bit handling.
Signed-off-by: Anton Blanchard <anton@samba.org>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Diffstat (limited to 'arch/powerpc/kernel/process.c')
-rw-r--r-- | arch/powerpc/kernel/process.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/arch/powerpc/kernel/process.c b/arch/powerpc/kernel/process.c index 1eafcee..9f8444b 100644 --- a/arch/powerpc/kernel/process.c +++ b/arch/powerpc/kernel/process.c @@ -732,13 +732,15 @@ void restore_tm_state(struct pt_regs *regs) msr_diff = current->thread.ckpt_regs.msr & ~regs->msr; msr_diff &= MSR_FP | MSR_VEC | MSR_VSX; if (msr_diff & MSR_FP) { - fp_enable(); + msr_check_and_set(MSR_FP); load_fp_state(¤t->thread.fp_state); + msr_check_and_clear(MSR_FP); regs->msr |= current->thread.fpexc_mode; } if (msr_diff & MSR_VEC) { - vec_enable(); + msr_check_and_set(MSR_VEC); load_vr_state(¤t->thread.vr_state); + msr_check_and_clear(MSR_VEC); } regs->msr |= msr_diff; } |