summaryrefslogtreecommitdiffstats
path: root/arch/powerpc/include/asm
diff options
context:
space:
mode:
authorCyril Bur <cyrilbur@gmail.com>2016-02-29 07:53:49 +0100
committerMichael Ellerman <mpe@ellerman.id.au>2016-03-02 13:34:49 +0100
commit8792468da5e12e77e76e1edf081acf0392abb331 (patch)
treee9fa424443bdba64726ccade9e5e169dd10c76ba /arch/powerpc/include/asm
parentpowerpc: Prepare for splitting giveup_{fpu, altivec, vsx} in two (diff)
downloadlinux-8792468da5e12e77e76e1edf081acf0392abb331.tar.xz
linux-8792468da5e12e77e76e1edf081acf0392abb331.zip
powerpc: Add the ability to save FPU without giving it up
This patch adds the ability to be able to save the FPU registers to the thread struct without giving up (disabling the facility) next time the process returns to userspace. This patch optimises the thread copy path (as a result of a fork() or clone()) so that the parent thread can return to userspace with hot registers avoiding a possibly pointless reload of FPU register 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')
-rw-r--r--arch/powerpc/include/asm/switch_to.h3
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 3690041c126a..6a201e8dc947 100644
--- a/arch/powerpc/include/asm/switch_to.h
+++ b/arch/powerpc/include/asm/switch_to.h
@@ -28,13 +28,14 @@ extern void giveup_all(struct task_struct *);
extern void enable_kernel_fp(void);
extern void flush_fp_to_thread(struct task_struct *);
extern void giveup_fpu(struct task_struct *);
-extern void __giveup_fpu(struct task_struct *);
+extern void save_fpu(struct task_struct *);
static inline void disable_kernel_fp(void)
{
msr_check_and_clear(MSR_FP);
}
#else
static inline void __giveup_fpu(struct task_struct *t) { }
+static inline void save_fpu(struct task_struct *t) { }
static inline void flush_fp_to_thread(struct task_struct *t) { }
#endif