aboutsummaryrefslogtreecommitdiffstats
path: root/arch/hexagon/mm/cache.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/hexagon/mm/cache.c')
-rw-r--r--arch/hexagon/mm/cache.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/arch/hexagon/mm/cache.c b/arch/hexagon/mm/cache.c
index 0c76c802e31c..a7c6d827d8b6 100644
--- a/arch/hexagon/mm/cache.c
+++ b/arch/hexagon/mm/cache.c
@@ -127,3 +127,13 @@ void flush_cache_all_hexagon(void)
local_irq_restore(flags);
mb();
}
+
+void copy_to_user_page(struct vm_area_struct *vma, struct page *page,
+ unsigned long vaddr, void *dst, void *src, int len)
+{
+ memcpy(dst, src, len);
+ if (vma->vm_flags & VM_EXEC) {
+ flush_icache_range((unsigned long) dst,
+ (unsigned long) dst + len);
+ }
+}