Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Harald Freudenberger and committed by
Heiko Carstens
9eb61e71 989ed61e

+6 -6
+3 -3
drivers/s390/crypto/zcrypt_ccamisc.c
··· 1635 1635 * Fetch cca_info values about a CCA queue via 1636 1636 * query_crypto_facility from adapter. 1637 1637 */ 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) 1639 1639 { 1640 1640 void *mem; 1641 1641 int rc, found = 0; 1642 1642 size_t rlen, vlen; 1643 1643 u8 *rarray, *varray; 1644 1644 struct zcrypt_device_status_ext devstat; 1645 - u32 xflags = 0; 1646 1645 1647 1646 memset(ci, 0, sizeof(*ci)); 1648 1647 ··· 1720 1721 int i, card, dom, curmatch, oldmatch; 1721 1722 struct cca_info ci; 1722 1723 u32 _nr_apqns = 0; 1724 + u32 xflags = 0; 1723 1725 1724 1726 /* occupy the device status memory */ 1725 1727 mutex_lock(&dev_status_mem_mutex); ··· 1749 1749 if (domain != 0xFFFF && dom != domain) 1750 1750 continue; 1751 1751 /* get cca info on this apqn */ 1752 - if (cca_get_info(card, dom, &ci)) 1752 + if (cca_get_info(card, dom, &ci, xflags)) 1753 1753 continue; 1754 1754 /* current master key needs to be valid */ 1755 1755 if (mktype == AES_MK_SET && ci.cur_aes_mk_state != '2')
+1 -1
drivers/s390/crypto/zcrypt_ccamisc.h
··· 255 255 /* 256 256 * Fetch cca information about an CCA queue. 257 257 */ 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); 259 259 260 260 int zcrypt_ccamisc_init(void); 261 261 void zcrypt_ccamisc_exit(void);
+2 -2
drivers/s390/crypto/zcrypt_cex4.c
··· 85 85 memset(&ci, 0, sizeof(ci)); 86 86 87 87 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); 89 89 90 90 return sysfs_emit(buf, "%s\n", ci.serial); 91 91 } ··· 119 119 120 120 cca_get_info(AP_QID_CARD(zq->queue->qid), 121 121 AP_QID_QUEUE(zq->queue->qid), 122 - &ci); 122 + &ci, 0); 123 123 124 124 if (ci.new_aes_mk_state >= '1' && ci.new_aes_mk_state <= '3') 125 125 n += sysfs_emit_at(buf, n, "AES NEW: %s 0x%016llx\n",