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]
Date:	Mon, 26 Aug 2013 19:40:57 +0530
From:	Vinod Koul <vinod.koul@...el.com>
To:	Laurent Pinchart <laurent.pinchart@...asonboard.com>
Cc:	Richard Zhao <linuxzsc@...il.com>,
	"linux-omap@...r.kernel.org" <linux-omap@...r.kernel.org>,
	Stephen Warren <swarren@...dotorg.org>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	Richard Zhao <rizhao@...dia.com>,
	"linux-arm-kernel@...ts.infradead.org" 
	<linux-arm-kernel@...ts.infradead.org>
Subject: Re: [PATCH] DMA: let filter functions of of_dma_simple_xlate
 possible check of_node

On Mon, Aug 26, 2013 at 03:18:00PM +0200, Laurent Pinchart wrote:
> Hi Richard,
> 
> (Dropping Dan Williams from the CC list as his e-mail address doesn't seem to 
> be valid anymore)
> 
> > > > >> Hmm. Looking at the patch, I'm not sure it's right.
> > > > >> 
> > > > >> This patch simply passes all the specfier args to the filter
> > > > >> function, and the code to check the equality of the of_node to the
> > > > >> filter args is still duplicated in each DMA driver. Instead, the DMA
> > > > >> core should be implementing the equality check, and only even calling
> > > > >> the driver-specific filter function for devices where the client's
> > > > >> phandle matches the DMA providing device's of_node handle.
> > > > > 
> > > > > Filter function is called in dmaengine core code, independent of dt.
> > > > 
> > > > The core code can still check if a dmaengine's driver was instantiated
> > > > from DT and take additional actions in that case.
> > > > 
> > > > > And the reason why the driver has to write its own filter function is
> > > > > it has to store slave id there in its own way.
> > > > 
> > > > I'm not saying don't call the driver's filter function, but rather that
> > > > the dmaengine core should perform the common checks before doing so.
> > > 
> > > And it looks to me like the common case could even get rid of the driver's
> > > filter function:
> > > 
> > > https://lkml.org/lkml/2013/5/15/270
> > > https://lkml.org/lkml/2013/3/25/250
> > 
> > For general case, the slave id is not staticly bind to a specific channel.
> 
> Certainly not in all cases, but I think it's common enough to deserve a 
> specific helper function.
Why does DT need the fliter function in the first place. The DT enabled drivers
should not even have a filter function...

The dmaengine core calls the optional filter function. This needs to be
implemented in driver in order for driver to check if the channel is what it
needs or not.

And the selection should be done for the cases where you dont have programmable
mux in dmac. For programmable ones passing slave_id in dma_slave_config should
be fine.

~Vinod
--
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