linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] fsldma: fix missing header include
@ 2010-09-02 19:47 Ira W. Snyder
  2010-09-03 23:40 ` Andrew Morton
  0 siblings, 1 reply; 4+ messages in thread
From: Ira W. Snyder @ 2010-09-02 19:47 UTC (permalink / raw)
  To: linux-kernel; +Cc: Dan Williams, linuxppc-dev

The slab.h header is required to use the kmalloc() family of functions.
Due to recent kernel changes, this header must be directly included by
code that calls into the memory allocator.

Signed-off-by: Ira W. Snyder <iws@ovro.caltech.edu>
---

Without this patch, any code which includes this header fails to build.

 arch/powerpc/include/asm/fsldma.h |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/arch/powerpc/include/asm/fsldma.h b/arch/powerpc/include/asm/fsldma.h
index a67aeed..debc5ed 100644
--- a/arch/powerpc/include/asm/fsldma.h
+++ b/arch/powerpc/include/asm/fsldma.h
@@ -11,6 +11,7 @@
 #ifndef __ARCH_POWERPC_ASM_FSLDMA_H__
 #define __ARCH_POWERPC_ASM_FSLDMA_H__
 
+#include <linux/slab.h>
 #include <linux/dmaengine.h>
 
 /*
-- 
1.7.1

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

* Re: [PATCH] fsldma: fix missing header include
  2010-09-02 19:47 [PATCH] fsldma: fix missing header include Ira W. Snyder
@ 2010-09-03 23:40 ` Andrew Morton
  2010-09-04  0:47   ` Ira W. Snyder
  0 siblings, 1 reply; 4+ messages in thread
From: Andrew Morton @ 2010-09-03 23:40 UTC (permalink / raw)
  To: Ira W. Snyder; +Cc: Dan Williams, linuxppc-dev, linux-kernel

On Thu, 2 Sep 2010 12:47:52 -0700
"Ira W. Snyder" <iws@ovro.caltech.edu> wrote:

> The slab.h header is required to use the kmalloc() family of functions.
> Due to recent kernel changes, this header must be directly included by
> code that calls into the memory allocator.
> 
> Signed-off-by: Ira W. Snyder <iws@ovro.caltech.edu>
> ---
> 
> Without this patch, any code which includes this header fails to build.
> 
>  arch/powerpc/include/asm/fsldma.h |    1 +
>  1 files changed, 1 insertions(+), 0 deletions(-)
> 
> diff --git a/arch/powerpc/include/asm/fsldma.h b/arch/powerpc/include/asm/fsldma.h
> index a67aeed..debc5ed 100644
> --- a/arch/powerpc/include/asm/fsldma.h
> +++ b/arch/powerpc/include/asm/fsldma.h
> @@ -11,6 +11,7 @@
>  #ifndef __ARCH_POWERPC_ASM_FSLDMA_H__
>  #define __ARCH_POWERPC_ASM_FSLDMA_H__
>  
> +#include <linux/slab.h>
>  #include <linux/dmaengine.h>
>  

It also needs list.h, but appears to get it via sheer luck.

The functions in that header simply shouldn't have been inlined.

It's peculiar that fsl_dma_slave_append() hardwires GFP_ATOMIC, whereas
fsl_dma_slave_alloc() takes a gfp_t.

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

* Re: [PATCH] fsldma: fix missing header include
  2010-09-03 23:40 ` Andrew Morton
@ 2010-09-04  0:47   ` Ira W. Snyder
  2010-09-04  0:58     ` Andrew Morton
  0 siblings, 1 reply; 4+ messages in thread
From: Ira W. Snyder @ 2010-09-04  0:47 UTC (permalink / raw)
  To: Andrew Morton; +Cc: Dan Williams, linuxppc-dev, linux-kernel

