linux/arch/s390/crypto
Martin Schwidefsky 7f79695cc1 s390/fpu: improve kernel_fpu_[begin|end]
In case of nested user of the FPU or vector registers in the kernel
the current code uses the mask of the FPU/vector registers of the
previous contexts to decide which registers to save and restore.
E.g. if the previous context used KERNEL_VXR_V0V7 and the next
context wants to use KERNEL_VXR_V24V31 the first 8 vector registers
are stored to the FPU state structure. But this is not necessary
as the next context does not use these registers.

Rework the FPU/vector register save and restore code. The new code
does a few things differently:
1) A lowcore field is used instead of a per-cpu variable.
2) The kernel_fpu_end function now has two parameters just like
   kernel_fpu_begin. The register flags are required by both
   functions to save / restore the minimal register set.
3) The inline functions kernel_fpu_begin/kernel_fpu_end now do the
   update of the register masks. If the user space FPU registers
   have already been stored neither save_fpu_regs nor the
   __kernel_fpu_begin/__kernel_fpu_end functions have to be called
   for the first context. In this case kernel_fpu_begin adds 7
   instructions and kernel_fpu_end adds 4 instructions.
3) The inline assemblies in __kernel_fpu_begin / __kernel_fpu_end
   to save / restore the vector registers are simplified a bit.

Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
2016-08-29 11:05:01 +02:00
..
aes_s390.c crypto: s390/aes - Use skcipher for fallback 2016-07-01 23:45:10 +08:00
crc32-vx.c s390/fpu: improve kernel_fpu_[begin|end] 2016-08-29 11:05:01 +02:00
crc32be-vx.S s390/crc32-vx: use vector instructions to optimize CRC-32 computation 2016-06-14 16:54:16 +02:00
crc32le-vx.S s390/crc32-vx: use vector instructions to optimize CRC-32 computation 2016-06-14 16:54:16 +02:00
des_s390.c s390/crypto: cleanup and move the header with the cpacf definitions 2016-04-15 18:16:40 +02:00
ghash_s390.c s390/crypto: cleanup and move the header with the cpacf definitions 2016-04-15 18:16:40 +02:00
Makefile s390/crc32-vx: add crypto API module for optimized CRC-32 algorithms 2016-06-15 16:36:34 +02:00
prng.c s390/crypto: cleanup and move the header with the cpacf definitions 2016-04-15 18:16:40 +02:00
sha1_s390.c s390/crypto: cleanup and move the header with the cpacf definitions 2016-04-15 18:16:40 +02:00
sha256_s390.c s390/crypto: cleanup and move the header with the cpacf definitions 2016-04-15 18:16:40 +02:00
sha512_s390.c s390/crypto: cleanup and move the header with the cpacf definitions 2016-04-15 18:16:40 +02:00
sha_common.c s390/crypto: cleanup and move the header with the cpacf definitions 2016-04-15 18:16:40 +02:00
sha.h crypto: s390/sha - replace raw value by their coresponding define 2015-10-15 21:05:11 +08:00