s390/crypto: simplify return code handling
authorMartin Schwidefsky <schwidefsky@de.ibm.com>
Mon, 15 Aug 2016 08:41:52 +0000 (10:41 +0200)
committerMartin Schwidefsky <schwidefsky@de.ibm.com>
Mon, 29 Aug 2016 09:05:07 +0000 (11:05 +0200)
commit0177db01adf26cf9c5dfe1feaf17087de4b9e40e
treea6f228b175f6094db94e80fdc4e1a37a75d2998d
parentedc63a3785b48455e05793e848f0174e21f38d09
s390/crypto: simplify return code handling

The CPACF instructions can complete with three different condition codes:
CC=0 for successful completion, CC=1 if the protected key verification
failed, and CC=3 for partial completion.

The inline functions will restart the CPACF instruction for partial
completion, this removes the CC=3 case. The CC=1 case is only relevant
for the protected key functions of the KM, KMC, KMAC and KMCTR
instructions. As the protected key functions are not used by the
current code, there is no need for any kind of return code handling.

Reviewed-by: Harald Freudenberger <freude@linux.vnet.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
arch/s390/crypto/aes_s390.c
arch/s390/crypto/des_s390.c
arch/s390/crypto/ghash_s390.c
arch/s390/crypto/prng.c
arch/s390/crypto/sha_common.c
arch/s390/include/asm/cpacf.h