diff options
author | Kirill A. Shutemov <kirill.shutemov@linux.intel.com> | 2017-06-06 07:31:20 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@kernel.org> | 2017-06-13 02:56:50 -0400 |
commit | e585513b76f7b05d08ca3fb250fed11f6ba46ee5 (patch) | |
tree | 3acce851002d4bcff876009b37be0554ba22be3d /mm/gup.c | |
parent | 6c690ee1039b251e583fc65b28da30e97d6a7385 (diff) |
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 <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: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'mm/gup.c')
-rw-r--r-- | mm/gup.c | 10 |
1 files changed, 5 insertions, 5 deletions
@@ -1151,7 +1151,7 @@ struct page *get_dump_page(unsigned long addr) | |||
1151 | #endif /* CONFIG_ELF_CORE */ | 1151 | #endif /* CONFIG_ELF_CORE */ |
1152 | 1152 | ||
1153 | /* | 1153 | /* |
1154 | * Generic RCU Fast GUP | 1154 | * Generic Fast GUP |
1155 | * | 1155 | * |
1156 | * get_user_pages_fast attempts to pin user pages by walking the page | 1156 | * get_user_pages_fast attempts to pin user pages by walking the page |
1157 | * tables directly and avoids taking locks. Thus the walker needs to be | 1157 | * tables directly and avoids taking locks. Thus the walker needs to be |
@@ -1172,8 +1172,8 @@ struct page *get_dump_page(unsigned long addr) | |||
1172 | * Before activating this code, please be aware that the following assumptions | 1172 | * Before activating this code, please be aware that the following assumptions |
1173 | * are currently made: | 1173 | * are currently made: |
1174 | * | 1174 | * |
1175 | * *) HAVE_RCU_TABLE_FREE is enabled, and tlb_remove_table is used to free | 1175 | * *) Either HAVE_RCU_TABLE_FREE is enabled, and tlb_remove_table() is used to |
1176 | * pages containing page tables. | 1176 | * free pages containing page tables or TLB flushing requires IPI broadcast. |
1177 | * | 1177 | * |
1178 | * *) ptes can be read atomically by the architecture. | 1178 | * *) ptes can be read atomically by the architecture. |
1179 | * | 1179 | * |
@@ -1183,7 +1183,7 @@ struct page *get_dump_page(unsigned long addr) | |||
1183 | * | 1183 | * |
1184 | * This code is based heavily on the PowerPC implementation by Nick Piggin. | 1184 | * This code is based heavily on the PowerPC implementation by Nick Piggin. |
1185 | */ | 1185 | */ |
1186 | #ifdef CONFIG_HAVE_GENERIC_RCU_GUP | 1186 | #ifdef CONFIG_HAVE_GENERIC_GUP |
1187 | 1187 | ||
1188 | #ifndef gup_get_pte | 1188 | #ifndef gup_get_pte |
1189 | /* | 1189 | /* |
@@ -1673,4 +1673,4 @@ int get_user_pages_fast(unsigned long start, int nr_pages, int write, | |||
1673 | return ret; | 1673 | return ret; |
1674 | } | 1674 | } |
1675 | 1675 | ||
1676 | #endif /* CONFIG_HAVE_GENERIC_RCU_GUP */ | 1676 | #endif /* CONFIG_HAVE_GENERIC_GUP */ |