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-xsc3.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-xsc3.c')
-rw-r--r-- | arch/arm/mm/copypage-xsc3.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/arch/arm/mm/copypage-xsc3.c b/arch/arm/mm/copypage-xsc3.c index 0e7cb325ca4c..39a994542cad 100644 --- a/arch/arm/mm/copypage-xsc3.c +++ b/arch/arm/mm/copypage-xsc3.c | |||
@@ -89,9 +89,9 @@ void xsc3_mc_copy_user_highpage(struct page *to, struct page *from, | |||
89 | */ | 89 | */ |
90 | void xsc3_mc_clear_user_highpage(struct page *page, unsigned long vaddr) | 90 | void xsc3_mc_clear_user_highpage(struct page *page, unsigned long vaddr) |
91 | { | 91 | { |
92 | void *kaddr = kmap_atomic(page, KM_USER0); | 92 | void *ptr, *kaddr = kmap_atomic(page, KM_USER0); |
93 | asm("\ | 93 | asm volatile ("\ |
94 | mov r1, %1 \n\ | 94 | mov r1, %2 \n\ |
95 | mov r2, #0 \n\ | 95 | mov r2, #0 \n\ |
96 | mov r3, #0 \n\ | 96 | mov r3, #0 \n\ |
97 | 1: mcr p15, 0, %0, c7, c6, 1 @ invalidate line\n\ | 97 | 1: mcr p15, 0, %0, c7, c6, 1 @ invalidate line\n\ |
@@ -101,8 +101,8 @@ void xsc3_mc_clear_user_highpage(struct page *page, unsigned long vaddr) | |||
101 | strd r2, [%0], #8 \n\ | 101 | strd r2, [%0], #8 \n\ |
102 | subs r1, r1, #1 \n\ | 102 | subs r1, r1, #1 \n\ |
103 | bne 1b" | 103 | bne 1b" |
104 | : | 104 | : "=r" (ptr) |
105 | : "r" (kaddr), "I" (PAGE_SIZE / 32) | 105 | : "0" (kaddr), "I" (PAGE_SIZE / 32) |
106 | : "r1", "r2", "r3"); | 106 | : "r1", "r2", "r3"); |
107 | kunmap_atomic(kaddr, KM_USER0); | 107 | kunmap_atomic(kaddr, KM_USER0); |
108 | } | 108 | } |