powerpc: create giveup_all()
authorAnton Blanchard <anton@samba.org>
Thu, 29 Oct 2015 00:44:08 +0000 (11:44 +1100)
committerMichael Ellerman <mpe@ellerman.id.au>
Wed, 2 Dec 2015 08:34:26 +0000 (19:34 +1100)
commitc208505900b232ecdc81dee54cb3a032e75d88d6
treee63fe696c5a8404bc4257204502f0d6f9ed3ccaf
parent1f2e25b2d552cade43eacb2edc4e7f01c1cfecb3
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>
arch/powerpc/include/asm/switch_to.h
arch/powerpc/kernel/process.c
arch/powerpc/kvm/book3s_pr.c