powerpc: remove CONFIG_PCI_QSPAN
[linux/fpc-iii.git] / arch / csky / abiv1 / inc / abi / cacheflush.h
blob5f663aef9b1b8b019ed0a631a681ddcdc827d93f
1 /* SPDX-License-Identifier: GPL-2.0 */
2 // Copyright (C) 2018 Hangzhou C-SKY Microsystems co.,ltd.
4 #ifndef __ABI_CSKY_CACHEFLUSH_H
5 #define __ABI_CSKY_CACHEFLUSH_H
7 #include <linux/compiler.h>
8 #include <asm/string.h>
9 #include <asm/cache.h>
11 #define ARCH_IMPLEMENTS_FLUSH_DCACHE_PAGE 1
12 extern void flush_dcache_page(struct page *);
14 #define flush_cache_mm(mm) cache_wbinv_all()
15 #define flush_cache_page(vma, page, pfn) cache_wbinv_all()
16 #define flush_cache_dup_mm(mm) cache_wbinv_all()
19 * if (current_mm != vma->mm) cache_wbinv_range(start, end) will be broken.
20 * Use cache_wbinv_all() here and need to be improved in future.
22 #define flush_cache_range(vma, start, end) cache_wbinv_all()
23 #define flush_cache_vmap(start, end) cache_wbinv_range(start, end)
24 #define flush_cache_vunmap(start, end) cache_wbinv_range(start, end)
26 #define flush_icache_page(vma, page) cache_wbinv_all()
27 #define flush_icache_range(start, end) cache_wbinv_range(start, end)
29 #define flush_icache_user_range(vma, pg, adr, len) \
30 cache_wbinv_range(adr, adr + len)
32 #define copy_from_user_page(vma, page, vaddr, dst, src, len) \
33 do { \
34 cache_wbinv_all(); \
35 memcpy(dst, src, len); \
36 cache_wbinv_all(); \
37 } while (0)
39 #define copy_to_user_page(vma, page, vaddr, dst, src, len) \
40 do { \
41 cache_wbinv_all(); \
42 memcpy(dst, src, len); \
43 cache_wbinv_all(); \
44 } while (0)
46 #define flush_dcache_mmap_lock(mapping) do {} while (0)
47 #define flush_dcache_mmap_unlock(mapping) do {} while (0)
49 #endif /* __ABI_CSKY_CACHEFLUSH_H */