summaryrefslogtreecommitdiff
path: root/arch/powerpc/include
diff options
context:
space:
mode:
authorCyril Bur <cyrilbur@gmail.com>2016-02-29 09:53:49 +0300
committerMichael Ellerman <mpe@ellerman.id.au>2016-03-02 15:34:49 +0300
commit8792468da5e12e77e76e1edf081acf0392abb331 (patch)
treee9fa424443bdba64726ccade9e5e169dd10c76ba /arch/powerpc/include
parentde2a20aa7237b45d3c14a2505804a8daa95a8f53 (diff)
downloadlinux-8792468da5e12e77e76e1edf081acf0392abb331.tar.xz
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')
-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