summaryrefslogtreecommitdiff
path: root/include/linux/hisi_acc_qm.h
diff options
context:
space:
mode:
authorKai Ye <yekai13@huawei.com>2022-11-19 10:48:17 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2023-01-20 14:06:26 +0300
commitcd0ac51c5760d4eed4981be5de9cad0255976512 (patch)
tree323c486bd15ded60bdf24257c1a4a4ad1d5c4d5d /include/linux/hisi_acc_qm.h
parentf65ccb82f5987630f6f4439357a8cf4be8c3840f (diff)
downloadlinux-cd0ac51c5760d4eed4981be5de9cad0255976512.tar.xz
crypto: hisilicon/qm - define the device isolation strategy
Define the device isolation strategy by the device driver. The user configures a hardware error threshold value by uacce interface. If the number of hardware errors exceeds the value of setting error threshold in one hour. The device will not be available in user space. The VF device use the PF device isolation strategy. All the hardware errors are processed by PF driver. Signed-off-by: Kai Ye <yekai13@huawei.com> Acked-by: Herbert Xu <herbert@gondor.apana.org.au> Link: https://lore.kernel.org/r/20221119074817.12063-4-yekai13@huawei.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'include/linux/hisi_acc_qm.h')
-rw-r--r--include/linux/hisi_acc_qm.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/include/linux/hisi_acc_qm.h b/include/linux/hisi_acc_qm.h
index be3aedaa96dc..d08bff0f87f9 100644
--- a/include/linux/hisi_acc_qm.h
+++ b/include/linux/hisi_acc_qm.h
@@ -272,6 +272,20 @@ struct hisi_qm_poll_data {
u16 *qp_finish_id;
};
+/**
+ * struct qm_err_isolate
+ * @isolate_lock: protects device error log
+ * @err_threshold: user config error threshold which triggers isolation
+ * @is_isolate: device isolation state
+ * @uacce_hw_errs: index into qm device error list
+ */
+struct qm_err_isolate {
+ struct mutex isolate_lock;
+ u32 err_threshold;
+ bool is_isolate;
+ struct list_head qm_hw_errs;
+};
+
struct hisi_qm {
enum qm_hw_ver ver;
enum qm_fun_type fun_type;
@@ -341,6 +355,7 @@ struct hisi_qm {
struct qm_shaper_factor *factor;
u32 mb_qos;
u32 type_rate;
+ struct qm_err_isolate isolate_data;
};
struct hisi_qp_status {