Title: [9832] trunk/include/asm-generic/cacheflush.h: asm-generic/cacheflush.h: flush icache when copying to user pages
Revision
9832
Author
vapier
Date
2011-04-13 19:46:29 -0400 (Wed, 13 Apr 2011)

Log Message

asm-generic/cacheflush.h: flush icache when copying to user pages

The copy_to_user_page() function is supposed to flush the icache on the
memory that was written, but the current asm-generic version lacks that
logic.  While normally it isn't a big deal as the asm-generic version of
icache flushing is a stub, it is a deal for ports that want to use the
asm-generic version as a baseline and then overlay its own specific parts
(like icache flushing).

Modified Paths

Diff

Modified: trunk/include/asm-generic/cacheflush.h (9831 => 9832)


--- trunk/include/asm-generic/cacheflush.h	2011-04-13 23:25:29 UTC (rev 9831)
+++ trunk/include/asm-generic/cacheflush.h	2011-04-13 23:46:29 UTC (rev 9832)
@@ -24,7 +24,10 @@
 #define flush_cache_vunmap(start, end)		do { } while (0)
 
 #define copy_to_user_page(vma, page, vaddr, dst, src, len) \
-	memcpy(dst, src, len)
+	do { \
+		memcpy(dst, src, len); \
+		flush_icache_user_range(vma, page, vaddr, len); \
+	} while (0)
 #define copy_from_user_page(vma, page, vaddr, dst, src, len) \
 	memcpy(dst, src, len)
 
_______________________________________________
Linux-kernel-commits mailing list
[email protected]
https://blackfin.uclinux.org/mailman/listinfo/linux-kernel-commits

Reply via email to