diff options
author | Harald Freudenberger <freude@linux.ibm.com> | 2020-09-01 12:48:14 +0200 |
---|---|---|
committer | Heiko Carstens <hca@linux.ibm.com> | 2020-11-09 11:21:00 +0100 |
commit | 43cb5a7c61186cde6eba344c43489b9cf95c68f8 (patch) | |
tree | 8ef2cdb0bf51f4075b720e3dacd553dfff6f18fe /drivers/s390/crypto/zcrypt_api.h | |
parent | s390/ap: ap bus userspace notifications for some bus conditions (diff) | |
download | linux-dev-43cb5a7c61186cde6eba344c43489b9cf95c68f8.tar.xz linux-dev-43cb5a7c61186cde6eba344c43489b9cf95c68f8.zip |
s390/zcrypt/pkey: introduce zcrypt_wait_api_operational() function
The zcrypt api provides a new function to wait until the zcrypt
api is operational:
int zcrypt_wait_api_operational(void);
The AP bus scan and the binding of ap devices to device drivers is
an asynchronous job. This function waits until these initial jobs
are done and so the zcrypt api should be ready to serve crypto
requests - if there are resources available. The function uses an
internal timeout of 60s. The very first caller will either wait for
ap bus bindings complete or the timeout happens. This state will be
remembered for further callers which will only be blocked until a
decision is made (timeout or bindings complete).
Reviewed-by: Ingo Franzki <ifranzki@linux.ibm.com>
Signed-off-by: Harald Freudenberger <freude@linux.ibm.com>
Signed-off-by: Heiko Carstens <hca@linux.ibm.com>
Diffstat (limited to 'drivers/s390/crypto/zcrypt_api.h')
-rw-r--r-- | drivers/s390/crypto/zcrypt_api.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/s390/crypto/zcrypt_api.h b/drivers/s390/crypto/zcrypt_api.h index 51c0b8bdef50..16219efb2f61 100644 --- a/drivers/s390/crypto/zcrypt_api.h +++ b/drivers/s390/crypto/zcrypt_api.h @@ -162,6 +162,8 @@ void zcrypt_device_status_mask_ext(struct zcrypt_device_status_ext *devstatus); int zcrypt_device_status_ext(int card, int queue, struct zcrypt_device_status_ext *devstatus); +int zcrypt_wait_api_operational(void); + static inline unsigned long z_copy_from_user(bool userspace, void *to, const void __user *from, |