This source file includes following definitions.
- memcpy_flushcache
- memcpy_page_flushcache
- __copy_user_flushcache
1
2
3
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 *src, size_t cnt)
11 {
12
13
14
15
16
17 memcpy(dst, src, cnt);
18 __clean_dcache_area_pop(dst, cnt);
19 }
20 EXPORT_SYMBOL_GPL(memcpy_flushcache);
21
22 void memcpy_page_flushcache(char *to, struct page *page, size_t offset,
23 size_t len)
24 {
25 memcpy_flushcache(to, page_address(page) + offset, len);
26 }
27
28 unsigned long __copy_user_flushcache(void *to, const void __user *from,
29 unsigned long n)
30 {
31 unsigned long rc;
32
33 uaccess_enable_not_uao();
34 rc = __arch_copy_from_user(to, from, n);
35 uaccess_disable_not_uao();
36
37
38 __clean_dcache_area_pop(to, n - rc);
39 return rc;
40 }