aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mm/copypage-feroceon.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-feroceon.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-feroceon.c')
-rw-r--r--arch/arm/mm/copypage-feroceon.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/arch/arm/mm/copypage-feroceon.c b/arch/arm/mm/copypage-feroceon.c
index edd71686b8df..c3651b2939c7 100644
--- a/arch/arm/mm/copypage-feroceon.c
+++ b/arch/arm/mm/copypage-feroceon.c
@@ -79,12 +79,11 @@ void feroceon_copy_user_highpage(struct page *to, struct page *from,
79 kunmap_atomic(kto, KM_USER0); 79 kunmap_atomic(kto, KM_USER0);
80} 80}
81 81
82void __attribute__((naked)) 82void feroceon_clear_user_highpage(struct page *page, unsigned long vaddr)
83feroceon_clear_user_page(void *kaddr, unsigned long vaddr)
84{ 83{
84 void *kaddr = kmap_atomic(page, KM_USER0);
85 asm("\ 85 asm("\
86 stmfd sp!, {r4-r7, lr} \n\ 86 mov r1, %1 \n\
87 mov r1, %0 \n\
88 mov r2, #0 \n\ 87 mov r2, #0 \n\
89 mov r3, #0 \n\ 88 mov r3, #0 \n\
90 mov r4, #0 \n\ 89 mov r4, #0 \n\
@@ -93,19 +92,20 @@ feroceon_clear_user_page(void *kaddr, unsigned long vaddr)
93 mov r7, #0 \n\ 92 mov r7, #0 \n\
94 mov ip, #0 \n\ 93 mov ip, #0 \n\
95 mov lr, #0 \n\ 94 mov lr, #0 \n\
961: stmia r0, {r2-r7, ip, lr} \n\ 951: stmia %0, {r2-r7, ip, lr} \n\
97 subs r1, r1, #1 \n\ 96 subs r1, r1, #1 \n\
98 mcr p15, 0, r0, c7, c14, 1 @ clean and invalidate D line\n\ 97 mcr p15, 0, %0, c7, c14, 1 @ clean and invalidate D line\n\
99 add r0, r0, #32 \n\ 98 add r0, r0, #32 \n\
100 bne 1b \n\ 99 bne 1b \n\
101 mcr p15, 0, r1, c7, c10, 4 @ drain WB\n\ 100 mcr p15, 0, r1, c7, c10, 4 @ drain WB"
102 ldmfd sp!, {r4-r7, pc}"
103 : 101 :
104 : "I" (PAGE_SIZE / 32)); 102 : "r" (kaddr), "I" (PAGE_SIZE / 32)
103 : "r1", "r2", "r3", "r4", "r5", "r6", "r7", "ip", "lr");
104 kunmap_atomic(kaddr, KM_USER0);
105} 105}
106 106
107struct cpu_user_fns feroceon_user_fns __initdata = { 107struct cpu_user_fns feroceon_user_fns __initdata = {
108 .cpu_clear_user_page = feroceon_clear_user_page, 108 .cpu_clear_user_highpage = feroceon_clear_user_highpage,
109 .cpu_copy_user_highpage = feroceon_copy_user_highpage, 109 .cpu_copy_user_highpage = feroceon_copy_user_highpage,
110}; 110};
111 111