1 // SPDX-License-Identifier: GPL-2.0-only 1 2 /* 3 * Copyright (C) 2017 ARM Ltd. 4 */ 5 6 #include <linux/uaccess.h> 7 #include <asm/barrier.h> 8 #include <asm/cacheflush.h> 9 10 void memcpy_flushcache(void *dst, const void * 11 { 12 /* 13 * We assume this should not be called 14 * non-cacheable memory, such that we 15 * barrier to order the cache maintena 16 */ 17 memcpy(dst, src, cnt); 18 dcache_clean_pop((unsigned long)dst, ( 19 } 20 EXPORT_SYMBOL_GPL(memcpy_flushcache); 21 22 unsigned long __copy_user_flushcache(void *to, 23 unsigned 24 { 25 unsigned long rc; 26 27 rc = raw_copy_from_user(to, from, n); 28 29 /* See above */ 30 dcache_clean_pop((unsigned long)to, (u 31 return rc; 32 } 33
Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.