Re: [PATCH 2/2] uacce: add uacce module

2019-08-27 Thread Greg Kroah-Hartman
mann , > > linux-accelerat...@lists.ozlabs.org, linux-kernel@vger.kernel.org, Zaibo > > Xu , Zhou Wang > > Subject: Re: [PATCH 2/2] uacce: add uacce module > > User-Agent: Mutt/1.12.1 (2019-06-15) > > Message-ID: <20190826042910.ga26...@kroah.com> > > > > On Mon

Re: [PATCH 2/2] uacce: add uacce module

2019-08-27 Thread Kenneth Lee
ang > Subject: Re: [PATCH 2/2] uacce: add uacce module > User-Agent: Mutt/1.12.1 (2019-06-15) > Message-ID: <20190826042910.ga26...@kroah.com> > > On Mon, Aug 26, 2019 at 12:10:42PM +0800, Kenneth Lee wrote: > > On Wed, Aug 21, 2019 at 09:05:42AM -0700, Greg Kroah-Hartman

Re: [PATCH 2/2] uacce: add uacce module

2019-08-25 Thread Greg Kroah-Hartman
ists.ozlabs.org, > > linux-kernel@vger.kernel.org, Kenneth Lee , Zaibo > > Xu , Zhou Wang > > Subject: Re: [PATCH 2/2] uacce: add uacce module > > User-Agent: Mutt/1.12.1 (2019-06-15) > > Message-ID: <20190821160542.ga14...@kroah.com> > > > > On Wed, Au

Re: [PATCH 2/2] uacce: add uacce module

2019-08-25 Thread Kenneth Lee
ang > Subject: Re: [PATCH 2/2] uacce: add uacce module > User-Agent: Mutt/1.12.1 (2019-06-15) > Message-ID: <20190821160542.ga14...@kroah.com> > > On Wed, Aug 21, 2019 at 10:30:22PM +0800, zhangfei wrote: > > > > > > On 2019/8/21 下午5:17, Greg Kroah-Hart

Re: [PATCH 2/2] uacce: add uacce module

