diff options
author | Nicolas Pitre <nico@cam.org> | 2008-11-04 02:42:27 -0500 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2008-11-28 10:36:43 -0500 |
commit | 43ae286b7d4d8c4983bc263ef2e3cccc10dedb2b (patch) | |
tree | be10faffb48904e5bb962fbd45f7cb2ff395caea /arch/arm/mm/copypage-v3.c | |
parent | 303c6443659bc1dc911356f5de149f48ff1d97b8 (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-v3.c')
-rw-r--r-- | arch/arm/mm/copypage-v3.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/arch/arm/mm/copypage-v3.c b/arch/arm/mm/copypage-v3.c index 13ce0baa6ba5..70ed96c8af8e 100644 --- a/arch/arm/mm/copypage-v3.c +++ b/arch/arm/mm/copypage-v3.c | |||
@@ -56,9 +56,9 @@ void v3_copy_user_highpage(struct page *to, struct page *from, | |||
56 | */ | 56 | */ |
57 | void v3_clear_user_highpage(struct page *page, unsigned long vaddr) | 57 | void v3_clear_user_highpage(struct page *page, unsigned long vaddr) |
58 | { | 58 | { |
59 | void *kaddr = kmap_atomic(page, KM_USER0); | 59 | void *ptr, *kaddr = kmap_atomic(page, KM_USER0); |
60 | asm("\n\ | 60 | asm volatile("\n\ |
61 | mov r1, %1 @ 1\n\ | 61 | mov r1, %2 @ 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\ |
64 | mov ip, #0 @ 1\n\ | 64 | mov ip, #0 @ 1\n\ |
@@ -69,8 +69,8 @@ void v3_clear_user_highpage(struct page *page, unsigned long vaddr) | |||
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" | 71 | bne 1b @ 1" |
72 | : | 72 | : "=r" (ptr) |
73 | : "r" (kaddr), "I" (PAGE_SIZE / 64) | 73 | : "0" (kaddr), "I" (PAGE_SIZE / 64) |
74 | : "r1", "r2", "r3", "ip", "lr"); | 74 | : "r1", "r2", "r3", "ip", "lr"); |
75 | kunmap_atomic(kaddr, KM_USER0); | 75 | kunmap_atomic(kaddr, KM_USER0); |
76 | } | 76 | } |