summaryrefslogtreecommitdiffstats
path: root/arch/microblaze/include/asm/cacheflush.h
diff options
context:
space:
mode:
authorLinus Torvalds2011-03-16 18:48:16 +0100
committerLinus Torvalds2011-03-16 18:48:16 +0100
commit51e8703bdf12e2481b205096c973a3ab6a8ca18b (patch)
treeed6b4131b8a613e9492488fb2b31d16bc9991ce1 /arch/microblaze/include/asm/cacheflush.h
parentsched.c: fix kernel-doc for runqueue_is_locked() (diff)
parentmicroblaze: Do not copy reset vectors/manual reset vector setup (diff)
downloadkernel-qcow2-linux-51e8703bdf12e2481b205096c973a3ab6a8ca18b.tar.gz
kernel-qcow2-linux-51e8703bdf12e2481b205096c973a3ab6a8ca18b.tar.xz
kernel-qcow2-linux-51e8703bdf12e2481b205096c973a3ab6a8ca18b.zip
Merge branch 'next' of git://git.monstr.eu/linux-2.6-microblaze
* 'next' of git://git.monstr.eu/linux-2.6-microblaze: (33 commits) microblaze: Do not copy reset vectors/manual reset vector setup microblaze: Fix _reset function microblaze: Fix microblaze init vectors microblaze: Fix circular headers dependency when ftrace is enabled. microblaze: Fix typo in Kconfig microblaze: Add missing export symbols for lib functions microblaze: Fix /dev/zero corruption from __clear_user() microblaze: Convert irq_chip to new functions microblaze: Select GENERIC_HARDIRQS_NO_DEPRECATED microblaze: Remove stale irq_chip.end microblaze: Fix sparse warnings - signal.c microblaze: Fix sparse warning - fault.c microblaze: Fix missing microblaze specific syscalls declaration microblaze: Fix sparse warnings - cache.c microblaze: Fix sparse warning - cpuinfo.h microblaze: Fix sparse warning - unwind.c microblaze: Fix sparse warning - consistent_alloc function microblaze: Fix sparse warnings - ptrace microblaze: Fix sparse warning - sw_exceptions microblaze: Fix sparse warning - timer.c ...
Diffstat (limited to 'arch/microblaze/include/asm/cacheflush.h')
-rw-r--r--arch/microblaze/include/asm/cacheflush.h13
1 files changed, 9 insertions, 4 deletions
diff --git a/arch/microblaze/include/asm/cacheflush.h b/arch/microblaze/include/asm/cacheflush.h
index 7ebd955460d9..0f553bc009a0 100644
--- a/arch/microblaze/include/asm/cacheflush.h
+++ b/arch/microblaze/include/asm/cacheflush.h
@@ -84,12 +84,13 @@ do { \
#define flush_dcache_mmap_lock(mapping) do { } while (0)
#define flush_dcache_mmap_unlock(mapping) do { } while (0)
-
#define flush_cache_dup_mm(mm) do { } while (0)
#define flush_cache_vmap(start, end) do { } while (0)
#define flush_cache_vunmap(start, end) do { } while (0)
#define flush_cache_mm(mm) do { } while (0)
-#define flush_cache_page(vma, vmaddr, pfn) do { } while (0)
+
+#define flush_cache_page(vma, vmaddr, pfn) \
+ flush_dcache_range(pfn << PAGE_SHIFT, (pfn << PAGE_SHIFT) + PAGE_SIZE);
/* MS: kgdb code use this macro, wrong len with FLASH */
#if 0
@@ -104,9 +105,13 @@ do { \
#define copy_to_user_page(vma, page, vaddr, dst, src, len) \
do { \
u32 addr = virt_to_phys(dst); \
- invalidate_icache_range((unsigned) (addr), (unsigned) (addr) + (len));\
memcpy((dst), (src), (len)); \
- flush_dcache_range((unsigned) (addr), (unsigned) (addr) + (len));\
+ if (vma->vm_flags & VM_EXEC) { \
+ invalidate_icache_range((unsigned) (addr), \
+ (unsigned) (addr) + PAGE_SIZE); \
+ flush_dcache_range((unsigned) (addr), \
+ (unsigned) (addr) + PAGE_SIZE); \
+ } \
} while (0)
#define copy_from_user_page(vma, page, vaddr, dst, src, len) \