summaryrefslogtreecommitdiff
path: root/arch/m68k/mm
diff options
context:
space:
mode:
authorAndreas Schwab <schwab@linux-m68k.org>2012-01-09 14:10:15 (GMT)
committerGeert Uytterhoeven <geert@linux-m68k.org>2012-01-22 13:50:20 (GMT)
commit2a3535069e33d8b416f406c159ce924427315303 (patch)
tree2de8aa3a94215260fe91b0edb1c8f5d685413d04 /arch/m68k/mm
parentc808d3d839ab70c87a6c9356c50569c87661378e (diff)
downloadlinux-2a3535069e33d8b416f406c159ce924427315303.tar.xz
m68k: Fix assembler constraint to prevent overeager gcc optimisation
Passing the address of a variable as an operand to an asm statement doesn't mark the value of this variable as used, so gcc may optimize its initialisation away. Fix this by using the "m" constraint instead. Signed-off-by: Andreas Schwab <schwab@linux-m68k.org> Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org> Cc: stable@vger.kernel.org
Diffstat (limited to 'arch/m68k/mm')
-rw-r--r--arch/m68k/mm/cache.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/arch/m68k/mm/cache.c b/arch/m68k/mm/cache.c
index 5437fff..5550aa4 100644
--- a/arch/m68k/mm/cache.c
+++ b/arch/m68k/mm/cache.c
@@ -52,9 +52,9 @@ static unsigned long virt_to_phys_slow(unsigned long vaddr)
unsigned long *descaddr;
asm volatile ("ptestr %3,%2@,#7,%0\n\t"
- "pmove %%psr,%1@"
- : "=a&" (descaddr)
- : "a" (&mmusr), "a" (vaddr), "d" (get_fs().seg));
+ "pmove %%psr,%1"
+ : "=a&" (descaddr), "=m" (mmusr)
+ : "a" (vaddr), "d" (get_fs().seg));
if (mmusr & (MMU_I|MMU_B|MMU_L))
return 0;
descaddr = phys_to_virt((unsigned long)descaddr);