2
0
mirror of https://github.com/edk2-porting/linux-next.git synced 2024-12-27 06:34:11 +08:00
linux-next/arch/s390/crypto
Martin Schwidefsky c7d4d259b7 s390/crypto: cleanup and move the header with the cpacf definitions
The CPACF instructions are going be used in KVM as well, move the
defines and the inline functions from arch/s390/crypt/crypt_s390.h
to arch/s390/include/asm. Rename the header to cpacf.h and replace
the crypt_s390_xxx names with cpacf_xxx.

While we are at it, cleanup the header as well. The encoding for
the CPACF operations is odd, there is an enum for each of the CPACF
instructions with the hardware function code in the lower 8 bits of
each entry and a software defined number for the CPACF instruction
in the upper 8 bits. Remove the superfluous software number and
replace the enums with simple defines.

The crypt_s390_func_available() function tests for the presence
of a specific CPACF operations. The new name of the function is
cpacf_query and it works slightly different than before. It gets
passed an opcode of an CPACF instruction and a function code for
this instruction. The facility_mask parameter is gone, the opcode
is used to find the correct MSA facility bit to check if the CPACF
instruction itself is available. If it is the query function of the
given instruction is used to test if the requested CPACF operation
is present.

Acked-by: David Hildenbrand <dahi@linux.vnet.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
2016-04-15 18:16:40 +02:00
..
aes_s390.c s390/crypto: cleanup and move the header with the cpacf definitions 2016-04-15 18:16:40 +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 crypto: s390 - add System z hardware support for GHASH 2011-05-04 15:06:32 +10: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