aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/s390/crypto/zcrypt_api.h
diff options
context:
space:
mode:
authorHarald Freudenberger <freude@linux.ibm.com>2020-09-26 22:51:38 +0200
committerVasily Gorbik <gor@linux.ibm.com>2020-10-07 21:50:01 +0200
commit3730f5300b450bc89306c3ab79c254e6039d9197 (patch)
treebd9cb1f73e726c263cefb2fb857c8fbecc9c1376 /drivers/s390/crypto/zcrypt_api.h
parents390/ap/zcrypt: revisit ap and zcrypt error handling (diff)
downloadlinux-dev-3730f5300b450bc89306c3ab79c254e6039d9197.tar.xz
linux-dev-3730f5300b450bc89306c3ab79c254e6039d9197.zip
s390/zcrypt: move ap_msg param one level up the call chain
Move the creating and disposal of the struct ap_message one level up the call chain. The ap message was constructed in the calling functions in msgtype50 and msgtype6 but only for the ica rsa messages. For CCA and EP11 CPRBs the ap message struct is created in the zcrypt api functions. This patch moves the construction of the ap message struct into the functions zcrypt_rsa_modexpo and zcrypt_rsa_crt. So now all the 4 zcrypt api functions zcrypt_rsa_modexpo, zcrypt_rsa_crt, zcrypt_send_cprb and zcrypt_send_ep11_cprb appear and act similar. There are no functional changes coming with this patch. However, the availability of the ap_message struct has advantages which will be needed by a follow up patch. Signed-off-by: Harald Freudenberger <freude@linux.ibm.com> Signed-off-by: Vasily Gorbik <gor@linux.ibm.com>
Diffstat (limited to 'drivers/s390/crypto/zcrypt_api.h')
-rw-r--r--drivers/s390/crypto/zcrypt_api.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/s390/crypto/zcrypt_api.h b/drivers/s390/crypto/zcrypt_api.h
index 263ed1735431..03804f03b5d0 100644
--- a/drivers/s390/crypto/zcrypt_api.h
+++ b/drivers/s390/crypto/zcrypt_api.h
@@ -68,9 +68,11 @@ struct zcrypt_track {
#define TRACK_AGAIN_QUEUE_WEIGHT_PENALTY 10000
struct zcrypt_ops {
- long (*rsa_modexpo)(struct zcrypt_queue *, struct ica_rsa_modexpo *);
+ long (*rsa_modexpo)(struct zcrypt_queue *, struct ica_rsa_modexpo *,
+ struct ap_message *);
long (*rsa_modexpo_crt)(struct zcrypt_queue *,
- struct ica_rsa_modexpo_crt *);
+ struct ica_rsa_modexpo_crt *,
+ struct ap_message *);
long (*send_cprb)(bool userspace, struct zcrypt_queue *, struct ica_xcRB *,
struct ap_message *);
long (*send_ep11_cprb)(bool userspace, struct zcrypt_queue *, struct ep11_urb *,