mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 03:27:44 -04:00
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: Kirill A. Shutemov <[email protected]> Cc: Andrew Morton <[email protected]> Cc: Andy Lutomirski <[email protected]> Cc: Andy Lutomirski <[email protected]> Cc: Borislav Petkov <[email protected]> Cc: Brian Gerst <[email protected]> Cc: Dave Hansen <[email protected]> Cc: Denys Vlasenko <[email protected]> Cc: H. Peter Anvin <[email protected]> Cc: Josh Poimboeuf <[email protected]> Cc: Linus Torvalds <[email protected]> Cc: Peter Zijlstra <[email protected]> Cc: Thomas Gleixner <[email protected]> Cc: [email protected] Cc: [email protected] Link: http://lkml.kernel.org/r/[email protected] Signed-off-by: Ingo Molnar <[email protected]>
This commit is contained in:
parent
6c690ee103
commit
e585513b76
12 changed files with 128 additions and 519 deletions
10
mm/gup.c
10
mm/gup.c
|
|
@ -1151,7 +1151,7 @@ struct page *get_dump_page(unsigned long addr)
|
|||
#endif /* CONFIG_ELF_CORE */
|
||||
|
||||
/*
|
||||
* Generic RCU Fast GUP
|
||||
* Generic Fast GUP
|
||||
*
|
||||
* get_user_pages_fast attempts to pin user pages by walking the page
|
||||
* tables directly and avoids taking locks. Thus the walker needs to be
|
||||
|
|
@ -1172,8 +1172,8 @@ struct page *get_dump_page(unsigned long addr)
|
|||
* Before activating this code, please be aware that the following assumptions
|
||||
* are currently made:
|
||||
*
|
||||
* *) HAVE_RCU_TABLE_FREE is enabled, and tlb_remove_table is used to free
|
||||
* pages containing page tables.
|
||||
* *) Either HAVE_RCU_TABLE_FREE is enabled, and tlb_remove_table() is used to
|
||||
* free pages containing page tables or TLB flushing requires IPI broadcast.
|
||||
*
|
||||
* *) ptes can be read atomically by the architecture.
|
||||
*
|
||||
|
|
@ -1183,7 +1183,7 @@ struct page *get_dump_page(unsigned long addr)
|
|||
*
|
||||
* This code is based heavily on the PowerPC implementation by Nick Piggin.
|
||||
*/
|
||||
#ifdef CONFIG_HAVE_GENERIC_RCU_GUP
|
||||
#ifdef CONFIG_HAVE_GENERIC_GUP
|
||||
|
||||
#ifndef gup_get_pte
|
||||
/*
|
||||
|
|
@ -1673,4 +1673,4 @@ int get_user_pages_fast(unsigned long start, int nr_pages, int write,
|
|||
return ret;
|
||||
}
|
||||
|
||||
#endif /* CONFIG_HAVE_GENERIC_RCU_GUP */
|
||||
#endif /* CONFIG_HAVE_GENERIC_GUP */
|
||||
|
|
|
|||
Loading…
Reference in a new issue