linux-crypto.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: zhangfei <zhangfei.gao@linaro.org>
To: "Raj, Ashok" <ashok.raj@linux.intel.com>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Arnd Bergmann <arnd@arndb.de>,
	Herbert Xu <herbert@gondor.apana.org.au>,
	jonathan.cameron@huawei.com, dave.jiang@intel.com,
	grant.likely@arm.com, jean-philippe <jean-philippe@linaro.org>,
	Jerome Glisse <jglisse@redhat.com>,
	ilias.apalodimas@linaro.org, francois.ozog@linaro.org,
	kenneth-lee-2012@foxmail.com, Wangzhou <wangzhou1@hisilicon.com>,
	"haojian . zhuang" <haojian.zhuang@linaro.org>,
	guodong.xu@linaro.org, linux-accelerators@lists.ozlabs.org,
	linux-kernel@vger.kernel.org, linux-crypto@vger.kernel.org,
	iommu@lists.linux-foundation.org,
	Kenneth Lee <liguozhu@hisilicon.com>,
	Zaibo Xu <xuzaibo@huawei.com>, Ashok Raj <ashok.raj@intel.com>
Subject: Re: [PATCH v12 2/4] uacce: add uacce driver
Date: Tue, 25 Feb 2020 16:36:49 +0800	[thread overview]
Message-ID: <81c5a532-468c-3316-83d2-b4fa027dbe0e@linaro.org> (raw)
In-Reply-To: <20200224182201.GA22668@araj-mobl1.jf.intel.com>

Hi, Raj

On 2020/2/25 上午2:22, Raj, Ashok wrote:
> Hi Kenneth,
>
> sorry for waking up late on this patchset.
>
> +
> +static int uacce_fops_open(struct inode *inode, struct file *filep)
> +{
> +	struct uacce_mm *uacce_mm = NULL;
> +	struct uacce_device *uacce;
> +	struct uacce_queue *q;
> +	int ret = 0;
> +
> +	uacce = xa_load(&uacce_xa, iminor(inode));
> +	if (!uacce)
> +		return -ENODEV;
> +
> +	q = kzalloc(sizeof(struct uacce_queue), GFP_KERNEL);
> +	if (!q)
> +		return -ENOMEM;
> +
> +	mutex_lock(&uacce->mm_lock);
> +	uacce_mm = uacce_mm_get(uacce, q, current->mm);
> I think having this at open time is a bit unnatural. Since when a process
> does fork, we do not inherit the PASID. Although it inherits the fd
> but cannot use the mmaped address in the child.
>
> If you move this to the mmap time, its more natural. The child could
> do a mmap() get a new PASID + mmio space to work with the hardware.
>
Thanks for the suggestion.
We will consider fork in the next step, may need some time.

Thanks

  reply	other threads:[~2020-02-25  8:37 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-01-15 14:12 [PATCH v12 0/4] Add uacce module for Accelerator Zhangfei Gao
2020-01-15 14:12 ` [PATCH v12 1/4] uacce: Add documents for uacce Zhangfei Gao
2020-01-15 14:12 ` [PATCH v12 2/4] uacce: add uacce driver Zhangfei Gao
2020-02-10 23:37   ` Greg Kroah-Hartman
2020-02-11  7:59     ` zhangfei
2020-02-13  9:15     ` Herbert Xu
2020-02-13  9:42       ` zhangfei
2020-02-13 13:00       ` Greg Kroah-Hartman
2020-02-24 18:22   ` Raj, Ashok
2020-02-25  8:36     ` zhangfei [this message]
2020-03-03 11:45     ` Jean-Philippe Brucker
2020-01-15 14:12 ` [PATCH v12 3/4] crypto: hisilicon - Remove module_param uacce_mode Zhangfei Gao
2020-01-15 14:12 ` [PATCH v12 4/4] crypto: hisilicon - register zip engine to uacce Zhangfei Gao

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=81c5a532-468c-3316-83d2-b4fa027dbe0e@linaro.org \
    --to=zhangfei.gao@linaro.org \
    --cc=arnd@arndb.de \
    --cc=ashok.raj@intel.com \
    --cc=ashok.raj@linux.intel.com \
    --cc=dave.jiang@intel.com \
    --cc=francois.ozog@linaro.org \
    --cc=grant.likely@arm.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=guodong.xu@linaro.org \
    --cc=haojian.zhuang@linaro.org \
    --cc=herbert@gondor.apana.org.au \
    --cc=ilias.apalodimas@linaro.org \
    --cc=iommu@lists.linux-foundation.org \
    --cc=jean-philippe@linaro.org \
    --cc=jglisse@redhat.com \
    --cc=jonathan.cameron@huawei.com \
    --cc=kenneth-lee-2012@foxmail.com \
    --cc=liguozhu@hisilicon.com \
    --cc=linux-accelerators@lists.ozlabs.org \
    --cc=linux-crypto@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=wangzhou1@hisilicon.com \
    --cc=xuzaibo@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;
as well as URLs for NNTP newsgroup(s).