aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mm/copypage-v3.c
diff options
context:
space:
mode:
authorRussell King <rmk@dyn-67.arm.linux.org.uk>2008-10-31 12:32:19 -0400
committerRussell King <rmk+kernel@arm.linux.org.uk>2008-11-27 18:53:48 -0500
commit303c6443659bc1dc911356f5de149f48ff1d97b8 (patch)
tree75da0aef28ec8e843cdeb24c96349bdf812e2740 /arch/arm/mm/copypage-v3.c
parent063b0a4207e43acbeff3d4b09f43e750e0212b48 (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/mm/copypage-v3.c')
-rw-r--r--arch/arm/mm/copypage-v3.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/arch/arm/mm/copypage-v3.c b/arch/arm/mm/copypage-v3.c
index 52df8f04d3f7..13ce0baa6ba5 100644
--- a/arch/arm/mm/copypage-v3.c
+++ b/arch/arm/mm/copypage-v3.c
@@ -54,10 +54,10 @@ void v3_copy_user_highpage(struct page *to, struct page *from,
54 * 54 *
55 * FIXME: do we need to handle cache stuff... 55 * FIXME: do we need to handle cache stuff...
56 */ 56 */
57void __attribute__((naked)) v3_clear_user_page(void *kaddr, unsigned long vaddr) 57void v3_clear_user_highpage(struct page *page, unsigned long vaddr)
58{ 58{
59 void *kaddr = kmap_atomic(page, KM_USER0);
59 asm("\n\ 60 asm("\n\
60 str lr, [sp, #-4]!\n\
61 mov r1, %1 @ 1\n\ 61 mov r1, %1 @ 1\n\
62 mov r2, #0 @ 1\n\ 62 mov r2, #0 @ 1\n\
63 mov r3, #0 @ 1\n\ 63 mov r3, #0 @ 1\n\
@@ -68,13 +68,14 @@ void __attribute__((naked)) v3_clear_user_page(void *kaddr, unsigned long vaddr)
68 stmia %0!, {r2, r3, ip, lr} @ 4\n\ 68 stmia %0!, {r2, r3, ip, lr} @ 4\n\
69 stmia %0!, {r2, r3, ip, lr} @ 4\n\ 69 stmia %0!, {r2, r3, ip, lr} @ 4\n\
70 subs r1, r1, #1 @ 1\n\ 70 subs r1, r1, #1 @ 1\n\
71 bne 1b @ 1\n\ 71 bne 1b @ 1"
72 ldr pc, [sp], #4"
73 : 72 :
74 : "r" (kaddr), "I" (PAGE_SIZE / 64)); 73 : "r" (kaddr), "I" (PAGE_SIZE / 64)
74 : "r1", "r2", "r3", "ip", "lr");
75 kunmap_atomic(kaddr, KM_USER0);
75} 76}
76 77
77struct cpu_user_fns v3_user_fns __initdata = { 78struct cpu_user_fns v3_user_fns __initdata = {
78 .cpu_clear_user_page = v3_clear_user_page, 79 .cpu_clear_user_highpage = v3_clear_user_highpage,
79 .cpu_copy_user_highpage = v3_copy_user_highpage, 80 .cpu_copy_user_highpage = v3_copy_user_highpage,
80}; 81};