From db1708fb0469f7968a91aa6dc31db9ef17f43200 Mon Sep 17 00:00:00 2001 From: Russell King Date: Fri, 30 Jan 2004 15:51:00 +0000 Subject: [PATCH] [ARM] Add comments for newish functions in cacheflush.h --- include/asm-arm/cacheflush.h | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/include/asm-arm/cacheflush.h b/include/asm-arm/cacheflush.h index a88a0d97e62c2..ba660c9524c1d 100644 --- a/include/asm-arm/cacheflush.h +++ b/include/asm-arm/cacheflush.h @@ -209,8 +209,21 @@ extern void dmac_flush_range(unsigned long, unsigned long); #endif +/* + * flush_cache_vmap() is used when creating mappings (eg, via vmap, + * vmalloc, ioremap etc) in kernel space for pages. Since the + * direct-mappings of these pages may contain cached data, we need + * to do a full cache flush to ensure that writebacks don't corrupt + * data placed into these pages via the new mappings. + */ #define flush_cache_vmap(start, end) flush_cache_all() #define flush_cache_vunmap(start, end) flush_cache_all() + +/* + * Copy user data from/to a page which is mapped into a different + * processes address space. Really, we want to allow our "user + * space" model to handle this. + */ #define copy_to_user_page(vma, page, vaddr, dst, src, len) \ do { memcpy(dst, src, len); \ flush_icache_user_range(vma, page, vaddr, len); \ -- 2.53.0