Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

x86/uaccess: Remove memcpy_page_flushcache()

Commit 21b56c847753 ("iov_iter: get rid of separate bvec and xarray
callbacks") removed the calls to memcpy_page_flushcache().

In addition, memcpy_page_flushcache() uses the deprecated
kmap_atomic().

Remove the unused x86 memcpy_page_flushcache() implementation and
also get rid of one more kmap_atomic() user.

[ dhansen: tweak changelog ]

Signed-off-by: Ira Weiny <ira.weiny@intel.com>
Signed-off-by: Dave Hansen <dave.hansen@linux.intel.com>
Link: https://lore.kernel.org/all/20221230-kmap-x86-v1-1-15f1ecccab50%40intel.com

authored by

Ira Weiny and committed by
Dave Hansen
b9da86e3 8c3223a5

-11
-2
arch/x86/include/asm/uaccess_64.h
··· 62 62 unsigned size, int zerorest); 63 63 64 64 extern long __copy_user_flushcache(void *dst, const void __user *src, unsigned size); 65 - extern void memcpy_page_flushcache(char *to, struct page *page, size_t offset, 66 - size_t len); 67 65 68 66 static inline int 69 67 __copy_from_user_inatomic_nocache(void *dst, const void __user *src,
-9
arch/x86/lib/usercopy_64.c
··· 136 136 } 137 137 } 138 138 EXPORT_SYMBOL_GPL(__memcpy_flushcache); 139 - 140 - void memcpy_page_flushcache(char *to, struct page *page, size_t offset, 141 - size_t len) 142 - { 143 - char *from = kmap_atomic(page); 144 - 145 - memcpy_flushcache(to, from + offset, len); 146 - kunmap_atomic(from); 147 - } 148 139 #endif