aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mm/copypage-xscale.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-xscale.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-xscale.c')
-rw-r--r--arch/arm/mm/copypage-xscale.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/arch/arm/mm/copypage-xscale.c b/arch/arm/mm/copypage-xscale.c
index aa9f2ff9dce0..d18f2397ee2d 100644
--- a/arch/arm/mm/copypage-xscale.c
+++ b/arch/arm/mm/copypage-xscale.c
@@ -116,9 +116,9 @@ void xscale_mc_copy_user_highpage(struct page *to, struct page *from,
116void 116void
117xscale_mc_clear_user_highpage(struct page *page, unsigned long vaddr) 117xscale_mc_clear_user_highpage(struct page *page, unsigned long vaddr)
118{ 118{
119 void *kaddr = kmap_atomic(page, KM_USER0); 119 void *ptr, *kaddr = kmap_atomic(page, KM_USER0);
120 asm volatile( 120 asm volatile(
121 "mov r1, %1 \n\ 121 "mov r1, %2 \n\
122 mov r2, #0 \n\ 122 mov r2, #0 \n\
123 mov r3, #0 \n\ 123 mov r3, #0 \n\
1241: mov ip, %0 \n\ 1241: mov ip, %0 \n\
@@ -130,8 +130,8 @@ xscale_mc_clear_user_highpage(struct page *page, unsigned long vaddr)
130 subs r1, r1, #1 \n\ 130 subs r1, r1, #1 \n\
131 mcr p15, 0, ip, c7, c6, 1 @ invalidate D line\n\ 131 mcr p15, 0, ip, c7, c6, 1 @ invalidate D line\n\
132 bne 1b" 132 bne 1b"
133 : 133 : "=r" (ptr)
134 : "r" (kaddr), "I" (PAGE_SIZE / 32) 134 : "0" (kaddr), "I" (PAGE_SIZE / 32)
135 : "r1", "r2", "r3", "ip"); 135 : "r1", "r2", "r3", "ip");
136 kunmap_atomic(kaddr, KM_USER0); 136 kunmap_atomic(kaddr, KM_USER0);
137} 137}