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: <1348133748.13371.33.camel@smile>
Date:	Thu, 20 Sep 2012 12:35:48 +0300
From:	Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
To:	viresh kumar <viresh.kumar@...aro.org>
Cc:	Vinod Koul <vinod.koul@...el.com>, spear-devel@...t.st.com,
	linux-kernel@...r.kernel.org, Hein Tibosch <hein_tibosch@...oo.es>
Subject: Re: [PATCH 3/7] dw_dmac: get number of channels from hardware if
 possible

On Tue, 2012-09-18 at 12:20 +0530, viresh kumar wrote: 
> On Mon, Sep 17, 2012 at 1:09 PM, Andy Shevchenko
> <andriy.shevchenko@...ux.intel.com> wrote:
> > In case the controller has the encoded parameters feature enabled the driver
> > will use it to get the number of channels. In the future it will be used for
> > the other important parameters as well.

[snip]

> > @@ -1392,23 +1396,32 @@ static int __devinit dw_probe(struct platform_device *pdev)
> >         if (irq < 0)
> >                 return irq;
> >
> > -       size = sizeof(struct dw_dma);
> > -       size += pdata->nr_channels * sizeof(struct dw_dma_chan);
> > +       regs = devm_request_and_ioremap(&pdev->dev, io);
> > +       if (!regs)
> > +               return -EBUSY;
> > +
> > +       dw_params = dma_raw_readl(regs, DW_PARAMS);
> 
> Is this valid for every SoC implementation. What if this configuration
> is not valid
> for a particular SoC and it is invalid to access this address? Or this
> gives a invalid
> value instead of returning 0?
Actually I didn't get it clearly from the documentation. We have only
one test report from Hein until now.

> > diff --git a/drivers/dma/dw_dmac_regs.h b/drivers/dma/dw_dmac_regs.h
> > index 4633d39..0f96965 100644
> > --- a/drivers/dma/dw_dmac_regs.h
> > +++ b/drivers/dma/dw_dmac_regs.h
> > @@ -104,6 +104,10 @@ struct dw_dma_regs {
> >  #define dma_raw_writel(addr, name, val) \
> >         writel((val), (addr) + offsetof(struct dw_dma_regs, name))
> >
> > +/* Bitfields in DW_PARAMS */
> > +#define DW_PARAMS_NR_CHAN      8               /* number of channels */
> > +#define DW_PARAMS_EN           28              /* encoded parameters */
> > +
> 
> Can you make this part of patch 2/7?
Do you mean to combine patch 2 and 3 together or only the parts related
to dw_dmac_regs.h?


-- 
Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
Intel Finland Oy
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