Skip to content

Commit 9eb61e7

Browse files
hfreudehcahca
authored andcommitted
s390/zcrypt: Propagate xflags argument with cca_get_info()
Propagate the xflags argument from the cca_get_info() caller down to the lower level functions for proper memory allocation hints. 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-17-freude@linux.ibm.com Signed-off-by: Heiko Carstens <hca@linux.ibm.com>
1 parent 989ed61 commit 9eb61e7

3 files changed

Lines changed: 6 additions & 6 deletions

File tree

drivers/s390/crypto/zcrypt_ccamisc.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1635,14 +1635,13 @@ EXPORT_SYMBOL(cca_query_crypto_facility);
16351635
* Fetch cca_info values about a CCA queue via
16361636
* query_crypto_facility from adapter.
16371637
*/
1638-
int cca_get_info(u16 cardnr, u16 domain, struct cca_info *ci)
1638+
int cca_get_info(u16 cardnr, u16 domain, struct cca_info *ci, u32 xflags)
16391639
{
16401640
void *mem;
16411641
int rc, found = 0;
16421642
size_t rlen, vlen;
16431643
u8 *rarray, *varray;
16441644
struct zcrypt_device_status_ext devstat;
1645-
u32 xflags = 0;
16461645

16471646
memset(ci, 0, sizeof(*ci));
16481647

@@ -1721,6 +1720,7 @@ int cca_findcard2(u32 *apqns, u32 *nr_apqns, u16 cardnr, u16 domain,
17211720
int i, card, dom, curmatch, oldmatch;
17221721
struct cca_info ci;
17231722
u32 _nr_apqns = 0;
1723+
u32 xflags = 0;
17241724

17251725
/* occupy the device status memory */
17261726
mutex_lock(&dev_status_mem_mutex);
@@ -1749,7 +1749,7 @@ int cca_findcard2(u32 *apqns, u32 *nr_apqns, u16 cardnr, u16 domain,
17491749
if (domain != 0xFFFF && dom != domain)
17501750
continue;
17511751
/* get cca info on this apqn */
1752-
if (cca_get_info(card, dom, &ci))
1752+
if (cca_get_info(card, dom, &ci, xflags))
17531753
continue;
17541754
/* current master key needs to be valid */
17551755
if (mktype == AES_MK_SET && ci.cur_aes_mk_state != '2')

drivers/s390/crypto/zcrypt_ccamisc.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -255,7 +255,7 @@ struct cca_info {
255255
/*
256256
* Fetch cca information about an CCA queue.
257257
*/
258-
int cca_get_info(u16 card, u16 dom, struct cca_info *ci);
258+
int cca_get_info(u16 card, u16 dom, struct cca_info *ci, u32 xflags);
259259

260260
int zcrypt_ccamisc_init(void);
261261
void zcrypt_ccamisc_exit(void);

drivers/s390/crypto/zcrypt_cex4.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ static ssize_t cca_serialnr_show(struct device *dev,
8585
memset(&ci, 0, sizeof(ci));
8686

8787
if (ap_domain_index >= 0)
88-
cca_get_info(ac->id, ap_domain_index, &ci);
88+
cca_get_info(ac->id, ap_domain_index, &ci, 0);
8989

9090
return sysfs_emit(buf, "%s\n", ci.serial);
9191
}
@@ -119,7 +119,7 @@ static ssize_t cca_mkvps_show(struct device *dev,
119119

120120
cca_get_info(AP_QID_CARD(zq->queue->qid),
121121
AP_QID_QUEUE(zq->queue->qid),
122-
&ci);
122+
&ci, 0);
123123

124124
if (ci.new_aes_mk_state >= '1' && ci.new_aes_mk_state <= '3')
125125
n += sysfs_emit_at(buf, n, "AES NEW: %s 0x%016llx\n",

0 commit comments

Comments
 (0)