summaryrefslogtreecommitdiffstats
path: root/include/linux/hisi_acc_qm.h
diff options
context:
space:
mode:
authorWeili Qian <qianweili@huawei.com>2022-06-09 20:31:19 +0800
committerHerbert Xu <herbert@gondor.apana.org.au>2022-06-17 17:19:20 +0800
commitd64de9773c18409d2161228242968ff3ebe3707e (patch)
tree9f43334086c3843bdc67bc3bdb7e90058b8ad1bc /include/linux/hisi_acc_qm.h
parent3099fc9c2b3aaace80947d07d13b40da2dd79fd4 (diff)
downloadlinux-d64de9773c18409d2161228242968ff3ebe3707e.tar.gz
linux-d64de9773c18409d2161228242968ff3ebe3707e.tar.bz2
linux-d64de9773c18409d2161228242968ff3ebe3707e.zip
crypto: hisilicon/qm - modify event irq processing
When the driver receives an event interrupt, the driver will enable the event interrupt after handling all completed tasks on the function, tasks on the function are parsed through only one thread. If the task's user callback takes time, other tasks on the function will be blocked. Therefore, the event irq processing is modified as follows: 1. Obtain the ID of the queue that completes the task. 2. Enable event interrupt. 3. Parse the completed tasks in the queue and call the user callback. Enabling event interrupt in advance can quickly report pending event interrupts and process tasks in multiple threads. Signed-off-by: Weili Qian <qianweili@huawei.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'include/linux/hisi_acc_qm.h')
-rw-r--r--include/linux/hisi_acc_qm.h8
1 files changed, 7 insertions, 1 deletions
diff --git a/include/linux/hisi_acc_qm.h b/include/linux/hisi_acc_qm.h
index 6cabafffd0dd..116e8bd68c99 100644
--- a/include/linux/hisi_acc_qm.h
+++ b/include/linux/hisi_acc_qm.h
@@ -265,6 +265,12 @@ struct hisi_qm_list {
void (*unregister_from_crypto)(struct hisi_qm *qm);
};
+struct hisi_qm_poll_data {
+ struct hisi_qm *qm;
+ struct work_struct work;
+ u16 *qp_finish_id;
+};
+
struct hisi_qm {
enum qm_hw_ver ver;
enum qm_fun_type fun_type;
@@ -302,6 +308,7 @@ struct hisi_qm {
struct rw_semaphore qps_lock;
struct idr qp_idr;
struct hisi_qp *qp_array;
+ struct hisi_qm_poll_data *poll_data;
struct mutex mailbox_lock;
@@ -312,7 +319,6 @@ struct hisi_qm {
u32 error_mask;
struct workqueue_struct *wq;
- struct work_struct work;
struct work_struct rst_work;
struct work_struct cmd_process;