diff options
author | Cyril Bur <cyrilbur@gmail.com> | 2016-02-29 17:53:50 +1100 |
---|---|---|
committer | Michael Ellerman <mpe@ellerman.id.au> | 2016-03-02 23:34:49 +1100 |
commit | 6f515d842e8e1b205e54f44b9013bf14870b97a7 (patch) | |
tree | 34f133da5b1cd6922f2728645db025bcc81b4183 /arch/powerpc/include/asm/switch_to.h | |
parent | 8792468da5e12e77e76e1edf081acf0392abb331 (diff) | |
download | linux-6f515d842e8e1b205e54f44b9013bf14870b97a7.tar.bz2 |
powerpc: Add the ability to save Altivec without giving it up
This patch adds the ability to be able to save the VEC registers to the
thread struct without giving up (disabling the facility) next time the
process returns to userspace.
This patch builds on a previous optimisation for the FPU registers in the
thread copy path to avoid a possibly pointless reload of VEC state.
Signed-off-by: Cyril Bur <cyrilbur@gmail.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Diffstat (limited to 'arch/powerpc/include/asm/switch_to.h')
-rw-r--r-- | arch/powerpc/include/asm/switch_to.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/arch/powerpc/include/asm/switch_to.h b/arch/powerpc/include/asm/switch_to.h index 6a201e8dc947..9028822bb73f 100644 --- a/arch/powerpc/include/asm/switch_to.h +++ b/arch/powerpc/include/asm/switch_to.h @@ -43,12 +43,13 @@ static inline void flush_fp_to_thread(struct task_struct *t) { } extern void enable_kernel_altivec(void); extern void flush_altivec_to_thread(struct task_struct *); extern void giveup_altivec(struct task_struct *); -extern void __giveup_altivec(struct task_struct *); +extern void save_altivec(struct task_struct *); static inline void disable_kernel_altivec(void) { msr_check_and_clear(MSR_VEC); } #else +static inline void save_altivec(struct task_struct *t) { } static inline void __giveup_altivec(struct task_struct *t) { } #endif |