public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] Add __vunmap prototype
@ 2007-05-14  7:07 Benjamin Herrenschmidt
  2007-05-14  7:16 ` Andrew Morton
  0 siblings, 1 reply; 4+ messages in thread
From: Benjamin Herrenschmidt @ 2007-05-14  7:07 UTC (permalink / raw)
  To: Andrew Morton; +Cc: linux-kernel

__vunmap is not static but I couldn't find a prototype for it, so this
adds it. I need to use it in some powerpc patch to come.

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>

 include/linux/vmalloc.h |    1 +
 1 file changed, 1 insertion(+)

Index: linux-cell/include/linux/vmalloc.h
===================================================================
--- linux-cell.orig/include/linux/vmalloc.h	2007-05-14 16:03:42.000000000 +1000
+++ linux-cell/include/linux/vmalloc.h	2007-05-14 16:03:47.000000000 +1000
@@ -50,6 +50,7 @@ extern void vfree(void *addr);
 extern void *vmap(struct page **pages, unsigned int count,
 			unsigned long flags, pgprot_t prot);
 extern void vunmap(void *addr);
+extern void __vunmap(void *addr, int deallocate_pages);
 
 extern int remap_vmalloc_range(struct vm_area_struct *vma, void *addr,
 							unsigned long pgoff);

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

* Re: [PATCH] Add __vunmap prototype
  2007-05-14  7:07 [PATCH] Add __vunmap prototype Benjamin Herrenschmidt
@ 2007-05-14  7:16 ` Andrew Morton
  2007-05-14  7:56   ` Benjamin Herrenschmidt
  0 siblings, 1 reply; 4+ messages in thread
From: Andrew Morton @ 2007-05-14  7:16 UTC (permalink / raw)
  To: Benjamin Herrenschmidt; +Cc: linux-kernel

On Mon, 14 May 2007 17:07:03 +1000 Benjamin Herrenschmidt <benh@kernel.crashing.org> wrote:

> __vunmap is not static but I couldn't find a prototype for it, so this
> adds it. I need to use it in some powerpc patch to come.
> 
> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
> 
>  include/linux/vmalloc.h |    1 +
>  1 file changed, 1 insertion(+)
> 
> Index: linux-cell/include/linux/vmalloc.h
> ===================================================================
> --- linux-cell.orig/include/linux/vmalloc.h	2007-05-14 16:03:42.000000000 +1000
> +++ linux-cell/include/linux/vmalloc.h	2007-05-14 16:03:47.000000000 +1000
> @@ -50,6 +50,7 @@ extern void vfree(void *addr);
>  extern void *vmap(struct page **pages, unsigned int count,
>  			unsigned long flags, pgprot_t prot);
>  extern void vunmap(void *addr);
> +extern void __vunmap(void *addr, int deallocate_pages);
>  
>  extern int remap_vmalloc_range(struct vm_area_struct *vma, void *addr,
>  							unsigned long pgoff);

um, the only possible reason for wanting to access __vunmap() is that you
want to do vunmap() from interrupt context, which is deadlockable.


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

* Re: [PATCH] Add __vunmap prototype
  2007-05-14  7:16 ` Andrew Morton
@ 2007-05-14  7:56   ` Benjamin Herrenschmidt
  2007-05-14  8:02     ` Satyam Sharma
  0 siblings, 1 reply; 4+ messages in thread
From: Benjamin Herrenschmidt @ 2007-05-14  7:56 UTC (permalink / raw)
  To: Andrew Morton; +Cc: linux-kernel

