JFS: Fix race in txLock
[linux-2.6/linux-acpi-2.6/ibm-acpi-2.6.git] / include / asm-sh / cacheflush.h
blob9dfb33edb00813368fdbfd87758358aed60a767c
1 #ifndef __ASM_SH_CACHEFLUSH_H
2 #define __ASM_SH_CACHEFLUSH_H
3 #ifdef __KERNEL__
5 #include <asm/cpu/cacheflush.h>
7 /* Flush (write-back only) a region (smaller than a page) */
8 extern void __flush_wback_region(void *start, int size);
9 /* Flush (write-back & invalidate) a region (smaller than a page) */
10 extern void __flush_purge_region(void *start, int size);
11 /* Flush (invalidate only) a region (smaller than a page) */
12 extern void __flush_invalidate_region(void *start, int size);
14 #define flush_cache_vmap(start, end) flush_cache_all()
15 #define flush_cache_vunmap(start, end) flush_cache_all()
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)
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)
30 #endif /* __KERNEL__ */
31 #endif /* __ASM_SH_CACHEFLUSH_H */