aboutsummaryrefslogtreecommitdiffstats
path: root/include/asm-arm/page.h
diff options
context:
space:
mode:
authorRussell King <rmk@dyn-67.arm.linux.org.uk>2005-05-10 09:23:01 -0400
committerRussell King <rmk@dyn-67.arm.linux.org.uk>2005-05-10 09:23:01 -0400
commitd2bab05ac1f9a2f5ddcd2f3256237e5c47fc127f (patch)
treea330a8ac155d82bae9a500d28533888dedad4d1e /include/asm-arm/page.h
parentc4e1f6f6bf82af89994a0ee760fc5e036c4d3c1f (diff)
[PATCH] ARM: Move copy/clear user_page locking into implementation
Move the locking for copy_user_page() and clear_user_page() into the implementations which require locking. For simple memcpy/ memset based implementations, the locking is extra overhead which is not necessary, and prevents preemption occuring. Signed-off-by: Russell King <rmk@arm.linux.org.uk>
Diffstat (limited to 'include/asm-arm/page.h')
-rw-r--r--include/asm-arm/page.h15
1 files changed, 2 insertions, 13 deletions
diff --git a/include/asm-arm/page.h b/include/asm-arm/page.h
index d26d1574d972..019c45d75730 100644
--- a/include/asm-arm/page.h
+++ b/include/asm-arm/page.h
@@ -114,19 +114,8 @@ extern void __cpu_copy_user_page(void *to, const void *from,
114 unsigned long user); 114 unsigned long user);
115#endif 115#endif
116 116
117#define clear_user_page(addr,vaddr,pg) \ 117#define clear_user_page(addr,vaddr,pg) __cpu_clear_user_page(addr, vaddr)
118 do { \ 118#define copy_user_page(to,from,vaddr,pg) __cpu_copy_user_page(to, from, vaddr)
119 preempt_disable(); \
120 __cpu_clear_user_page(addr, vaddr); \
121 preempt_enable(); \
122 } while (0)
123
124#define copy_user_page(to,from,vaddr,pg) \
125 do { \
126 preempt_disable(); \
127 __cpu_copy_user_page(to, from, vaddr); \
128 preempt_enable(); \
129 } while (0)
130 119
131#define clear_page(page) memzero((void *)(page), PAGE_SIZE) 120#define clear_page(page) memzero((void *)(page), PAGE_SIZE)
132extern void copy_page(void *to, const void *from); 121extern void copy_page(void *to, const void *from);