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-v4mc.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-v4mc.c')
-rw-r--r-- | arch/arm/mm/copypage-v4mc.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/arch/arm/mm/copypage-v4mc.c b/arch/arm/mm/copypage-v4mc.c index a5eae503a34f..bdb5fd983b15 100644 --- a/arch/arm/mm/copypage-v4mc.c +++ b/arch/arm/mm/copypage-v4mc.c | |||
@@ -93,9 +93,9 @@ void v4_mc_copy_user_highpage(struct page *from, struct page *to, | |||
93 | */ | 93 | */ |
94 | void v4_mc_clear_user_highpage(struct page *page, unsigned long vaddr) | 94 | void v4_mc_clear_user_highpage(struct page *page, unsigned long vaddr) |
95 | { | 95 | { |
96 | void *kaddr = kmap_atomic(page, KM_USER0); | 96 | void *ptr, *kaddr = kmap_atomic(page, KM_USER0); |
97 | asm volatile("\ | 97 | asm volatile("\ |
98 | mov r1, %0 @ 1\n\ | 98 | mov r1, %2 @ 1\n\ |
99 | mov r2, #0 @ 1\n\ | 99 | mov r2, #0 @ 1\n\ |
100 | mov r3, #0 @ 1\n\ | 100 | mov r3, #0 @ 1\n\ |
101 | mov ip, #0 @ 1\n\ | 101 | mov ip, #0 @ 1\n\ |
@@ -108,8 +108,8 @@ void v4_mc_clear_user_highpage(struct page *page, unsigned long vaddr) | |||
108 | stmia %0!, {r2, r3, ip, lr} @ 4\n\ | 108 | stmia %0!, {r2, r3, ip, lr} @ 4\n\ |
109 | subs r1, r1, #1 @ 1\n\ | 109 | subs r1, r1, #1 @ 1\n\ |
110 | bne 1b @ 1" | 110 | bne 1b @ 1" |
111 | : | 111 | : "=r" (ptr) |
112 | : "r" (kaddr), "I" (PAGE_SIZE / 64) | 112 | : "0" (kaddr), "I" (PAGE_SIZE / 64) |
113 | : "r1", "r2", "r3", "ip", "lr"); | 113 | : "r1", "r2", "r3", "ip", "lr"); |
114 | kunmap_atomic(kaddr, KM_USER0); | 114 | kunmap_atomic(kaddr, KM_USER0); |
115 | } | 115 | } |