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

Commit 2947ba05 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: Aneesh Kumar K . V <aneesh.kumar@linux.vnet.ibm.com>
Cc: Borislav Petkov <bp@alien8.de>
Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: Dann Frazier <dann.frazier@canonical.com>
Cc: Dave Hansen <dave.hansen@intel.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: Steve Capper <steve.capper@linaro.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: linux-arch@vger.kernel.org
Cc: linux-mm@kvack.org
Link: http://lkml.kernel.org/r/20170316213906.89528-1-kirill.shutemov@linux.intel.com


[ Minor readability edits. ]
Signed-off-by: default avatarIngo Molnar <mingo@kernel.org>
parent 73e10a61
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -1666,7 +1666,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
@@ -135,7 +135,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
@@ -2788,6 +2788,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
@@ -220,18 +220,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