From: Zhangfei Gao <zhangfei.gao@linaro.org>
To: Kai Ye <yekai13@huawei.com>,
gregkh@linuxfoundation.org, herbert@gondor.apana.org.au
Cc: linuxarm@huawei.com, linux-kernel@vger.kernel.org,
wangzhou1@hisilicon.com, linux-crypto@vger.kernel.org,
linux-accelerators@lists.ozlabs.org
Subject: Re: [PATCH v2 3/3] crypto: hisilicon/qm - defining the device isolation strategy
Date: Tue, 14 Jun 2022 22:12:07 +0800 [thread overview]
Message-ID: <82ce379f-73f4-0e57-ec32-e1ab1d3ef04d@linaro.org> (raw)
In-Reply-To: <20220614122943.1406-4-yekai13@huawei.com>
On 2022/6/14 下午8:29, Kai Ye via Linux-accelerators wrote:
> Define the device isolation strategy by the device driver. if the
> AER error frequency exceeds the value of setting for a certain
> period of time, 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>
> ---
> drivers/crypto/hisilicon/qm.c | 157 +++++++++++++++++++++++++++++++---
> include/linux/hisi_acc_qm.h | 9 ++
> 2 files changed, 152 insertions(+), 14 deletions(-)
>
> diff --git a/drivers/crypto/hisilicon/qm.c b/drivers/crypto/hisilicon/qm.c
> index ad83c194d664..47c41fa52693 100644
> --- a/drivers/crypto/hisilicon/qm.c
> +++ b/drivers/crypto/hisilicon/qm.c
> @@ -12,7 +12,6 @@
> #include <linux/pm_runtime.h>
> #include <linux/seq_file.h>
> #include <linux/slab.h>
> -#include <linux/uacce.h>
> #include <linux/uaccess.h>
> #include <uapi/misc/uacce/hisi_qm.h>
> #include <linux/hisi_acc_qm.h>
> @@ -417,6 +416,16 @@ struct hisi_qm_resource {
> struct list_head list;
> };
>
> +/**
> + * struct qm_hw_err - structure of describes the device err
> + * @list: hardware error list
> + * @tick_stamp: timestamp when the error occurred
> + */
> +struct qm_hw_err {
> + struct list_head list;
> + unsigned long long tick_stamp;
> +};
> +
> struct hisi_qm_hw_ops {
> int (*get_vft)(struct hisi_qm *qm, u32 *base, u32 *number);
> void (*qm_db)(struct hisi_qm *qm, u16 qn,
> @@ -3278,6 +3287,7 @@ static int hisi_qm_uacce_get_queue(struct uacce_device *uacce,
> qp->event_cb = qm_qp_event_notifier;
> qp->pasid = arg;
> qp->is_in_kernel = false;
> + atomic_inc(&qm->uacce_ref);
>
> return 0;
> }
> @@ -3285,7 +3295,9 @@ static int hisi_qm_uacce_get_queue(struct uacce_device *uacce,
> static void hisi_qm_uacce_put_queue(struct uacce_queue *q)
> {
> struct hisi_qp *qp = q->priv;
> + struct hisi_qm *qm = qp->qm;
>
> + atomic_dec(&qm->uacce_ref);
Can we use qm state or qp state instead?
enum qm_state {
QM_INIT = 0,
QM_START,
QM_CLOSE,
QM_STOP,
};
enum qp_state {
QP_INIT = 1,
QP_START,
QP_STOP,
QP_CLOSE,
};
Thanks
next prev parent reply other threads:[~2022-06-14 14:12 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-06-14 12:29 [PATCH v2 0/3] crypto: hisilicon - supports device isolation feature Kai Ye
2022-06-14 12:29 ` [PATCH v2 1/3] uacce: " Kai Ye
2022-06-14 12:42 ` Greg KH
2022-06-15 8:52 ` Jonathan Cameron
2022-06-15 9:06 ` yekai(A)
2022-06-14 12:29 ` [PATCH v2 2/3] Documentation: add a isolation strategy vfs node for uacce Kai Ye
2022-06-14 12:41 ` Greg KH
2022-06-15 8:48 ` Jonathan Cameron
2022-06-15 9:18 ` yekai(A)
2022-06-14 12:29 ` [PATCH v2 3/3] crypto: hisilicon/qm - defining the device isolation strategy Kai Ye
2022-06-14 12:43 ` Greg KH
2022-06-14 13:24 ` yekai(A)
2022-06-14 13:29 ` Greg KH
2022-06-15 9:10 ` yekai(A)
2022-06-14 14:12 ` Zhangfei Gao [this message]
2022-06-15 13:02 ` Jonathan Cameron
2022-06-16 1:33 ` yekai(A)
2022-06-16 13:45 ` Jonathan Cameron
2022-06-17 2:07 ` yekai(A)
2022-06-14 12:29 ` [PATCH 1/3] uacce: supports device isolation feature Kai Ye
2022-06-14 14:14 ` Zhangfei Gao
2022-06-15 1:07 ` yekai(A)
2022-06-14 12:29 ` [PATCH 2/3] Documentation: add a isolation strategy vfs node for uacce Kai Ye
2022-06-14 12:29 ` [PATCH 3/3] crypto: hisilicon/qm - defining the device isolation strategy Kai Ye
-- strict thread matches above, loose matches on Subject: below --
2022-06-14 12:23 [PATCH v2 0/3] crypto: hisilicon - supports device isolation feature Kai Ye
2022-06-14 12:23 ` [PATCH v2 3/3] crypto: hisilicon/qm - defining the device isolation strategy Kai Ye
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=82ce379f-73f4-0e57-ec32-e1ab1d3ef04d@linaro.org \
--to=zhangfei.gao@linaro.org \
--cc=gregkh@linuxfoundation.org \
--cc=herbert@gondor.apana.org.au \
--cc=linux-accelerators@lists.ozlabs.org \
--cc=linux-crypto@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linuxarm@huawei.com \
--cc=wangzhou1@hisilicon.com \
--cc=yekai13@huawei.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome