summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorRussell King <rmk@dyn-67.arm.linux.org.uk>2005-05-10 14:23:01 +0100
committerRussell King <rmk@dyn-67.arm.linux.org.uk>2005-05-10 14:23:01 +0100
commitd2bab05ac1f9a2f5ddcd2f3256237e5c47fc127f (patch)
treea330a8ac155d82bae9a500d28533888dedad4d1e /include
parentc4e1f6f6bf82af89994a0ee760fc5e036c4d3c1f (diff)
downloadop-kernel-dev-d2bab05ac1f9a2f5ddcd2f3256237e5c47fc127f.zip
op-kernel-dev-d2bab05ac1f9a2f5ddcd2f3256237e5c47fc127f.tar.gz
[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')
-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 d26d157..019c45d 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,
unsigned long user);
#endif
-#define clear_user_page(addr,vaddr,pg) \
- do { \
- preempt_disable(); \
- __cpu_clear_user_page(addr, vaddr); \
- preempt_enable(); \
- } while (0)
-
-#define copy_user_page(to,from,vaddr,pg) \
- do { \
- preempt_disable(); \
- __cpu_copy_user_page(to, from, vaddr); \
- preempt_enable(); \
- } while (0)
+#define clear_user_page(addr,vaddr,pg) __cpu_clear_user_page(addr, vaddr)
+#define copy_user_page(to,from,vaddr,pg) __cpu_copy_user_page(to, from, vaddr)
#define clear_page(page) memzero((void *)(page), PAGE_SIZE)
extern void copy_page(void *to, const void *from);
OpenPOWER on IntegriCloud