aboutsummaryrefslogtreecommitdiffstats
path: root/arch/m68k/atari
diff options
context:
space:
mode:
authorAndreas Schwab <schwab@linux-m68k.org>2012-01-09 09:10:15 -0500
committerGeert Uytterhoeven <geert@linux-m68k.org>2012-01-22 08:50:20 -0500
commit2a3535069e33d8b416f406c159ce924427315303 (patch)
tree2de8aa3a94215260fe91b0edb1c8f5d685413d04 /arch/m68k/atari
parentc808d3d839ab70c87a6c9356c50569c87661378e (diff)
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/atari')
-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 4203d101363..c4ac15c4f06 100644
--- a/arch/m68k/atari/config.c
+++ b/arch/m68k/atari/config.c
@@ -414,9 +414,9 @@ void __init config_atari(void)
414 * FDC val = 4 -> Supervisor only */ 414 * FDC val = 4 -> Supervisor only */
415 asm volatile ("\n" 415 asm volatile ("\n"
416 " .chip 68030\n" 416 " .chip 68030\n"
417 " pmove %0@,%/tt1\n" 417 " pmove %0,%/tt1\n"
418 " .chip 68k" 418 " .chip 68k"
419 : : "a" (&tt1_val)); 419 : : "m" (tt1_val));
420 } else { 420 } else {
421 asm volatile ("\n" 421 asm volatile ("\n"
422 " .chip 68040\n" 422 " .chip 68040\n"
@@ -569,10 +569,10 @@ static void atari_reset(void)
569 : "d0"); 569 : "d0");
570 } else 570 } else
571 asm volatile ("\n" 571 asm volatile ("\n"
572 " pmove %0@,%%tc\n" 572 " pmove %0,%%tc\n"
573 " jmp %1@" 573 " jmp %1@"
574 : /* no outputs */ 574 : /* no outputs */
575 : "a" (&tc_val), "a" (reset_addr)); 575 : "m" (tc_val), "a" (reset_addr));
576} 576}
577 577
578 578