aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/kernel/vector.S
diff options
context:
space:
mode:
authorCyril Bur <cyrilbur@gmail.com>2016-02-29 01:53:51 -0500
committerMichael Ellerman <mpe@ellerman.id.au>2016-03-02 07:34:50 -0500
commitbf6a4d5b75d1ea87897fe68d0e45d35a2996c678 (patch)
tree8e967bdd1fe1dcd8bda0b38baa212c945c40cab1 /arch/powerpc/kernel/vector.S
parent6f515d842e8e1b205e54f44b9013bf14870b97a7 (diff)
powerpc: Add the ability to save VSX without giving it up
This patch adds the ability to be able to save the VSX registers to the thread struct without giving up (disabling the facility) next time the process returns to userspace. This patch builds on a previous optimisation for the FPU and VEC registers in the thread copy path to avoid a possibly pointless reload of VSX state. Signed-off-by: Cyril Bur <cyrilbur@gmail.com> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Diffstat (limited to 'arch/powerpc/kernel/vector.S')
-rw-r--r--arch/powerpc/kernel/vector.S17
1 files changed, 0 insertions, 17 deletions
diff --git a/arch/powerpc/kernel/vector.S b/arch/powerpc/kernel/vector.S
index 51b0c175ea8c..1c2e7a343bf5 100644
--- a/arch/powerpc/kernel/vector.S
+++ b/arch/powerpc/kernel/vector.S
@@ -151,23 +151,6 @@ _GLOBAL(load_up_vsx)
151 std r12,_MSR(r1) 151 std r12,_MSR(r1)
152 b fast_exception_return 152 b fast_exception_return
153 153
154/*
155 * __giveup_vsx(tsk)
156 * Disable VSX for the task given as the argument.
157 * Does NOT save vsx registers.
158 */
159_GLOBAL(__giveup_vsx)
160 addi r3,r3,THREAD /* want THREAD of task */
161 ld r5,PT_REGS(r3)
162 cmpdi 0,r5,0
163 beq 1f
164 ld r4,_MSR-STACK_FRAME_OVERHEAD(r5)
165 lis r3,MSR_VSX@h
166 andc r4,r4,r3 /* disable VSX for previous task */
167 std r4,_MSR-STACK_FRAME_OVERHEAD(r5)
1681:
169 blr
170
171#endif /* CONFIG_VSX */ 154#endif /* CONFIG_VSX */
172 155
173 156