On Mon, 2007-05-14 at 00:16 -0700, Andrew Morton wrote:
> On Mon, 14 May 2007 17:07:03 +1000 Benjamin Herrenschmidt <benh@kernel.crashing.org> wrote:
> 
> > __vunmap is not static but I couldn't find a prototype for it, so this
> > adds it. I need to use it in some powerpc patch to come.
> > 
> > Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
> > 
> >  include/linux/vmalloc.h |    1 +
> >  1 file changed, 1 insertion(+)
> > 
> > Index: linux-cell/include/linux/vmalloc.h
> > ===================================================================
> > --- linux-cell.orig/include/linux/vmalloc.h	2007-05-14 16:03:42.000000000 +1000
> > +++ linux-cell/include/linux/vmalloc.h	2007-05-14 16:03:47.000000000 +1000
> > @@ -50,6 +50,7 @@ extern void vfree(void *addr);
> >  extern void *vmap(struct page **pages, unsigned int count,
> >  			unsigned long flags, pgprot_t prot);
> >  extern void vunmap(void *addr);
> > +extern void __vunmap(void *addr, int deallocate_pages);
> >  
> >  extern int remap_vmalloc_range(struct vm_area_struct *vma, void *addr,
> >  							unsigned long pgoff);
> 
> um, the only possible reason for wanting to access __vunmap() is that you
> want to do vunmap() from interrupt context, which is deadlockable.

Argh... I'm stupid, ignore it !

I just want to __vunmap(addr, 0); which is just what vunmap() does :-)

Why is __vunmap not static btw ? If there's no reason, I'll send a patch
to make it so.

Ben.



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

* Re: [PATCH] Add __vunmap prototype
  2007-05-14  7:56   ` Benjamin Herrenschmidt
@ 2007-05-14  8:02     ` Satyam Sharma
  0 siblings, 0 replies; 4+ messages in thread
From: Satyam Sharma @ 2007-05-14  8:02 UTC (permalink / raw)
  To: Benjamin Herrenschmidt; +Cc: Andrew Morton, linux-kernel

On 5/14/07, Benjamin Herrenschmidt <benh@kernel.crashing.org> wrote:
> On Mon, 2007-05-14 at 00:16 -0700, Andrew Morton wrote:
> > On Mon, 14 May 2007 17:07:03 +1000 Benjamin Herrenschmidt <benh@kernel.crashing.org> wrote:
> >
> > > __vunmap is not static but I couldn't find a prototype for it, so this
> > > adds it. I need to use it in some powerpc patch to come.
> > >
> > > Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
> > >
> > >  include/linux/vmalloc.h |    1 +
> > >  1 file changed, 1 insertion(+)
> > >
> > > Index: linux-cell/include/linux/vmalloc.h
> > > ===================================================================
> > > --- linux-cell.orig/include/linux/vmalloc.h 2007-05-14 16:03:42.000000000 +1000
> > > +++ linux-cell/include/linux/vmalloc.h      2007-05-14 16:03:47.000000000 +1000
> > > @@ -50,6 +50,7 @@ extern void vfree(void *addr);
> > >  extern void *vmap(struct page **pages, unsigned int count,
> > >                     unsigned long flags, pgprot_t prot);
> > >  extern void vunmap(void *addr);
> > > +extern void __vunmap(void *addr, int deallocate_pages);
> > >
> > >  extern int remap_vmalloc_range(struct vm_area_struct *vma, void *addr,
> > >                                                     unsigned long pgoff);
> >
> > um, the only possible reason for wanting to access __vunmap() is that you
> > want to do vunmap() from interrupt context, which is deadlockable.
>
> Argh... I'm stupid, ignore it !
>
> I just want to __vunmap(addr, 0); which is just what vunmap() does :-)
>
> Why is __vunmap not static btw ? If there's no reason, I'll send a patch
> to make it so.

Yeah, it has no users outside mm/vmalloc.c and is not
EXPORT_SYMBOL'ed anyway (plus it's a BUG from in_interrupt() as
Andrew says, so must be called as either vfree() or vunmap()), so clearly
it does want to be static.

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

end of thread, other threads:[~2007-05-14  8:02 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-05-14  7:07 [PATCH] Add __vunmap prototype Benjamin Herrenschmidt
2007-05-14  7:16 ` Andrew Morton
2007-05-14  7:56   ` Benjamin Herrenschmidt
2007-05-14  8:02     ` Satyam Sharma

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox