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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Wed, 10 Oct 2012 16:45:36 +0300
From:	Felipe Balbi <balbi@...com>
To:	Felipe Balbi <balbi@...com>
Cc:	Andy Shevchenko <andy.shevchenko@...il.com>,
	viresh kumar <viresh.kumar@...aro.org>,
	Andy Shevchenko <andriy.shevchenko@...ux.intel.com>,
	Vinod Koul <vinod.koul@...el.com>,
	linux-kernel@...r.kernel.org,
	spear-devel <spear-devel@...t.st.com>,
	Heikki Krogerus <heikki.krogerus@...ux.intel.com>,
	Mika Westerberg <mika.westerberg@...ux.intel.com>
Subject: Re: [PATCH 1/4] dmaengine: dw_dmac: use helper macro
 module_platform_driver()

Hi,

On Wed, Oct 10, 2012 at 04:42:00PM +0300, Felipe Balbi wrote:
> On Wed, Oct 10, 2012 at 03:52:40PM +0300, Andy Shevchenko wrote:
> > On Wed, Oct 10, 2012 at 3:40 PM, Felipe Balbi <balbi@...com> wrote:
> > > On Wed, Oct 10, 2012 at 12:21:04PM +0300, Andy Shevchenko wrote:
> > >> On Wed, Oct 10, 2012 at 12:08 PM, viresh kumar <viresh.kumar@...aro.org> wrote:
> > >> > On Wed, Oct 10, 2012 at 2:34 PM, Andy Shevchenko
> > >> > <andriy.shevchenko@...ux.intel.com> wrote:
> > >> >> On Tue, 2012-10-02 at 14:41 +0300, Andy Shevchenko wrote:
> > >> >>> From: Heikki Krogerus <heikki.krogerus@...ux.intel.com>
> > >> >>>
> > >> >>> Since v3.2 we have nice macro to define the platform driver's init and exit
> > >> >>> calls. This patch simplifies the dw_dmac driver by using that macro.
> > >> >>
> > >> >> Actually we can't do this. It will break initialization of some other
> > >> >> drivers.
> > >> >
> > >> > why?
> > >>
> > >> We have spi, i2c and hsuart devices connected to the DMA controller.
> > >> In case we would like to use DMA we have to have the dw_dmac loaded
> > >> before them. Currently we have spi driver on subsys_initcall level,
> > >> and Mika, who is developing it, will change to module_init_call level.
> > >> However, it will just hide the potential issue. He also tried to use
> > >> deferred module loading, but we don't know if it's good solution or
> > >> not, and that solution requires something to stop deferring at some
> > >> moment.
> > >>
> > >> Might be we missed something and there is a better solution.
> > >
> > > if they can only work with DMA, they should return -EPROBE_DEFER so
> > > their probe() function can be called after DMA driver has finished
> > > probing.
> > 
> > They could work either with DMA or via PIO mode.
> > How does the driver know when to stop to return -EPROBE_DEFER?
> 
> Why would you even allow to work as PIO-only ? Who would even want to
> use the driver as PIO only ?
> 
> In any case, you can add a Kconfig choice like WHATEVER_PIO_ONLY and
> only return -EPROBE_DEFER ifndef WHATEVER_PIO_ONLY.

yet another comment is that any user of this dma engine will have to
pass the filter function as argument to request_channel, which means
Modules.dep will make sure for dw_dmac to probe before its users.

What am I missing here ?

-- 
balbi

Download attachment "signature.asc" of type "application/pgp-signature" (837 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