aboutsummaryrefslogtreecommitdiffstats
path: root/include/asm-sh/cacheflush.h
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@ppc970.osdl.org>2005-04-16 18:20:36 -0400
committerLinus Torvalds <torvalds@ppc970.osdl.org>2005-04-16 18:20:36 -0400
commit1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 (patch)
tree0bba044c4ce775e45a88a51686b5d9f90697ea9d /include/asm-sh/cacheflush.h
Linux-2.6.12-rc2v2.6.12-rc2
Initial git repository build. I'm not bothering with the full history, even though we have it. We can create a separate "historical" git archive of that later if we want to, and in the meantime it's about 3.2GB when imported into git - space that would just make the early git days unnecessarily complicated, when we don't have a lot of good infrastructure for it. Let it rip!
Diffstat (limited to 'include/asm-sh/cacheflush.h')
-rw-r--r--include/asm-sh/cacheflush.h31
1 files changed, 31 insertions, 0 deletions
diff --git a/include/asm-sh/cacheflush.h b/include/asm-sh/cacheflush.h
new file mode 100644
index 000000000000..9dfb33edb008
--- /dev/null
+++ b/include/asm-sh/cacheflush.h
@@ -0,0 +1,31 @@
1#ifndef __ASM_SH_CACHEFLUSH_H
2#define __ASM_SH_CACHEFLUSH_H
3#ifdef __KERNEL__
4
5#include <asm/cpu/cacheflush.h>
6
7/* Flush (write-back only) a region (smaller than a page) */
8extern void __flush_wback_region(void *start, int size);
9/* Flush (write-back & invalidate) a region (smaller than a page) */
10extern void __flush_purge_region(void *start, int size);
11/* Flush (invalidate only) a region (smaller than a page) */
12extern void __flush_invalidate_region(void *start, int size);
13
14#define flush_cache_vmap(start, end) flush_cache_all()
15#define flush_cache_vunmap(start, end) flush_cache_all()
16
17#define copy_to_user_page(vma, page, vaddr, dst, src, len) \
18 do { \
19 flush_cache_page(vma, vaddr, page_to_pfn(page));\
20 memcpy(dst, src, len); \
21 flush_icache_user_range(vma, page, vaddr, len); \
22 } while (0)
23
24#define copy_from_user_page(vma, page, vaddr, dst, src, len) \
25 do { \
26 flush_cache_page(vma, vaddr, page_to_pfn(page));\
27 memcpy(dst, src, len); \
28 } while (0)
29
30#endif /* __KERNEL__ */
31#endif /* __ASM_SH_CACHEFLUSH_H */