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 22:49:05 +0800
From:	Richard Zhao <linuxzsc@...il.com>
To:	Stephen Warren <swarren@...dotorg.org>
Cc:	Richard Zhao <rizhao@...dia.com>,
	"vinod.koul@...el.com" <vinod.koul@...el.com>,
	"linux-omap@...r.kernel.org" <linux-omap@...r.kernel.org>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	"linux-arm-kernel@...ts.infradead.org" 
	<linux-arm-kernel@...ts.infradead.org>, "djbw@...com" <djbw@...com>
Subject: Re: [PATCH] DMA: let filter functions of of_dma_simple_xlate
 possible check of_node

On Fri, Aug 23, 2013 at 09:57:43AM -0600, Stephen Warren wrote:
> On 08/22/2013 07:29 PM, Richard Zhao wrote:
> > On Fri, Aug 23, 2013 at 04:18:27AM +0800, Stephen Warren wrote:
> >> On 08/21/2013 11:19 PM, Richard Zhao wrote:
> >>> On Fri, Aug 02, 2013 at 10:00:00AM +0800, Richard Zhao wrote:
> >>>> pass of_phandle_args dma_spec to dma_request_channel in of_dma_simple_xlate,
> >>>> so the filter function could access of_node in of_phandle_args.
> >>>>
> >>>> It also remove restriction of #dma-cells has to be one.
> >>>>
> >>>> Signed-off-by: Richard Zhao <rizhao@...dia.com>
> >>>> ---
> >>>>  drivers/dma/edma.c     |  7 +++++--
> >>>>  drivers/dma/of-dma.c   | 10 ++++------
> >>>>  drivers/dma/omap-dma.c |  6 ++++--
> >>>>  3 files changed, 13 insertions(+), 10 deletions(-)
> >>>>
> >>>
> >>> Hi Vinod,
> >>>
> >>> Can you please pick up this change?
> >>>
> >>> Hi Stephen,
> >>>
> >>> Can you please give a ack or reviewed-by etc?
> >>
> >> 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.

>From perspective of core code, the filter function is not attached to
any dma driver. So it doesn't care whether dt dma driver is instantiated.
I'm not sure I've got your point. Can you please write pieces of code if
possible?
The goal of this patch is to use least changes to add check of dt node.

Thanks
Richard
> 
> > 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.
> 
--
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