From: "yekai(A)" <yekai13@huawei.com>
To: Zhangfei Gao <zhangfei.gao@linaro.org>,
<gregkh@linuxfoundation.org>, <herbert@gondor.apana.org.au>
Cc: <linux-crypto@vger.kernel.org>,
<linux-accelerators@lists.ozlabs.org>,
<linux-kernel@vger.kernel.org>, <linuxarm@huawei.com>,
<wangzhou1@hisilicon.com>
Subject: Re: [PATCH 1/3] uacce: supports device isolation feature
Date: Wed, 15 Jun 2022 09:07:57 +0800 [thread overview]
Message-ID: <3422d14f-abf2-68d6-0923-1b62ec2abb17@huawei.com> (raw)
In-Reply-To: <452a54f0-27ce-6c0d-da56-883b0204f57c@linaro.org>
On 2022/6/14 22:14, Zhangfei Gao wrote:
>
>
> On 2022/6/14 下午8:29, Kai Ye wrote:
>> UACCE add the hardware error isolation API. Users can configure
>> the error frequency threshold by this vfs node. This API interface
>> certainly supports the configuration of user protocol strategy. Then
>> parse it inside the device driver. UACCE only reports the device
>> isolate state. When the error frequency is exceeded, the device
>> will be isolated. The isolation strategy should be defined in each
>> driver module.
>>
>> Signed-off-by: Kai Ye <yekai13@huawei.com>
>> Reviewed-by: Zhou Wang <wangzhou1@hisilicon.com>
>> ---
>> drivers/misc/uacce/uacce.c | 51 ++++++++++++++++++++++++++++++++++++++
>> include/linux/uacce.h | 15 ++++++++++-
>> 2 files changed, 65 insertions(+), 1 deletion(-)
>>
>> diff --git a/drivers/misc/uacce/uacce.c b/drivers/misc/uacce/uacce.c
>> index b6219c6bfb48..4d9d9aeb145a 100644
>> --- a/drivers/misc/uacce/uacce.c
>> +++ b/drivers/misc/uacce/uacce.c
>> @@ -12,6 +12,20 @@ static dev_t uacce_devt;
>> static DEFINE_MUTEX(uacce_mutex);
>> static DEFINE_XARRAY_ALLOC(uacce_xa);
>> +static int cdev_get(struct device *dev, void *data)
>> +{
>> + struct uacce_device *uacce;
>> + struct device **t_dev = data;
>> +
>> + uacce = container_of(dev, struct uacce_device, dev);
>> + if (uacce->parent == *t_dev) {
>> + *t_dev = dev;
>> + return 1;
>> + }
>> +
>> + return 0;
>> +}
>> +
>> static int uacce_start_queue(struct uacce_queue *q)
>> {
>> int ret = 0;
>> @@ -346,12 +360,47 @@ static ssize_t region_dus_size_show(struct
>> device *dev,
>> uacce->qf_pg_num[UACCE_QFRT_DUS] << PAGE_SHIFT);
>> }
>> +static ssize_t isolate_show(struct device *dev,
>> + struct device_attribute *attr, char *buf)
>> +{
>> + struct uacce_device *uacce = to_uacce_device(dev);
>> +
>> + return sysfs_emit(buf, "%d\n",
>> uacce->ops->get_isolate_state(uacce));
> Are these two isolate ops required or optional?
> Do we need consider NULL pointer?
>
> Thanks
> .
>
Yes, need to consider NULL pointer.
Thanks
kai
next prev parent reply other threads:[~2022-06-15 1:08 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 - " 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
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) [this message]
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 1/3] uacce: " 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=3422d14f-abf2-68d6-0923-1b62ec2abb17@huawei.com \
--to=yekai13@huawei.com \
--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=zhangfei.gao@linaro.org \
/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
all inboxes | Powered by JetHome®