linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] dmaengine: provide dummy functions for DMA_ENGINE=n
@ 2010-12-22 13:46 Guennadi Liakhovetski
  2010-12-22 23:56 ` Dan Williams
  0 siblings, 1 reply; 5+ messages in thread
From: Guennadi Liakhovetski @ 2010-12-22 13:46 UTC (permalink / raw)
  To: linux-kernel; +Cc: Dan Williams

This lets drivers, optionally using the dmaengine, build with DMA_ENGINE
unselected.

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
---
 include/linux/dmaengine.h |   13 ++++++++++---
 1 files changed, 10 insertions(+), 3 deletions(-)

diff --git a/include/linux/dmaengine.h b/include/linux/dmaengine.h
index 9d8688b..8cd00ad 100644
--- a/include/linux/dmaengine.h
+++ b/include/linux/dmaengine.h
@@ -824,6 +824,8 @@ enum dma_status dma_sync_wait(struct dma_chan *chan, dma_cookie_t cookie);
 #ifdef CONFIG_DMA_ENGINE
 enum dma_status dma_wait_for_async_tx(struct dma_async_tx_descriptor *tx);
 void dma_issue_pending_all(void);
+struct dma_chan *__dma_request_channel(dma_cap_mask_t *mask, dma_filter_fn fn, void *fn_param);
+void dma_release_channel(struct dma_chan *chan);
 #else
 static inline enum dma_status dma_wait_for_async_tx(struct dma_async_tx_descriptor *tx)
 {
@@ -831,7 +833,14 @@ static inline enum dma_status dma_wait_for_async_tx(struct dma_async_tx_descript
 }
 static inline void dma_issue_pending_all(void)
 {
-	do { } while (0);
+}
+static inline struct dma_chan *__dma_request_channel(dma_cap_mask_t *mask,
+					      dma_filter_fn fn, void *fn_param)
+{
+	return NULL;
+}
+static inline void dma_release_channel(struct dma_chan *chan)
+{
 }
 #endif
 
@@ -842,8 +851,6 @@ void dma_async_device_unregister(struct dma_device *device);
 void dma_run_dependencies(struct dma_async_tx_descriptor *tx);
 struct dma_chan *dma_find_channel(enum dma_transaction_type tx_type);
 #define dma_request_channel(mask, x, y) __dma_request_channel(&(mask), x, y)
-struct dma_chan *__dma_request_channel(dma_cap_mask_t *mask, dma_filter_fn fn, void *fn_param);
-void dma_release_channel(struct dma_chan *chan);
 
 /* --- Helper iov-locking functions --- */
 
-- 
1.7.2.3


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH] dmaengine: provide dummy functions for DMA_ENGINE=n
  2010-12-22 13:46 [PATCH] dmaengine: provide dummy functions for DMA_ENGINE=n Guennadi Liakhovetski
@ 2010-12-22 23:56 ` Dan Williams
  2010-12-23  0:13   ` Guennadi Liakhovetski
  0 siblings, 1 reply; 5+ messages in thread
From: Dan Williams @ 2010-12-22 23:56 UTC (permalink / raw)
  To: Guennadi Liakhovetski; +Cc: linux-kernel

On Wed, Dec 22, 2010 at 5:46 AM, Guennadi Liakhovetski
<g.liakhovetski@gmx.de> wrote:
> This lets drivers, optionally using the dmaengine, build with DMA_ENGINE
> unselected.
>
> Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
> ---
>  include/linux/dmaengine.h |   13 ++++++++++---
>  1 files changed, 10 insertions(+), 3 deletions(-)

Is this fixing build errors, or is this just relieving drivers from
needing to surround calls to dma_{request|release}_channel() with
ifdef CONFIG_DMA_ENGINE?  The former makes this more urgent, the
latter can wait for the next merge window.

--
Dan

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] dmaengine: provide dummy functions for DMA_ENGINE=n
  2010-12-22 23:56 ` Dan Williams
@ 2010-12-23  0:13   ` Guennadi Liakhovetski
  2010-12-23  1:39     ` Dan Williams
  0 siblings, 1 reply; 5+ messages in thread
From: Guennadi Liakhovetski @ 2010-12-23  0:13 UTC (permalink / raw)
  To: Dan Williams; +Cc: linux-kernel

On Wed, 22 Dec 2010, Dan Williams wrote:

> On Wed, Dec 22, 2010 at 5:46 AM, Guennadi Liakhovetski
> <g.liakhovetski@gmx.de> wrote:
> > This lets drivers, optionally using the dmaengine, build with DMA_ENGINE
> > unselected.
> >
> > Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
> > ---
> >  include/linux/dmaengine.h |   13 ++++++++++---
> >  1 files changed, 10 insertions(+), 3 deletions(-)
> 
> Is this fixing build errors, or is this just relieving drivers from
> needing to surround calls to dma_{request|release}_channel() with
> ifdef CONFIG_DMA_ENGINE?  The former makes this more urgent, the
> latter can wait for the next merge window.

