diff options
-rw-r--r-- | arch/microblaze/include/asm/cacheflush.h | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/arch/microblaze/include/asm/cacheflush.h b/arch/microblaze/include/asm/cacheflush.h index 7ebd955460d9..5a5d835ae16d 100644 --- a/arch/microblaze/include/asm/cacheflush.h +++ b/arch/microblaze/include/asm/cacheflush.h | |||
@@ -89,7 +89,9 @@ do { \ | |||
89 | #define flush_cache_vmap(start, end) do { } while (0) | 89 | #define flush_cache_vmap(start, end) do { } while (0) |
90 | #define flush_cache_vunmap(start, end) do { } while (0) | 90 | #define flush_cache_vunmap(start, end) do { } while (0) |
91 | #define flush_cache_mm(mm) do { } while (0) | 91 | #define flush_cache_mm(mm) do { } while (0) |
92 | #define flush_cache_page(vma, vmaddr, pfn) do { } while (0) | 92 | |
93 | #define flush_cache_page(vma, vmaddr, pfn) \ | ||
94 | flush_dcache_range(pfn << PAGE_SHIFT, (pfn << PAGE_SHIFT) + PAGE_SIZE); | ||
93 | 95 | ||
94 | /* MS: kgdb code use this macro, wrong len with FLASH */ | 96 | /* MS: kgdb code use this macro, wrong len with FLASH */ |
95 | #if 0 | 97 | #if 0 |
@@ -104,9 +106,13 @@ do { \ | |||
104 | #define copy_to_user_page(vma, page, vaddr, dst, src, len) \ | 106 | #define copy_to_user_page(vma, page, vaddr, dst, src, len) \ |
105 | do { \ | 107 | do { \ |
106 | u32 addr = virt_to_phys(dst); \ | 108 | u32 addr = virt_to_phys(dst); \ |
107 | invalidate_icache_range((unsigned) (addr), (unsigned) (addr) + (len));\ | ||
108 | memcpy((dst), (src), (len)); \ | 109 | memcpy((dst), (src), (len)); \ |
109 | flush_dcache_range((unsigned) (addr), (unsigned) (addr) + (len));\ | 110 | if (vma->vm_flags & VM_EXEC) { \ |
111 | invalidate_icache_range((unsigned) (addr), \ | ||
112 | (unsigned) (addr) + PAGE_SIZE); \ | ||
113 | flush_dcache_range((unsigned) (addr), \ | ||
114 | (unsigned) (addr) + PAGE_SIZE); \ | ||
115 | } \ | ||
110 | } while (0) | 116 | } while (0) |
111 | 117 | ||
112 | #define copy_from_user_page(vma, page, vaddr, dst, src, len) \ | 118 | #define copy_from_user_page(vma, page, vaddr, dst, src, len) \ |