On Fri, Sep 03, 2010 at 04:40:33PM -0700, Andrew Morton wrote:
> On Thu, 2 Sep 2010 12:47:52 -0700
> "Ira W. Snyder" <iws@ovro.caltech.edu> wrote:
> 
> > The slab.h header is required to use the kmalloc() family of functions.
> > Due to recent kernel changes, this header must be directly included by
> > code that calls into the memory allocator.
> > 
> > Signed-off-by: Ira W. Snyder <iws@ovro.caltech.edu>
> > ---
> > 
> > Without this patch, any code which includes this header fails to build.
> > 
> >  arch/powerpc/include/asm/fsldma.h |    1 +
> >  1 files changed, 1 insertions(+), 0 deletions(-)
> > 
> > diff --git a/arch/powerpc/include/asm/fsldma.h b/arch/powerpc/include/asm/fsldma.h
> > index a67aeed..debc5ed 100644
> > --- a/arch/powerpc/include/asm/fsldma.h
> > +++ b/arch/powerpc/include/asm/fsldma.h
> > @@ -11,6 +11,7 @@
> >  #ifndef __ARCH_POWERPC_ASM_FSLDMA_H__
> >  #define __ARCH_POWERPC_ASM_FSLDMA_H__
> >  
> > +#include <linux/slab.h>
> >  #include <linux/dmaengine.h>
> >  
> 
> It also needs list.h, but appears to get it via sheer luck.
> 
> The functions in that header simply shouldn't have been inlined.
> 
> It's peculiar that fsl_dma_slave_append() hardwires GFP_ATOMIC, whereas
> fsl_dma_slave_alloc() takes a gfp_t.
> 

Would you like a patch that moves the functions to drivers/dma/fsldma.c
and EXPORT_SYMBOL_GPL()'s them? I don't know the consequences to doing
so, which is why I avoided it when I wrote
arch/powerpc/include/asm/fsldma.h.

Thanks,
Ira

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

* Re: [PATCH] fsldma: fix missing header include
  2010-09-04  0:47   ` Ira W. Snyder
@ 2010-09-04  0:58     ` Andrew Morton
  0 siblings, 0 replies; 4+ messages in thread
From: Andrew Morton @ 2010-09-04  0:58 UTC (permalink / raw)
  To: Ira W. Snyder; +Cc: Dan Williams, linuxppc-dev, linux-kernel

On Fri, 3 Sep 2010 17:47:24 -0700 "Ira W. Snyder" <iws@ovro.caltech.edu> wrote:

> On Fri, Sep 03, 2010 at 04:40:33PM -0700, Andrew Morton wrote:
> > On Thu, 2 Sep 2010 12:47:52 -0700
> > "Ira W. Snyder" <iws@ovro.caltech.edu> wrote:
> > 
> > > The slab.h header is required to use the kmalloc() family of functions.
> > > Due to recent kernel changes, this header must be directly included by
> > > code that calls into the memory allocator.
> > > 
> > > Signed-off-by: Ira W. Snyder <iws@ovro.caltech.edu>
> > > ---
> > > 
> > > Without this patch, any code which includes this header fails to build.
> > > 
> > >  arch/powerpc/include/asm/fsldma.h |    1 +
> > >  1 files changed, 1 insertions(+), 0 deletions(-)
> > > 
> > > diff --git a/arch/powerpc/include/asm/fsldma.h b/arch/powerpc/include/asm/fsldma.h
> > > index a67aeed..debc5ed 100644
> > > --- a/arch/powerpc/include/asm/fsldma.h
> > > +++ b/arch/powerpc/include/asm/fsldma.h
> > > @@ -11,6 +11,7 @@
> > >  #ifndef __ARCH_POWERPC_ASM_FSLDMA_H__
> > >  #define __ARCH_POWERPC_ASM_FSLDMA_H__
> > >  
> > > +#include <linux/slab.h>
> > >  #include <linux/dmaengine.h>
> > >  
> > 
> > It also needs list.h, but appears to get it via sheer luck.
> > 
> > The functions in that header simply shouldn't have been inlined.
> > 
> > It's peculiar that fsl_dma_slave_append() hardwires GFP_ATOMIC, whereas
> > fsl_dma_slave_alloc() takes a gfp_t.
> > 
> 
> Would you like a patch that moves the functions to drivers/dma/fsldma.c
> and EXPORT_SYMBOL_GPL()'s them?

Sure, thanks.  Then I can harrass Dan with it ;)

> I don't know the consequences to doing
> so, which is why I avoided it when I wrote
> arch/powerpc/include/asm/fsldma.h.

The minimal fix for the bug was appropriate.

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

end of thread, other threads:[~2010-09-04  0:54 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-09-02 19:47 [PATCH] fsldma: fix missing header include Ira W. Snyder
2010-09-03 23:40 ` Andrew Morton
2010-09-04  0:47   ` Ira W. Snyder
2010-09-04  0:58     ` Andrew Morton

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).