* [PATCH] asm-generic/cacheflush.h: flush icache when copying to user pages
@ 2011-04-13 23:45 Mike Frysinger
2011-05-24 1:53 ` Mike Frysinger
0 siblings, 1 reply; 2+ messages in thread
From: Mike Frysinger @ 2011-04-13 23:45 UTC (permalink / raw)
To: Arnd Bergmann; +Cc: linux-kernel
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).
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
---
include/asm-generic/cacheflush.h | 5 ++++-
1 files changed, 4 insertions(+), 1 deletions(-)
diff --git a/include/asm-generic/cacheflush.h b/include/asm-generic/cacheflush.h
index 57b5c3c..87bc536 100644
--- a/include/asm-generic/cacheflush.h
+++ b/include/asm-generic/cacheflush.h
@@ -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)
--
1.7.5.rc1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* [PATCH] asm-generic/cacheflush.h: flush icache when copying to user pages
2011-04-13 23:45 [PATCH] asm-generic/cacheflush.h: flush icache when copying to user pages Mike Frysinger
@ 2011-05-24 1:53 ` Mike Frysinger
0 siblings, 0 replies; 2+ messages in thread
From: Mike Frysinger @ 2011-05-24 1:53 UTC (permalink / raw)
To: Andrew Morton; +Cc: Arnd Bergmann, linux-kernel
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).
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
---
Andrew: could you pick this up ? i sent this a month ago and no-one noticed ...
include/asm-generic/cacheflush.h | 5 ++++-
1 files changed, 4 insertions(+), 1 deletions(-)
diff --git a/include/asm-generic/cacheflush.h b/include/asm-generic/cacheflush.h
index 57b5c3c..87bc536 100644
--- a/include/asm-generic/cacheflush.h
+++ b/include/asm-generic/cacheflush.h
@@ -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)
--
1.7.5.rc3
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2011-05-24 1:49 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-04-13 23:45 [PATCH] asm-generic/cacheflush.h: flush icache when copying to user pages Mike Frysinger
2011-05-24 1:53 ` Mike Frysinger
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.