aboutsummaryrefslogtreecommitdiffstats
path: root/include/asm-sh
diff options
context:
space:
mode:
authorPaul Mundt <lethal@linux-sh.org>2007-11-08 03:01:42 -0500
committerPaul Mundt <lethal@linux-sh.org>2007-11-08 03:01:42 -0500
commit541c54773173d95c8e99a7378a5bb63125c297f1 (patch)
tree59270b4498d0502f778e26978865e1e8c6eddc54 /include/asm-sh
parent6d1c76d4e76ef72fce5a7169430ab8f9a68d7924 (diff)
parentaf39c16bd843ee8bde495c8ccb95a5ca209f3051 (diff)
Merge branch 'page_colouring_despair'
Diffstat (limited to 'include/asm-sh')
-rw-r--r--include/asm-sh/cacheflush.h18
-rw-r--r--include/asm-sh/page.h11
2 files changed, 21 insertions, 8 deletions
diff --git a/include/asm-sh/cacheflush.h b/include/asm-sh/cacheflush.h
index aa558da08471..b91246153b7e 100644
--- a/include/asm-sh/cacheflush.h
+++ b/include/asm-sh/cacheflush.h
@@ -43,21 +43,31 @@ extern void __flush_purge_region(void *start, int size);
43extern void __flush_invalidate_region(void *start, int size); 43extern void __flush_invalidate_region(void *start, int size);
44#endif 44#endif
45 45
46#define flush_cache_vmap(start, end) flush_cache_all() 46#ifdef CONFIG_CPU_SH4
47#define flush_cache_vunmap(start, end) flush_cache_all() 47extern void copy_to_user_page(struct vm_area_struct *vma,
48 struct page *page, unsigned long vaddr, void *dst, const void *src,
49 unsigned long len);
48 50
49#define copy_to_user_page(vma, page, vaddr, dst, src, len) \ 51extern void copy_from_user_page(struct vm_area_struct *vma,
52 struct page *page, unsigned long vaddr, void *dst, const void *src,
53 unsigned long len);
54#else
55#define copy_to_user_page(vma, page, vaddr, dst, src, len) \
50 do { \ 56 do { \
51 flush_cache_page(vma, vaddr, page_to_pfn(page));\ 57 flush_cache_page(vma, vaddr, page_to_pfn(page));\
52 memcpy(dst, src, len); \ 58 memcpy(dst, src, len); \
53 flush_icache_user_range(vma, page, vaddr, len); \ 59 flush_icache_user_range(vma, page, vaddr, len); \
54 } while (0) 60 } while (0)
55 61
56#define copy_from_user_page(vma, page, vaddr, dst, src, len) \ 62#define copy_from_user_page(vma, page, vaddr, dst, src, len) \
57 do { \ 63 do { \
58 flush_cache_page(vma, vaddr, page_to_pfn(page));\ 64 flush_cache_page(vma, vaddr, page_to_pfn(page));\
59 memcpy(dst, src, len); \ 65 memcpy(dst, src, len); \
60 } while (0) 66 } while (0)
67#endif
68
69#define flush_cache_vmap(start, end) flush_cache_all()
70#define flush_cache_vunmap(start, end) flush_cache_all()
61 71
62#define HAVE_ARCH_UNMAPPED_AREA 72#define HAVE_ARCH_UNMAPPED_AREA
63 73
diff --git a/include/asm-sh/page.h b/include/asm-sh/page.h
index 3aa8b07da47d..d00a8fde7c7f 100644
--- a/include/asm-sh/page.h
+++ b/include/asm-sh/page.h
@@ -73,10 +73,13 @@ extern void copy_page_nommu(void *to, void *from);
73#if !defined(CONFIG_CACHE_OFF) && defined(CONFIG_MMU) && \ 73#if !defined(CONFIG_CACHE_OFF) && defined(CONFIG_MMU) && \
74 (defined(CONFIG_CPU_SH4) || defined(CONFIG_SH7705_CACHE_32KB)) 74 (defined(CONFIG_CPU_SH4) || defined(CONFIG_SH7705_CACHE_32KB))
75struct page; 75struct page;
76extern void clear_user_page(void *to, unsigned long address, struct page *pg); 76struct vm_area_struct;
77extern void copy_user_page(void *to, void *from, unsigned long address, struct page *pg); 77extern void clear_user_page(void *to, unsigned long address, struct page *page);
78extern void __clear_user_page(void *to, void *orig_to); 78#ifdef CONFIG_CPU_SH4
79extern void __copy_user_page(void *to, void *from, void *orig_to); 79extern void copy_user_highpage(struct page *to, struct page *from,
80 unsigned long vaddr, struct vm_area_struct *vma);
81#define __HAVE_ARCH_COPY_USER_HIGHPAGE
82#endif
80#else 83#else
81#define clear_user_page(page, vaddr, pg) clear_page(page) 84#define clear_user_page(page, vaddr, pg) clear_page(page)
82#define copy_user_page(to, from, vaddr, pg) copy_page(to, from) 85#define copy_user_page(to, from, vaddr, pg) copy_page(to, from)