]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
s390/zcrypt: Rework zcrypt function zcrypt_device_status_mask_ext
authorHarald Freudenberger <freude@linux.ibm.com>
Thu, 24 Apr 2025 13:36:02 +0000 (15:36 +0200)
committerHeiko Carstens <hca@linux.ibm.com>
Wed, 30 Apr 2025 09:34:01 +0000 (11:34 +0200)
commita01e748101d36633f76cde5310b7fff3cfd1920d
tree67d2767dd80f7566a29548c2efabefe2f72b225a
parent366367a7253a2124ed14d9d667c46305a5c3dbbb
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>
drivers/s390/crypto/zcrypt_api.c
drivers/s390/crypto/zcrypt_api.h
drivers/s390/crypto/zcrypt_ccamisc.c
drivers/s390/crypto/zcrypt_ep11misc.c