summaryrefslogtreecommitdiff
path: root/arch/powerpc/include/asm/switch_to.h
diff options
context:
space:
mode:
authorAnton Blanchard <anton@samba.org>2015-10-29 11:44:08 +1100
committerMichael Ellerman <mpe@ellerman.id.au>2015-12-02 19:34:26 +1100
commitc208505900b232ecdc81dee54cb3a032e75d88d6 (patch)
treee63fe696c5a8404bc4257204502f0d6f9ed3ccaf /arch/powerpc/include/asm/switch_to.h
parent1f2e25b2d552cade43eacb2edc4e7f01c1cfecb3 (diff)
powerpc: create giveup_all()
Create a single function that gives everything up (FP, VMX, VSX, SPE). Doing this all at once means we only do one MSR write. A context switch microbenchmark using yield(): http://ozlabs.org/~anton/junkcode/context_switch2.c ./context_switch2 --test=yield --fp --altivec --vector 0 0 shows an improvement of 3% on POWER8. Signed-off-by: Anton Blanchard <anton@samba.org> [mpe: giveup_all() needs to be EXPORT_SYMBOL'ed] 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.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/arch/powerpc/include/asm/switch_to.h b/arch/powerpc/include/asm/switch_to.h
index 9414dcb180d6..8f856788a7cf 100644
--- a/arch/powerpc/include/asm/switch_to.h
+++ b/arch/powerpc/include/asm/switch_to.h
@@ -26,6 +26,7 @@ extern void __giveup_vsx(struct task_struct *);
extern void giveup_vsx(struct task_struct *);
extern void enable_kernel_spe(void);
extern void load_up_spe(struct task_struct *);
+extern void giveup_all(struct task_struct *);
extern void switch_booke_debug_regs(struct debug_reg *new_debug);
#ifdef CONFIG_PPC_FPU