0001
0002 #ifndef _ASM_GENERIC_CACHEFLUSH_H
0003 #define _ASM_GENERIC_CACHEFLUSH_H
0004
0005 struct mm_struct;
0006 struct vm_area_struct;
0007 struct page;
0008 struct address_space;
0009
0010
0011
0012
0013
0014 #ifndef flush_cache_all
0015 static inline void flush_cache_all(void)
0016 {
0017 }
0018 #endif
0019
0020 #ifndef flush_cache_mm
0021 static inline void flush_cache_mm(struct mm_struct *mm)
0022 {
0023 }
0024 #endif
0025
0026 #ifndef flush_cache_dup_mm
0027 static inline void flush_cache_dup_mm(struct mm_struct *mm)
0028 {
0029 }
0030 #endif
0031
0032 #ifndef flush_cache_range
0033 static inline void flush_cache_range(struct vm_area_struct *vma,
0034 unsigned long start,
0035 unsigned long end)
0036 {
0037 }
0038 #endif
0039
0040 #ifndef flush_cache_page
0041 static inline void flush_cache_page(struct vm_area_struct *vma,
0042 unsigned long vmaddr,
0043 unsigned long pfn)
0044 {
0045 }
0046 #endif
0047
0048 #ifndef ARCH_IMPLEMENTS_FLUSH_DCACHE_PAGE
0049 static inline void flush_dcache_page(struct page *page)
0050 {
0051 }
0052
0053 #define ARCH_IMPLEMENTS_FLUSH_DCACHE_PAGE 0
0054 #endif
0055
0056 #ifndef flush_dcache_mmap_lock
0057 static inline void flush_dcache_mmap_lock(struct address_space *mapping)
0058 {
0059 }
0060 #endif
0061
0062 #ifndef flush_dcache_mmap_unlock
0063 static inline void flush_dcache_mmap_unlock(struct address_space *mapping)
0064 {
0065 }
0066 #endif
0067
0068 #ifndef flush_icache_range
0069 static inline void flush_icache_range(unsigned long start, unsigned long end)
0070 {
0071 }
0072 #endif
0073
0074 #ifndef flush_icache_user_range
0075 #define flush_icache_user_range flush_icache_range
0076 #endif
0077
0078 #ifndef flush_icache_page
0079 static inline void flush_icache_page(struct vm_area_struct *vma,
0080 struct page *page)
0081 {
0082 }
0083 #endif
0084
0085 #ifndef flush_icache_user_page
0086 static inline void flush_icache_user_page(struct vm_area_struct *vma,
0087 struct page *page,
0088 unsigned long addr, int len)
0089 {
0090 }
0091 #endif
0092
0093 #ifndef flush_cache_vmap
0094 static inline void flush_cache_vmap(unsigned long start, unsigned long end)
0095 {
0096 }
0097 #endif
0098
0099 #ifndef flush_cache_vunmap
0100 static inline void flush_cache_vunmap(unsigned long start, unsigned long end)
0101 {
0102 }
0103 #endif
0104
0105 #ifndef copy_to_user_page
0106 #define copy_to_user_page(vma, page, vaddr, dst, src, len) \
0107 do { \
0108 memcpy(dst, src, len); \
0109 flush_icache_user_page(vma, page, vaddr, len); \
0110 } while (0)
0111 #endif
0112
0113 #ifndef copy_from_user_page
0114 #define copy_from_user_page(vma, page, vaddr, dst, src, len) \
0115 memcpy(dst, src, len)
0116 #endif
0117
0118 #endif