diff options
author | Russell King <rmk@dyn-67.arm.linux.org.uk> | 2008-10-31 12:32:19 -0400 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2008-11-27 18:53:48 -0500 |
commit | 303c6443659bc1dc911356f5de149f48ff1d97b8 (patch) | |
tree | 75da0aef28ec8e843cdeb24c96349bdf812e2740 /arch/arm/include/asm/page.h | |
parent | 063b0a4207e43acbeff3d4b09f43e750e0212b48 (diff) |
[ARM] clearpage: provide our own clear_user_highpage()
For similar reasons as copy_user_page(), we want to avoid the
additional kmap_atomic if it's unnecessary.
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'arch/arm/include/asm/page.h')
-rw-r--r-- | arch/arm/include/asm/page.h | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/arch/arm/include/asm/page.h b/arch/arm/include/asm/page.h index 1581b8cf8f33..77747df713b4 100644 --- a/arch/arm/include/asm/page.h +++ b/arch/arm/include/asm/page.h | |||
@@ -111,7 +111,7 @@ | |||
111 | struct page; | 111 | struct page; |
112 | 112 | ||
113 | struct cpu_user_fns { | 113 | struct cpu_user_fns { |
114 | void (*cpu_clear_user_page)(void *p, unsigned long user); | 114 | void (*cpu_clear_user_highpage)(struct page *page, unsigned long vaddr); |
115 | void (*cpu_copy_user_highpage)(struct page *to, struct page *from, | 115 | void (*cpu_copy_user_highpage)(struct page *to, struct page *from, |
116 | unsigned long vaddr); | 116 | unsigned long vaddr); |
117 | }; | 117 | }; |
@@ -119,20 +119,21 @@ struct cpu_user_fns { | |||
119 | #ifdef MULTI_USER | 119 | #ifdef MULTI_USER |
120 | extern struct cpu_user_fns cpu_user; | 120 | extern struct cpu_user_fns cpu_user; |
121 | 121 | ||
122 | #define __cpu_clear_user_page cpu_user.cpu_clear_user_page | 122 | #define __cpu_clear_user_highpage cpu_user.cpu_clear_user_highpage |
123 | #define __cpu_copy_user_highpage cpu_user.cpu_copy_user_highpage | 123 | #define __cpu_copy_user_highpage cpu_user.cpu_copy_user_highpage |
124 | 124 | ||
125 | #else | 125 | #else |
126 | 126 | ||
127 | #define __cpu_clear_user_page __glue(_USER,_clear_user_page) | 127 | #define __cpu_clear_user_highpage __glue(_USER,_clear_user_highpage) |
128 | #define __cpu_copy_user_highpage __glue(_USER,_copy_user_highpage) | 128 | #define __cpu_copy_user_highpage __glue(_USER,_copy_user_highpage) |
129 | 129 | ||
130 | extern void __cpu_clear_user_page(void *p, unsigned long user); | 130 | extern void __cpu_clear_user_highpage(struct page *page, unsigned long vaddr); |
131 | extern void __cpu_copy_user_highpage(struct page *to, struct page *from, | 131 | extern void __cpu_copy_user_highpage(struct page *to, struct page *from, |
132 | unsigned long vaddr); | 132 | unsigned long vaddr); |
133 | #endif | 133 | #endif |
134 | 134 | ||
135 | #define clear_user_page(addr,vaddr,pg) __cpu_clear_user_page(addr, vaddr) | 135 | #define clear_user_highpage(page,vaddr) \ |
136 | __cpu_clear_user_highpage(page, vaddr) | ||
136 | 137 | ||
137 | #define __HAVE_ARCH_COPY_USER_HIGHPAGE | 138 | #define __HAVE_ARCH_COPY_USER_HIGHPAGE |
138 | #define copy_user_highpage(to,from,vaddr,vma) \ | 139 | #define copy_user_highpage(to,from,vaddr,vma) \ |