summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorChenghai Huang <huangchenghai2@huawei.com>2025-12-18 16:44:43 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2026-02-27 01:59:02 +0300
commit139e24de706eddc3e59888183a3cd601576c1621 (patch)
tree3e8e46d6b9e04d86ac83a27cf923a4fb28145fd8 /include
parent1f269645bb4c8d9b0911b75fc6972f8b61d6b75e (diff)
downloadlinux-139e24de706eddc3e59888183a3cd601576c1621.tar.xz
crypto: hisilicon/sec - move backlog management to qp and store sqe in qp for callback
[ Upstream commit 08eb67d23e5172a5d1e60f1f0acccee569fe10ba ] When multiple tfm use a same qp, the backlog data should be managed centrally by the qp, rather than in the qp_ctx of each req. Additionally, since SEC_BD_TYPE1 and SEC_BD_TYPE2 cannot use the tag of the sqe to carry the virtual address of the req, the sent sqe is stored in the qp. This allows the callback function to get the req address. To handle the differences between hardware types, the callback functions are split into two separate implementations. Fixes: f0ae287c5045 ("crypto: hisilicon/sec2 - implement full backlog mode for sec") Signed-off-by: Chenghai Huang <huangchenghai2@huawei.com> Signed-off-by: Weili Qian <qianweili@huawei.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au> Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'include')
-rw-r--r--include/linux/hisi_acc_qm.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/include/linux/hisi_acc_qm.h b/include/linux/hisi_acc_qm.h
index c4690e365ade..2d0cc61ed886 100644
--- a/include/linux/hisi_acc_qm.h
+++ b/include/linux/hisi_acc_qm.h
@@ -444,6 +444,11 @@ struct hisi_qp_ops {
int (*fill_sqe)(void *sqe, void *q_parm, void *d_parm);
};
+struct instance_backlog {
+ struct list_head list;
+ spinlock_t lock;
+};
+
struct hisi_qp {
u32 qp_id;
u16 sq_depth;
@@ -468,6 +473,9 @@ struct hisi_qp {
bool is_in_kernel;
u16 pasid;
struct uacce_queue *uacce_q;
+
+ struct instance_backlog backlog;
+ const void **msg;
};
static inline int vfs_num_set(const char *val, const struct kernel_param *kp)