2019-08-24 Thread Greg Kroah-Hartman
On Sat, Aug 24, 2019 at 08:53:01PM +0800, zhangfei wrote: > > > On 2019/8/20 下午10:33, Greg Kroah-Hartman wrote: > > On Tue, Aug 20, 2019 at 08:36:50PM +0800, zhangfei wrote: > > > Hi, Greg > > > > > > On 2019/8/19 下午6:24, Greg Kroah-Hartman wrote: > > > > > > > +static int uacce_create_chrdev(st

Re: [PATCH 2/2] uacce: add uacce module

2019-08-24 Thread zhangfei
On 2019/8/20 下午10:33, Greg Kroah-Hartman wrote: On Tue, Aug 20, 2019 at 08:36:50PM +0800, zhangfei wrote: Hi, Greg On 2019/8/19 下午6:24, Greg Kroah-Hartman wrote: +static int uacce_create_chrdev(struct uacce *uacce) +{ + int ret; + + ret = idr_alloc(&uacce_idr, uacce, 0, 0, GFP_K

Re: [PATCH 2/2] uacce: add uacce module

2019-08-23 Thread Jonathan Cameron
On Fri, 23 Aug 2019 17:21:33 +0800 zhangfei wrote: > Hi, Jonathan > > Thanks for your careful review and good suggestion. > Sorry for late response, I am checking one detail. > > On 2019/8/16 上午12:54, Jonathan Cameron wrote: > > On Wed, 14 Aug 2019 17:34:25 +0800 > > Zhangfei Gao wrote: > >

Re: [PATCH 2/2] uacce: add uacce module

2019-08-23 Thread Jonathan Cameron
On Fri, 23 Aug 2019 17:21:33 +0800 zhangfei wrote: > Hi, Jonathan Hi zhangfei, > > Thanks for your careful review and good suggestion. > Sorry for late response, I am checking one detail. I have reviews on patches from years ago that I still haven't replied to ;) > > On 2019/8/16 上午12:54, Jo

Re: [PATCH 2/2] uacce: add uacce module

2019-08-23 Thread zhangfei
Hi, Jonathan Thanks for your careful review and good suggestion. Sorry for late response, I am checking one detail. On 2019/8/16 上午12:54, Jonathan Cameron wrote: On Wed, 14 Aug 2019 17:34:25 +0800 Zhangfei Gao wrote: From: Kenneth Lee Uacce is the kernel component to support WarpDrive acce

Re: [PATCH 2/2] uacce: add uacce module

2019-08-21 Thread Greg Kroah-Hartman
On Wed, Aug 21, 2019 at 10:30:22PM +0800, zhangfei wrote: > > > On 2019/8/21 下午5:17, Greg Kroah-Hartman wrote: > > On Wed, Aug 21, 2019 at 03:21:18PM +0800, zhangfei@foxmail.com wrote: > > > Hi, Greg > > > > > > On 2019/8/21 上午12:59, Greg Kroah-Hartman wrote: > > > > On Tue, Aug 20, 2019 at

Re: [PATCH 2/2] uacce: add uacce module

2019-08-21 Thread zhangfei
On 2019/8/21 下午5:17, Greg Kroah-Hartman wrote: On Wed, Aug 21, 2019 at 03:21:18PM +0800, zhangfei@foxmail.com wrote: Hi, Greg On 2019/8/21 上午12:59, Greg Kroah-Hartman wrote: On Tue, Aug 20, 2019 at 09:08:55PM +0800, zhangfei wrote: On 2019/8/15 下午10:13, Greg Kroah-Hartman wrote: On We

Re: [PATCH 2/2] uacce: add uacce module

2019-08-21 Thread Greg Kroah-Hartman
On Wed, Aug 21, 2019 at 03:21:18PM +0800, zhangfei@foxmail.com wrote: > Hi, Greg > > On 2019/8/21 上午12:59, Greg Kroah-Hartman wrote: > > On Tue, Aug 20, 2019 at 09:08:55PM +0800, zhangfei wrote: > > > > > > On 2019/8/15 下午10:13, Greg Kroah-Hartman wrote: > > > > On Wed, Aug 14, 2019 at 05:34:

Re: [PATCH 2/2] uacce: add uacce module

2019-08-20 Thread Greg Kroah-Hartman
On Tue, Aug 20, 2019 at 09:08:55PM +0800, zhangfei wrote: > > > On 2019/8/15 下午10:13, Greg Kroah-Hartman wrote: > > On Wed, Aug 14, 2019 at 05:34:25PM +0800, Zhangfei Gao wrote: > > > +int uacce_register(struct uacce *uacce) > > > +{ > > > + int ret; > > > + > > > + if (!uacce->pdev) { > > > +

Re: [PATCH 2/2] uacce: add uacce module

2019-08-20 Thread Greg Kroah-Hartman
On Tue, Aug 20, 2019 at 08:36:50PM +0800, zhangfei wrote: > Hi, Greg > > On 2019/8/19 下午6:24, Greg Kroah-Hartman wrote: > > > > > +static int uacce_create_chrdev(struct uacce *uacce) > > > > > +{ > > > > > + int ret; > > > > > + > > > > > + ret = idr_alloc(&uacce_idr, uacce, 0, 0, GFP_KERN

Re: [PATCH 2/2] uacce: add uacce module

2019-08-20 Thread Greg Kroah-Hartman
On Tue, Aug 20, 2019 at 08:38:46PM +0800, zhangfei wrote: > > > On 2019/8/19 下午6:22, Greg Kroah-Hartman wrote: > > On Mon, Aug 19, 2019 at 05:09:23PM +0800, zhangfei@foxmail.com wrote: > > > Hi, Greg > > > > > > Thanks for your kind suggestion. > > > > > > On 2019/8/15 下午10:12, Greg Kroah-H

Re: [PATCH 2/2] uacce: add uacce module

2019-08-20 Thread zhangfei
On 2019/8/15 下午10:13, Greg Kroah-Hartman wrote: On Wed, Aug 14, 2019 at 05:34:25PM +0800, Zhangfei Gao wrote: +int uacce_register(struct uacce *uacce) +{ + int ret; + + if (!uacce->pdev) { + pr_debug("uacce parent device not set\n"); + return -ENODEV; +

Re: [PATCH 2/2] uacce: add uacce module

2019-08-20 Thread zhangfei
On 2019/8/19 下午6:22, Greg Kroah-Hartman wrote: On Mon, Aug 19, 2019 at 05:09:23PM +0800, zhangfei@foxmail.com wrote: Hi, Greg Thanks for your kind suggestion. On 2019/8/15 下午10:12, Greg Kroah-Hartman wrote: On Wed, Aug 14, 2019 at 05:34:25PM +0800, Zhangfei Gao wrote: diff --git a/inc

Re: [PATCH 2/2] uacce: add uacce module

2019-08-20 Thread zhangfei
Hi, Greg On 2019/8/19 下午6:24, Greg Kroah-Hartman wrote: +static int uacce_create_chrdev(struct uacce *uacce) +{ + int ret; + + ret = idr_alloc(&uacce_idr, uacce, 0, 0, GFP_KERNEL); + if (ret < 0) + return ret; + Shouldn't this function create the memory needed fo

Re: [PATCH 2/2] uacce: add uacce module

2019-08-19 Thread Greg Kroah-Hartman
On Mon, Aug 19, 2019 at 05:43:40PM +0800, zhangfei@foxmail.com wrote: > Hi, Greg > > On 2019/8/15 下午10:20, Greg Kroah-Hartman wrote: > > On Wed, Aug 14, 2019 at 05:34:25PM +0800, Zhangfei Gao wrote: > > > +/* lock to protect all queues management */ > > > +static DECLARE_RWSEM(uacce_qs_lock);

Re: [PATCH 2/2] uacce: add uacce module

2019-08-19 Thread Greg Kroah-Hartman
On Mon, Aug 19, 2019 at 05:09:23PM +0800, zhangfei@foxmail.com wrote: > Hi, Greg > > Thanks for your kind suggestion. > > On 2019/8/15 下午10:12, Greg Kroah-Hartman wrote: > > On Wed, Aug 14, 2019 at 05:34:25PM +0800, Zhangfei Gao wrote: > > > diff --git a/include/uapi/misc/uacce.h b/include/ua

Re: [PATCH 2/2] uacce: add uacce module

2019-08-15 Thread Jonathan Cameron
On Wed, 14 Aug 2019 17:34:25 +0800 Zhangfei Gao wrote: > From: Kenneth Lee > > Uacce is the kernel component to support WarpDrive accelerator > framework. It provides register/unregister interface for device drivers > to expose their hardware resource to the user space. The resource is > taken

Re: [PATCH 2/2] uacce: add uacce module

2019-08-15 Thread Greg Kroah-Hartman
On Wed, Aug 14, 2019 at 05:34:25PM +0800, Zhangfei Gao wrote: > +/* lock to protect all queues management */ > +static DECLARE_RWSEM(uacce_qs_lock); > +#define uacce_qs_rlock() down_read(&uacce_qs_lock) > +#define uacce_qs_runlock() up_read(&uacce_qs_lock) > +#define uacce_qs_wlock() down_write(&ua

Re: [PATCH 2/2] uacce: add uacce module

2019-08-15 Thread Greg Kroah-Hartman
On Wed, Aug 14, 2019 at 05:34:25PM +0800, Zhangfei Gao wrote: > +int uacce_register(struct uacce *uacce) > +{ > + int ret; > + > + if (!uacce->pdev) { > + pr_debug("uacce parent device not set\n"); > + return -ENODEV; > + } > + > + if (uacce->flags & UACCE_DE

Re: [PATCH 2/2] uacce: add uacce module

2019-08-15 Thread Greg Kroah-Hartman
On Wed, Aug 14, 2019 at 05:34:25PM +0800, Zhangfei Gao wrote: > diff --git a/include/uapi/misc/uacce.h b/include/uapi/misc/uacce.h > new file mode 100644 > index 000..44a0a5d > --- /dev/null > +++ b/include/uapi/misc/uacce.h > @@ -0,0 +1,44 @@ > +/* SPDX-License-Identifier: GPL-2.0-or-later */

[PATCH 2/2] uacce: add uacce module

2019-08-14 Thread Zhangfei Gao
From: Kenneth Lee Uacce is the kernel component to support WarpDrive accelerator framework. It provides register/unregister interface for device drivers to expose their hardware resource to the user space. The resource is taken as "queue" in WarpDrive. Uacce create a chrdev for every registratio