[Lguest] [PATCH 1/2] Export get_user_pages_fast
Andrew Morton
akpm at linux-foundation.org
Thu Jul 31 03:03:55 EST 2008
On Wed, 30 Jul 2008 18:47:36 +0300 Adrian Bunk <bunk at kernel.org> wrote:
> On Wed, Jul 30, 2008 at 03:35:23AM -0700, Andrew Morton wrote:
> > On Wed, 30 Jul 2008 14:38:55 +1000 Rusty Russell <rusty at rustcorp.com.au> wrote:
> >
> > > After all, it was made for lguest wasn't it? Still think it should be
> > > called get_current_pages() though.
> > >
> > > Signed-off-by: Rusty Russell <rusty at rustcorp.com.au>
> > > ---
> > > arch/x86/mm/gup.c | 2 ++
> > > 1 file changed, 2 insertions(+)
> > >
> > > diff -r cb465381f6d5 arch/x86/mm/gup.c
> > > --- a/arch/x86/mm/gup.c Wed Jul 30 10:18:44 2008 +1000
> > > +++ b/arch/x86/mm/gup.c Wed Jul 30 14:22:53 2008 +1000
> > > @@ -8,6 +8,7 @@
> > > #include <linux/mm.h>
> > > #include <linux/vmstat.h>
> > > #include <linux/highmem.h>
> > > +#include <linux/module.h>
> > >
> > > #include <asm/pgtable.h>
> > >
> > > @@ -296,3 +303,4 @@ slow_irqon:
> > > return ret;
> > > }
> > > }
> > > +EXPORT_SYMBOL_GPL(get_user_pages_fast);
> >
> > A regularly-occurring problem with an export like this is that someone
> > writes a driver and tests it on x86, then the driver explodes on an
> > architecture which didn't export the same symbol.
> >
> > So a better implementation might be to put
> >
> > #ifdef CONFIG_HAVE_GET_USER_PAGES_FAST
> > EXPORT_SYMBOL_GPL(get_user_pages_fast);
> > #endif
> >
> > into generic code somewhere.
>
> How would that help?
>
It would fix the problem which I described.
More information about the Lguest
mailing list