Re: [PATCH v2,5/5] drivers: uio: new driver for fsl_85xx_cache_sram

2020-04-16 Thread Scott Wood
On Thu, 2020-04-16 at 08:30 +0200, Greg KH wrote: > On Wed, Apr 15, 2020 at 02:26:55PM -0500, Scott Wood wrote: > > Instead, have module parameters that take the sizes and alignments you'd > > like > > to allocate and expose to userspace. Better still would be some sort of > > dynamic allocation (

Re: [PATCH v2,5/5] drivers: uio: new driver for fsl_85xx_cache_sram

2020-04-16 Thread Scott Wood
On Thu, 2020-04-16 at 08:30 +0200, Greg KH wrote: > On Wed, Apr 15, 2020 at 02:27:51PM -0500, Scott Wood wrote: > > > > + dev_err(&pdev->dev, "error no valid uio-map > > > > configured\n"); > > > > + ret = -EINVAL; > > > > + goto err_info_free_internel; > >

Re: [PATCH v2,5/5] drivers: uio: new driver for fsl_85xx_cache_sram

2020-04-15 Thread Greg KH
On Wed, Apr 15, 2020 at 02:27:51PM -0500, Scott Wood wrote: > > > + dev_err(&pdev->dev, "error no valid uio-map configured\n"); > > > + ret = -EINVAL; > > > + goto err_info_free_internel; > > > + } > > > + > > > + info->version = "0.1.0"; > > > > Could you define some DRIVE

Re: [PATCH v2,5/5] drivers: uio: new driver for fsl_85xx_cache_sram

2020-04-15 Thread Greg KH
On Wed, Apr 15, 2020 at 02:26:55PM -0500, Scott Wood wrote: > Instead, have module parameters that take the sizes and alignments you'd like > to allocate and expose to userspace. Better still would be some sort of > dynamic allocation (e.g. open a fd, ioctl to set the requested size/alignment, > i

Re: [PATCH v2,5/5] drivers: uio: new driver for fsl_85xx_cache_sram

2020-04-15 Thread Christophe Leroy
Le 16/04/2020 à 07:22, Wang Wenhu a écrit : Yes, kzalloc() would clean the allocated areas and the init of remaining array elements are redundant. I will remove the block in v3. + dev_err(&pdev->dev, "error no valid uio-map configured\n"); + ret = -EINVAL; +

Re: [PATCH v2,5/5] drivers: uio: new driver for fsl_85xx_cache_sram

2020-04-15 Thread Wang Wenhu
Yes, kzalloc() would clean the allocated areas and the init of remaining array elements are redundant. I will remove the block in v3. >> > + dev_err(&pdev->dev, "error no valid uio-map configured\n"); >> > + ret = -EINVAL; >> > + goto err_info_free_internel; >> > + } >>

Re: [PATCH v2,5/5] drivers: uio: new driver for fsl_85xx_cache_sram

2020-04-15 Thread Scott Wood
On Wed, 2020-04-15 at 18:52 +0200, Christophe Leroy wrote: > > Le 15/04/2020 à 17:24, Wang Wenhu a écrit : > > + > > + if (uiomem >= &info->mem[MAX_UIO_MAPS]) { > > I'd prefer > if (uiomem - info->mem >= MAX_UIO_MAPS) { > > > + dev_warn(&pdev->dev, "more

Re: [PATCH v2,5/5] drivers: uio: new driver for fsl_85xx_cache_sram

2020-04-15 Thread Scott Wood
On Wed, 2020-04-15 at 08:24 -0700, Wang Wenhu wrote: > +static const struct of_device_id uio_mpc85xx_l2ctlr_of_match[] = { > + { .compatible = "uio,fsl,p2020-l2-cache-controller", }, > + { .compatible = "uio,fsl,p2010-l2-cache-controller", }, > + { .compatibl

Re: [PATCH v2,5/5] drivers: uio: new driver for fsl_85xx_cache_sram

2020-04-15 Thread Christophe Leroy
Le 15/04/2020 à 17:24, Wang Wenhu a écrit : A driver for freescale 85xx platforms to access the Cache-Sram form user level. This is extremely helpful for some user-space applications that require high performance memory accesses. Cc: Greg Kroah-Hartman Cc: Christophe Leroy Cc: Scott Wood C

[PATCH v2,5/5] drivers: uio: new driver for fsl_85xx_cache_sram

2020-04-15 Thread Wang Wenhu
A driver for freescale 85xx platforms to access the Cache-Sram form user level. This is extremely helpful for some user-space applications that require high performance memory accesses. Cc: Greg Kroah-Hartman Cc: Christophe Leroy Cc: Scott Wood Cc: Michael Ellerman Cc: linuxppc-dev@lists.ozlab