MOXA linux-2.6.x / linux-2.6.19-uc1 from UC-7110-LX-BOOTLOADER-1.9_VERSION-4.2.tgz
[linux-2.6.19-moxart.git] / include / asm-nios2nommu / cacheflush.h
blob4543201db69b3b297911cbca88eb7b213af383e6
1 #ifndef _NIOS2NOMMU_CACHEFLUSH_H
2 #define _NIOS2NOMMU_CACHEFLUSH_H
4 /*
5 * Ported from m68knommu.
7 * (C) Copyright 2003, Microtronix Datacom Ltd.
8 * (C) Copyright 2000-2002, Greg Ungerer <gerg@snapgear.com>
10 * All rights reserved.
12 * This program is free software; you can redistribute it and/or modify
13 * it under the terms of the GNU General Public License as published by
14 * the Free Software Foundation; either version 2 of the License, or
15 * (at your option) any later version.
17 * This program is distributed in the hope that it will be useful, but
18 * WITHOUT ANY WARRANTY; without even the implied warranty of
19 * MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE, GOOD TITLE or
20 * NON INFRINGEMENT. See the GNU General Public License for more
21 * details.
23 * You should have received a copy of the GNU General Public License
24 * along with this program; if not, write to the Free Software
25 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
28 #include <linux/mm.h>
30 extern void cache_push (unsigned long vaddr, int len);
31 extern void dcache_push (unsigned long vaddr, int len);
32 extern void icache_push (unsigned long vaddr, int len);
33 extern void cache_push_all (void);
34 extern void cache_clear (unsigned long paddr, int len);
36 #define flush_cache_all() __flush_cache_all()
37 #define flush_cache_mm(mm) do { } while (0)
38 #define flush_cache_range(vma, start, end) cache_push(start, end - start)
39 #define flush_cache_page(vma, vmaddr) do { } while (0)
40 #define flush_dcache_range(start,end) dcache_push(start, end - start)
41 #define flush_dcache_page(page) do { } while (0)
42 #define flush_dcache_mmap_lock(mapping) do { } while (0)
43 #define flush_dcache_mmap_unlock(mapping) do { } while (0)
44 #define flush_icache_range(start,end) cache_push(start, end - start)
45 #define flush_icache_page(vma,pg) do { } while (0)
46 #define flush_icache_user_range(vma,pg,adr,len) do { } while (0)
48 #define copy_to_user_page(vma, page, vaddr, dst, src, len) \
49 memcpy(dst, src, len)
50 #define copy_from_user_page(vma, page, vaddr, dst, src, len) \
51 memcpy(dst, src, len)
54 extern inline void __flush_cache_all(void)
56 cache_push_all();
59 #endif /* _NIOS2NOMMU_CACHEFLUSH_H */