aboutsummaryrefslogtreecommitdiffstats
path: root/include/asm-v850/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-v850/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-v850/cacheflush.h')
-rw-r--r--include/asm-v850/cacheflush.h69
1 files changed, 69 insertions, 0 deletions
diff --git a/include/asm-v850/cacheflush.h b/include/asm-v850/cacheflush.h
new file mode 100644
index 000000000000..e1a87f82f1a4
--- /dev/null
+++ b/include/asm-v850/cacheflush.h
@@ -0,0 +1,69 @@
1/*
2 * include/asm-v850/cacheflush.h
3 *
4 * Copyright (C) 2001,02,03 NEC Electronics Corporation
5 * Copyright (C) 2001,02,03 Miles Bader <miles@gnu.org>
6 *
7 * This file is subject to the terms and conditions of the GNU General
8 * Public License. See the file COPYING in the main directory of this
9 * archive for more details.
10 *
11 * Written by Miles Bader <miles@gnu.org>
12 */
13
14#ifndef __V850_CACHEFLUSH_H__
15#define __V850_CACHEFLUSH_H__
16
17/* Somebody depends on this; sigh... */
18#include <linux/mm.h>
19
20#include <asm/machdep.h>
21
22
23/* The following are all used by the kernel in ways that only affect
24 systems with MMUs, so we don't need them. */
25#define flush_cache_all() ((void)0)
26#define flush_cache_mm(mm) ((void)0)
27#define flush_cache_range(vma, start, end) ((void)0)
28#define flush_cache_page(vma, vmaddr, pfn) ((void)0)
29#define flush_dcache_page(page) ((void)0)
30#define flush_dcache_mmap_lock(mapping) ((void)0)
31#define flush_dcache_mmap_unlock(mapping) ((void)0)
32#define flush_cache_vmap(start, end) ((void)0)
33#define flush_cache_vunmap(start, end) ((void)0)
34
35#ifdef CONFIG_NO_CACHE
36
37/* Some systems have no cache at all, in which case we don't need these
38 either. */
39#define flush_icache() ((void)0)
40#define flush_icache_range(start, end) ((void)0)
41#define flush_icache_page(vma,pg) ((void)0)
42#define flush_icache_user_range(vma,pg,adr,len) ((void)0)
43#define flush_cache_sigtramp(vaddr) ((void)0)
44
45#else /* !CONFIG_NO_CACHE */
46
47struct page;
48struct mm_struct;
49struct vm_area_struct;
50
51/* Otherwise, somebody had better define them. */
52extern void flush_icache (void);
53extern void flush_icache_range (unsigned long start, unsigned long end);
54extern void flush_icache_page (struct vm_area_struct *vma, struct page *page);
55extern void flush_icache_user_range (struct vm_area_struct *vma,
56 struct page *page,
57 unsigned long adr, int len);
58extern void flush_cache_sigtramp (unsigned long addr);
59
60#endif /* CONFIG_NO_CACHE */
61
62#define copy_to_user_page(vma, page, vaddr, dst, src, len) \
63do { memcpy(dst, src, len); \
64 flush_icache_user_range(vma, page, vaddr, len); \
65} while (0)
66#define copy_from_user_page(vma, page, vaddr, dst, src, len) \
67 memcpy(dst, src, len)
68
69#endif /* __V850_CACHEFLUSH_H__ */