powerpc: Prepare for splitting giveup_{fpu, altivec, vsx} in two

This prepares for the decoupling of saving {fpu,altivec,vsx} registers and
marking {fpu,altivec,vsx} as being unused by a thread.

Currently giveup_{fpu,altivec,vsx}() does both however optimisations to
task switching can be made if these two operations are decoupled.
save_all() will permit the saving of registers to thread structs and leave
threads MSR with bits enabled.

This patch introduces no functional change.

Signed-off-by: Cyril Bur <cyrilbur@gmail.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
This commit is contained in:
Cyril Bur
2016-02-29 17:53:48 +11:00
committed by Michael Ellerman
parent 70fe3d980f
commit de2a20aa72
3 changed files with 45 additions and 1 deletions

View File

@@ -75,6 +75,14 @@
#define MSR_HV 0
#endif
/*
* To be used in shared book E/book S, this avoids needing to worry about
* book S/book E in shared code
*/
#ifndef MSR_SPE
#define MSR_SPE 0
#endif
#define MSR_VEC __MASK(MSR_VEC_LG) /* Enable AltiVec */
#define MSR_VSX __MASK(MSR_VSX_LG) /* Enable VSX */
#define MSR_POW __MASK(MSR_POW_LG) /* Enable Power Management */