Go to the documentation of this file.
15 #ifndef _ASM_MICROBLAZE_CACHEFLUSH_H
16 #define _ASM_MICROBLAZE_CACHEFLUSH_H
57 #define enable_icache() mbc->ie();
58 #define disable_icache() mbc->id();
59 #define flush_icache() mbc->ifl();
60 #define flush_icache_range(start, end) mbc->iflr(start, end);
61 #define invalidate_icache() mbc->iin();
62 #define invalidate_icache_range(start, end) mbc->iinr(start, end);
64 #define flush_icache_user_range(vma, pg, adr, len) flush_icache();
65 #define flush_icache_page(vma, pg) do { } while (0)
67 #define enable_dcache() mbc->de();
68 #define disable_dcache() mbc->dd();
70 #define invalidate_dcache() mbc->din();
71 #define invalidate_dcache_range(start, end) mbc->dinr(start, end);
72 #define flush_dcache() mbc->dfl();
73 #define flush_dcache_range(start, end) mbc->dflr(start, end);
75 #define ARCH_IMPLEMENTS_FLUSH_DCACHE_PAGE 1
77 #define flush_dcache_page(page) \
79 unsigned long addr = (unsigned long) page_address(page); \
80 addr = (u32)virt_to_phys((void *)addr); \
81 flush_dcache_range((unsigned) (addr), (unsigned) (addr) + PAGE_SIZE); \
84 #define flush_dcache_mmap_lock(mapping) do { } while (0)
85 #define flush_dcache_mmap_unlock(mapping) do { } while (0)
87 #define flush_cache_dup_mm(mm) do { } while (0)
88 #define flush_cache_vmap(start, end) do { } while (0)
89 #define flush_cache_vunmap(start, end) do { } while (0)
90 #define flush_cache_mm(mm) do { } while (0)
92 #define flush_cache_page(vma, vmaddr, pfn) \
93 flush_dcache_range(pfn << PAGE_SHIFT, (pfn << PAGE_SHIFT) + PAGE_SIZE);
97 #define flush_cache_range(vma, start, len) { \
98 flush_icache_range((unsigned) (start), (unsigned) (start) + (len)); \
99 flush_dcache_range((unsigned) (start), (unsigned) (start) + (len)); \
103 #define flush_cache_range(vma, start, len) do { } while (0)
105 #define copy_to_user_page(vma, page, vaddr, dst, src, len) \
107 u32 addr = virt_to_phys(dst); \
108 memcpy((dst), (src), (len)); \
109 if (vma->vm_flags & VM_EXEC) { \
110 invalidate_icache_range((unsigned) (addr), \
111 (unsigned) (addr) + PAGE_SIZE); \
112 flush_dcache_range((unsigned) (addr), \
113 (unsigned) (addr) + PAGE_SIZE); \
117 #define copy_from_user_page(vma, page, vaddr, dst, src, len) \
119 memcpy((dst), (src), (len)); \