Merge tag 'iwlwifi-next-for-kalle-2014-12-30' of https://git.kernel.org/pub/scm/linux...
[cascardo/linux.git] / arch / hexagon / mm / cache.c
index 0c76c80..a7c6d82 100644 (file)
@@ -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);
+       }
+}