aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mm/copypage-feroceon.c
diff options
context:
space:
mode:
authorNicolas Pitre <nico@cam.org>2008-11-04 02:42:27 -0500
committerRussell King <rmk+kernel@arm.linux.org.uk>2008-11-28 10:36:43 -0500
commit43ae286b7d4d8c4983bc263ef2e3cccc10dedb2b (patch)
treebe10faffb48904e5bb962fbd45f7cb2ff395caea /arch/arm/mm/copypage-feroceon.c
parent303c6443659bc1dc911356f5de149f48ff1d97b8 (diff)
[ARM] fix a couple clear_user_highpage assembly constraints
In all cases the kaddr is assigned an input register even though it is modified in the assembly code. Let's assign a new variable to the modified value and mark those inline asm with volatile otherwise they get optimized away because the output variable is otherwise not used. Also fix a few conversion errors in copypage-feroceon.c and copypage-v4mc.c. Signed-off-by: Nicolas Pitre <nico@marvell.com> 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.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/arch/arm/mm/copypage-feroceon.c b/arch/arm/mm/copypage-feroceon.c
index c3651b2939c7..c3ba6a94da0c 100644
--- a/arch/arm/mm/copypage-feroceon.c
+++ b/arch/arm/mm/copypage-feroceon.c
@@ -81,9 +81,9 @@ void feroceon_copy_user_highpage(struct page *to, struct page *from,
81 81
82void feroceon_clear_user_highpage(struct page *page, unsigned long vaddr) 82void feroceon_clear_user_highpage(struct page *page, unsigned long vaddr)
83{ 83{
84 void *kaddr = kmap_atomic(page, KM_USER0); 84 void *ptr, *kaddr = kmap_atomic(page, KM_USER0);
85 asm("\ 85 asm volatile ("\
86 mov r1, %1 \n\ 86 mov r1, %2 \n\
87 mov r2, #0 \n\ 87 mov r2, #0 \n\
88 mov r3, #0 \n\ 88 mov r3, #0 \n\
89 mov r4, #0 \n\ 89 mov r4, #0 \n\
@@ -95,11 +95,11 @@ void feroceon_clear_user_highpage(struct page *page, unsigned long vaddr)
951: stmia %0, {r2-r7, ip, lr} \n\ 951: stmia %0, {r2-r7, ip, lr} \n\
96 subs r1, r1, #1 \n\ 96 subs r1, r1, #1 \n\
97 mcr p15, 0, %0, c7, c14, 1 @ clean and invalidate D line\n\ 97 mcr p15, 0, %0, c7, c14, 1 @ clean and invalidate D line\n\
98 add r0, r0, #32 \n\ 98 add %0, %0, #32 \n\
99 bne 1b \n\ 99 bne 1b \n\
100 mcr p15, 0, r1, c7, c10, 4 @ drain WB" 100 mcr p15, 0, r1, c7, c10, 4 @ drain WB"
101 : 101 : "=r" (ptr)
102 : "r" (kaddr), "I" (PAGE_SIZE / 32) 102 : "0" (kaddr), "I" (PAGE_SIZE / 32)
103 : "r1", "r2", "r3", "r4", "r5", "r6", "r7", "ip", "lr"); 103 : "r1", "r2", "r3", "r4", "r5", "r6", "r7", "ip", "lr");
104 kunmap_atomic(kaddr, KM_USER0); 104 kunmap_atomic(kaddr, KM_USER0);
105} 105}