x86/mm/gup: Simplify get_user_pages() PTE bit handling
authorDave Hansen <dave.hansen@linux.intel.com>
Fri, 12 Feb 2016 21:02:18 +0000 (13:02 -0800)
committerIngo Molnar <mingo@kernel.org>
Thu, 18 Feb 2016 08:32:44 +0000 (09:32 +0100)
commit1874f6895c92d991ccf85edcc55a0d9dd552d71c
treed0abdaa8d71abc9850fdbf8c8fa39696a6501e10
parentd4925e00d59698a201231cf99dce47d8b922bb34
x86/mm/gup: Simplify get_user_pages() PTE bit handling

The current get_user_pages() code is a wee bit more complicated
than it needs to be for pte bit checking.  Currently, it establishes
a mask of required pte _PAGE_* bits and ensures that the pte it
goes after has all those bits.

This consolidates the three identical copies of this code.

Signed-off-by: Dave Hansen <dave.hansen@linux.intel.com>
Reviewed-by: Thomas Gleixner <tglx@linutronix.de>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Andy Lutomirski <luto@amacapital.net>
Cc: Borislav Petkov <bp@alien8.de>
Cc: Brian Gerst <brgerst@gmail.com>
Cc: Dave Hansen <dave@sr71.net>
Cc: Denys Vlasenko <dvlasenk@redhat.com>
Cc: H. Peter Anvin <hpa@zytor.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Rik van Riel <riel@redhat.com>
Cc: linux-mm@kvack.org
Link: http://lkml.kernel.org/r/20160212210218.3A2D4045@viggo.jf.intel.com
Signed-off-by: Ingo Molnar <mingo@kernel.org>
arch/x86/mm/gup.c