summaryrefslogtreecommitdiff
path: root/arch/m68k/atari/config.c
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/atari/config.c
parent26e15e85d0ede680bf326933731ce4d2ec48fe82 (diff)
downloadlwn-b1cd343b25d514e77850db6971c5066b0f0645dd.tar.gz
lwn-b1cd343b25d514e77850db6971c5066b0f0645dd.zip
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/atari/config.c')
-rw-r--r--arch/m68k/atari/config.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/arch/m68k/atari/config.c b/arch/m68k/atari/config.c
index 4203d101363c..c4ac15c4f065 100644
--- a/arch/m68k/atari/config.c
+++ b/arch/m68k/atari/config.c
@@ -414,9 +414,9 @@ void __init config_atari(void)
* FDC val = 4 -> Supervisor only */
asm volatile ("\n"
" .chip 68030\n"
- " pmove %0@,%/tt1\n"
+ " pmove %0,%/tt1\n"
" .chip 68k"
- : : "a" (&tt1_val));
+ : : "m" (tt1_val));
} else {
asm volatile ("\n"
" .chip 68040\n"
@@ -569,10 +569,10 @@ static void atari_reset(void)
: "d0");
} else
asm volatile ("\n"
- " pmove %0@,%%tc\n"
+ " pmove %0,%%tc\n"
" jmp %1@"
: /* no outputs */
- : "a" (&tc_val), "a" (reset_addr));
+ : "m" (tc_val), "a" (reset_addr));
}