summaryrefslogtreecommitdiff
path: root/arch/m68k/mm
diff options
context:
space:
mode:
authorAndreas Schwab <schwab@linux-m68k.org>2012-01-09 15:10:15 +0100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2012-02-03 09:21:38 -0800
commitb1cd343b25d514e77850db6971c5066b0f0645dd (patch)
treed95e6b949bc749682f712c9cb9dcc007e754be5a /arch/m68k/mm
parent26e15e85d0ede680bf326933731ce4d2ec48fe82 (diff)
m68k: Fix assembler constraint to prevent overeager gcc optimisation
commit 2a3535069e33d8b416f406c159ce924427315303 upstream. 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> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.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 5437fff5fe07..5550aa4fd811 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);