diff options
| author | Harald Freudenberger <freude@linux.ibm.com> | 2025-04-24 15:36:02 +0200 |
|---|---|---|
| committer | Heiko Carstens <hca@linux.ibm.com> | 2025-04-30 11:34:01 +0200 |
| commit | a01e748101d36633f76cde5310b7fff3cfd1920d (patch) | |
| tree | 67d2767dd80f7566a29548c2efabefe2f72b225a /drivers/s390/crypto/zcrypt_api.h | |
| parent | 366367a7253a2124ed14d9d667c46305a5c3dbbb (diff) | |
s390/zcrypt: Rework zcrypt function zcrypt_device_status_mask_ext
Rework the existing function zcrypt_device_status_mask_ext():
Add two new parameters to provide upper limits for
cards and queues. The existing implementation needed an
array of 256 * 256 * 4 = 256 KB which is really huge. The
reworked function is more flexible in the sense that the
caller can decide the upper limit for cards and domains to
be stored into the status array. So for example a caller may
decide to only query for cards 0...127 and queues 0...127
and thus only an array of size 128 * 128 * 4 = 64 KB is needed.
Signed-off-by: Harald Freudenberger <freude@linux.ibm.com>
Reviewed-by: Holger Dengler <dengler@linux.ibm.com>
Link: https://lore.kernel.org/r/20250424133619.16495-9-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 | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/s390/crypto/zcrypt_api.h b/drivers/s390/crypto/zcrypt_api.h index 14ed3e4e8e56..6ef8850a42df 100644 --- a/drivers/s390/crypto/zcrypt_api.h +++ b/drivers/s390/crypto/zcrypt_api.h @@ -172,7 +172,8 @@ int zcrypt_api_init(void); void zcrypt_api_exit(void); long zcrypt_send_cprb(struct ica_xcRB *xcRB, u32 xflags); long zcrypt_send_ep11_cprb(struct ep11_urb *urb, u32 xflags); -void zcrypt_device_status_mask_ext(struct zcrypt_device_status_ext *devstatus); +void zcrypt_device_status_mask_ext(struct zcrypt_device_status_ext *devstatus, + int maxcard, int maxqueue); int zcrypt_device_status_ext(int card, int queue, struct zcrypt_device_status_ext *devstatus); |