lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1558979756.19282.9.camel@nxp.com>
Date:   Mon, 27 May 2019 09:52:06 +0000
From:   Robin Gong <yibin.gong@....com>
To:     "s.hauer@...gutronix.de" <s.hauer@...gutronix.de>
CC:     dl-linux-imx <linux-imx@....com>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        "devicetree@...r.kernel.org" <devicetree@...r.kernel.org>,
        "festevam@...il.com" <festevam@...il.com>,
        "dan.j.williams@...el.com" <dan.j.williams@...el.com>,
        "mark.rutland@....com" <mark.rutland@....com>,
        "dmaengine@...r.kernel.org" <dmaengine@...r.kernel.org>,
        "robh@...nel.org" <robh@...nel.org>,
        "shawnguo@...nel.org" <shawnguo@...nel.org>,
        "linux-arm-kernel@...ts.infradead.org" 
        <linux-arm-kernel@...ts.infradead.org>,
        "vkoul@...nel.org" <vkoul@...nel.org>,
        "kernel@...gutronix.de" <kernel@...gutronix.de>
Subject: Re: [PATCH v2 4/7] dmaengine: fsl-edma-common: version check for v2
 instead

On 2019-05-27 at 09:08 +0000, Sascha Hauer wrote:
> On Mon, May 27, 2019 at 04:51:15PM +0800, yibin.gong@....com wrote:
> > 
> > From: Robin Gong <yibin.gong@....com>
> > 
> > The next v3 i.mx7ulp edma is based on v1, so change version
> > check logic for v2 instead.
> > 
> > Signed-off-by: Robin Gong <yibin.gong@....com>
> > ---
> >  drivers/dma/fsl-edma-common.c | 40 ++++++++++++++++++++-----------
> > ---------
> >  1 file changed, 20 insertions(+), 20 deletions(-)
> > 
> > diff --git a/drivers/dma/fsl-edma-common.c b/drivers/dma/fsl-edma-
> > common.c
> > index bb24251..45d70d3 100644
> > --- a/drivers/dma/fsl-edma-common.c
> > +++ b/drivers/dma/fsl-edma-common.c
> > @@ -657,26 +657,26 @@ void fsl_edma_setup_regs(struct
> > fsl_edma_engine *edma)
> >  	edma->regs.erql = edma->membase + EDMA_ERQ;
> >  	edma->regs.eeil = edma->membase + EDMA_EEI;
> >  
> > -	edma->regs.serq = edma->membase + ((edma->version == v1) ?
> > -			EDMA_SERQ : EDMA64_SERQ);
> > -	edma->regs.cerq = edma->membase + ((edma->version == v1) ?
> > -			EDMA_CERQ : EDMA64_CERQ);
> > -	edma->regs.seei = edma->membase + ((edma->version == v1) ?
> > -			EDMA_SEEI : EDMA64_SEEI);
> > -	edma->regs.ceei = edma->membase + ((edma->version == v1) ?
> > -			EDMA_CEEI : EDMA64_CEEI);
> > -	edma->regs.cint = edma->membase + ((edma->version == v1) ?
> > -			EDMA_CINT : EDMA64_CINT);
> > -	edma->regs.cerr = edma->membase + ((edma->version == v1) ?
> > -			EDMA_CERR : EDMA64_CERR);
> > -	edma->regs.ssrt = edma->membase + ((edma->version == v1) ?
> > -			EDMA_SSRT : EDMA64_SSRT);
> > -	edma->regs.cdne = edma->membase + ((edma->version == v1) ?
> > -			EDMA_CDNE : EDMA64_CDNE);
> > -	edma->regs.intl = edma->membase + ((edma->version == v1) ?
> > -			EDMA_INTR : EDMA64_INTL);
> > -	edma->regs.errl = edma->membase + ((edma->version == v1) ?
> > -			EDMA_ERR : EDMA64_ERRL);
> > +	edma->regs.serq = edma->membase + ((edma->version == v2) ?
> > +			EDMA64_SERQ : EDMA_SERQ);
> > +	edma->regs.cerq = edma->membase + ((edma->version == v2) ?
> > +			EDMA64_CERQ : EDMA_CERQ);
> > +	edma->regs.seei = edma->membase + ((edma->version == v2) ?
> > +			EDMA64_SEEI : EDMA_SEEI);
> > +	edma->regs.ceei = edma->membase + ((edma->version == v2) ?
> > +			EDMA64_CEEI : EDMA_CEEI);
> > +	edma->regs.cint = edma->membase + ((edma->version == v2) ?
> > +			EDMA64_CINT : EDMA_CINT);
> > +	edma->regs.cerr = edma->membase + ((edma->version == v2) ?
> > +			EDMA64_CERR : EDMA_CERR);
> > +	edma->regs.ssrt = edma->membase + ((edma->version == v2) ?
> > +			EDMA64_SSRT : EDMA_SSRT);
> > +	edma->regs.cdne = edma->membase + ((edma->version == v2) ?
> > +			EDMA64_CDNE : EDMA_CDNE);
> > +	edma->regs.intl = edma->membase + ((edma->version == v2) ?
> > +			EDMA64_INTL : EDMA_INTR);
> > +	edma->regs.errl = edma->membase + ((edma->version == v2) ?
> > +			EDMA64_ERRL : EDMA_ERR);
> Following to what I have said to 6/7 you can put the register offsets
> into that new struct aswell.
> 
> Sascha
Understood your point, but the logic of fsl-edma-common.c is the common
functions array provided to be called in fsl-edma.c or mcf-edma.c, not
different specific functions in fsl-edma.c or mcf-edma.c.   
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