Re: [PATCH 11/16] mm: consolidate the get_user_pages* implementations

2019-06-25 Thread Jason Gunthorpe
On Tue, Jun 25, 2019 at 09:56:50AM +0200, Christoph Hellwig wrote: > On Fri, Jun 21, 2019 at 11:41:31AM -0300, Jason Gunthorpe wrote: > > > static bool gup_fast_permitted(unsigned long start, unsigned long end) > > > { > > > - return true; > > > + return IS_ENABLED(CONFIG_HAVE_FAST_GUP) ? true :

Re: [PATCH 11/16] mm: consolidate the get_user_pages* implementations

2019-06-25 Thread Christoph Hellwig
On Fri, Jun 21, 2019 at 11:41:31AM -0300, Jason Gunthorpe wrote: > > static bool gup_fast_permitted(unsigned long start, unsigned long end) > > { > > - return true; > > + return IS_ENABLED(CONFIG_HAVE_FAST_GUP) ? true : false; > > The ?: is needed with IS_ENABLED? It shouldn't, I'll fix it

Re: [PATCH 11/16] mm: consolidate the get_user_pages* implementations

2019-06-21 Thread Jason Gunthorpe
On Tue, Jun 11, 2019 at 04:40:57PM +0200, Christoph Hellwig wrote: > @@ -2168,7 +2221,7 @@ static void gup_pgd_range(unsigned long addr, unsigned > long end, > */ > static bool gup_fast_permitted(unsigned long start, unsigned long end) > { > - return true; > + return IS_ENABLED(CONFIG_

[PATCH 11/16] mm: consolidate the get_user_pages* implementations

2019-06-11 Thread Christoph Hellwig
Always build mm/gup.c, and move the nommu versions and replace the separate stubs for various functions by the default ones, with the _fast version always falling back to the slow path because gup_fast_permitted always returns false now if HAVE_FAST_GUP is not set, and we use the nommu version of _