sh_mmcif.c doesn't compile, if configured for DMA, but DMA_ENGINE is 
unselected. So, yes, this wants to be fixed. But there's more than one way 
to fix it. I've chosen this one, as it seems more generic to me.

Thanks
Guennadi
---
Guennadi Liakhovetski, Ph.D.
Freelance Open-Source Software Developer
http://www.open-technology.de/

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] dmaengine: provide dummy functions for DMA_ENGINE=n
  2010-12-23  0:13   ` Guennadi Liakhovetski
@ 2010-12-23  1:39     ` Dan Williams
  2010-12-23  7:00       ` Guennadi Liakhovetski
  0 siblings, 1 reply; 5+ messages in thread
From: Dan Williams @ 2010-12-23  1:39 UTC (permalink / raw)
  To: Guennadi Liakhovetski; +Cc: linux-kernel

On Wed, Dec 22, 2010 at 4:13 PM, Guennadi Liakhovetski
<g.liakhovetski@gmx.de> wrote:
> On Wed, 22 Dec 2010, Dan Williams wrote:
>
>> On Wed, Dec 22, 2010 at 5:46 AM, Guennadi Liakhovetski
>> <g.liakhovetski@gmx.de> wrote:
>> > This lets drivers, optionally using the dmaengine, build with DMA_ENGINE
>> > unselected.
>> >
>> > Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
>> > ---
>> >  include/linux/dmaengine.h |   13 ++++++++++---
>> >  1 files changed, 10 insertions(+), 3 deletions(-)
>>
>> Is this fixing build errors, or is this just relieving drivers from
>> needing to surround calls to dma_{request|release}_channel() with
>> ifdef CONFIG_DMA_ENGINE?  The former makes this more urgent, the
>> latter can wait for the next merge window.
>
> sh_mmcif.c doesn't compile, if configured for DMA, but DMA_ENGINE is
> unselected. So, yes, this wants to be fixed. But there's more than one way
> to fix it. I've chosen this one, as it seems more generic to me.
>

Yes, it's the right fix.  I was just trying to see if it needs to go
in now and if there were any implications for -stable.  Unless I am
missing something drivers/mmc/host/sh_mmcif.c does not even include
dmaengine.h today so this can wait until the 2.6.38 window.

--
Dan

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] dmaengine: provide dummy functions for DMA_ENGINE=n
  2010-12-23  1:39     ` Dan Williams
@ 2010-12-23  7:00       ` Guennadi Liakhovetski
  0 siblings, 0 replies; 5+ messages in thread
From: Guennadi Liakhovetski @ 2010-12-23  7:00 UTC (permalink / raw)
  To: Dan Williams; +Cc: linux-kernel

On Wed, 22 Dec 2010, Dan Williams wrote:

> On Wed, Dec 22, 2010 at 4:13 PM, Guennadi Liakhovetski
> <g.liakhovetski@gmx.de> wrote:
> > On Wed, 22 Dec 2010, Dan Williams wrote:
> >
> >> On Wed, Dec 22, 2010 at 5:46 AM, Guennadi Liakhovetski
> >> <g.liakhovetski@gmx.de> wrote:
> >> > This lets drivers, optionally using the dmaengine, build with DMA_ENGINE
> >> > unselected.
> >> >
> >> > Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
> >> > ---
> >> >  include/linux/dmaengine.h |   13 ++++++++++---
> >> >  1 files changed, 10 insertions(+), 3 deletions(-)
> >>
> >> Is this fixing build errors, or is this just relieving drivers from
> >> needing to surround calls to dma_{request|release}_channel() with
> >> ifdef CONFIG_DMA_ENGINE?  The former makes this more urgent, the
> >> latter can wait for the next merge window.
> >
> > sh_mmcif.c doesn't compile, if configured for DMA, but DMA_ENGINE is
> > unselected. So, yes, this wants to be fixed. But there's more than one way
> > to fix it. I've chosen this one, as it seems more generic to me.
> >
> 
> Yes, it's the right fix.  I was just trying to see if it needs to go
> in now and if there were any implications for -stable.  Unless I am
> missing something drivers/mmc/host/sh_mmcif.c does not even include
> dmaengine.h today so this can wait until the 2.6.38 window.

Right, sorry, DMA support for sh_mmcif.c is only coming in 2.6.38, it's 
currently in next.

Thanks
Guennadi
---
Guennadi Liakhovetski, Ph.D.
Freelance Open-Source Software Developer
http://www.open-technology.de/

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2010-12-23  7:00 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-12-22 13:46 [PATCH] dmaengine: provide dummy functions for DMA_ENGINE=n Guennadi Liakhovetski
2010-12-22 23:56 ` Dan Williams
2010-12-23  0:13   ` Guennadi Liakhovetski
2010-12-23  1:39     ` Dan Williams
2010-12-23  7:00       ` Guennadi Liakhovetski

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).