powerpc: Create disable_kernel_{fp,altivec,vsx,spe}()
authorAnton Blanchard <anton@samba.org>
Thu, 29 Oct 2015 00:44:05 +0000 (11:44 +1100)
committerMichael Ellerman <mpe@ellerman.id.au>
Tue, 1 Dec 2015 02:52:25 +0000 (13:52 +1100)
commitdc4fbba11e4661a6a77a1f89ba32f9082e6395ff
tree567037dc8e93063615e558eda1c80f8a82154749
parenta0e72cf12b1a1f159b6822ed2e1e41893d996fc7
powerpc: Create disable_kernel_{fp,altivec,vsx,spe}()

The enable_kernel_*() functions leave the relevant MSR bits enabled
until we exit the kernel sometime later. Create disable versions
that wrap the kernel use of FP, Altivec VSX or SPE.

While we don't want to disable it normally for performance reasons
(MSR writes are slow), it will be used for a debug boot option that
does this and catches bad uses in other areas of the kernel.

Signed-off-by: Anton Blanchard <anton@samba.org>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
15 files changed:
arch/powerpc/crypto/aes-spe-glue.c
arch/powerpc/crypto/sha1-spe-glue.c
arch/powerpc/crypto/sha256-spe-glue.c
arch/powerpc/include/asm/switch_to.h
arch/powerpc/kernel/align.c
arch/powerpc/kvm/book3s_paired_singles.c
arch/powerpc/kvm/book3s_pr.c
arch/powerpc/kvm/booke.c
arch/powerpc/lib/vmx-helper.c
arch/powerpc/lib/xor_vmx.c
drivers/crypto/vmx/aes.c
drivers/crypto/vmx/aes_cbc.c
drivers/crypto/vmx/aes_ctr.c
drivers/crypto/vmx/ghash.c
lib/raid6/altivec.uc