Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit e585513b authored by Kirill A. Shutemov's avatar Kirill A. Shutemov Committed by Ingo Molnar
Browse files

x86/mm/gup: Switch GUP to the generic get_user_page_fast() implementation



This patch provides all required callbacks required by the generic
get_user_pages_fast() code and switches x86 over - and removes
the platform specific implementation.

Signed-off-by: default avatarKirill A. Shutemov <kirill.shutemov@linux.intel.com>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Andy Lutomirski <luto@amacapital.net>
Cc: Andy Lutomirski <luto@kernel.org>
Cc: Borislav Petkov <bp@alien8.de>
Cc: Brian Gerst <brgerst@gmail.com>
Cc: Dave Hansen <dave.hansen@intel.com>
Cc: Denys Vlasenko <dvlasenk@redhat.com>
Cc: H. Peter Anvin <hpa@zytor.com>
Cc: Josh Poimboeuf <jpoimboe@redhat.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: linux-arch@vger.kernel.org
Cc: linux-mm@kvack.org
Link: http://lkml.kernel.org/r/20170606113133.22974-2-kirill.shutemov@linux.intel.com


Signed-off-by: default avatarIngo Molnar <mingo@kernel.org>
parent 6c690ee1
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -1637,7 +1637,7 @@ config ARCH_SELECT_MEMORY_MODEL
config HAVE_ARCH_PFN_VALID
	def_bool ARCH_HAS_HOLES_MEMORYMODEL || !SPARSEMEM

config HAVE_GENERIC_RCU_GUP
config HAVE_GENERIC_GUP
	def_bool y
	depends on ARM_LPAE

+1 −1
Original line number Diff line number Diff line
@@ -205,7 +205,7 @@ config GENERIC_CALIBRATE_DELAY
config ZONE_DMA
	def_bool y

config HAVE_GENERIC_RCU_GUP
config HAVE_GENERIC_GUP
	def_bool y

config ARCH_DMA_ADDR_T_64BIT
+1 −1
Original line number Diff line number Diff line
@@ -184,7 +184,7 @@ config PPC
	select HAVE_FUNCTION_GRAPH_TRACER
	select HAVE_FUNCTION_TRACER
	select HAVE_GCC_PLUGINS
	select HAVE_GENERIC_RCU_GUP
	select HAVE_GENERIC_GUP
	select HAVE_HW_BREAKPOINT		if PERF_EVENTS && (PPC_BOOK3S || PPC_8xx)
	select HAVE_IDE
	select HAVE_IOREMAP_PROT
+3 −0
Original line number Diff line number Diff line
@@ -2797,6 +2797,9 @@ config X86_DMA_REMAP
	bool
	depends on STA2X11

config HAVE_GENERIC_GUP
	def_bool y

source "net/Kconfig"

source "drivers/Kconfig"
+0 −12
Original line number Diff line number Diff line
@@ -218,18 +218,6 @@ static inline int vma_pkey(struct vm_area_struct *vma)
}
#endif

static inline bool __pkru_allows_pkey(u16 pkey, bool write)
{
	u32 pkru = read_pkru();

	if (!__pkru_allows_read(pkru, pkey))
		return false;
	if (write && !__pkru_allows_write(pkru, pkey))
		return false;

	return true;
}

/*
 * We only want to enforce protection keys on the current process
 * because we effectively have no access to PKRU for other
Loading