]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
[PATCH] Fix speedstep-smi assembly bug in speedstep_smi_ownership
authorAndrew Morton <akpm@osdl.org>
Sat, 25 Mar 2006 03:40:37 +0000 (19:40 -0800)
committerGreg Kroah-Hartman <gregkh@suse.de>
Tue, 28 Mar 2006 06:47:31 +0000 (22:47 -0800)
Fix bug identified by Linus Torvalds <torvalds@osdl.org>: the `out'
instruction depends upon the state of memory_data[], so we need to tell gcc
that before executing it. (The opcode, not gcc).

Fixes http://bugzilla.kernel.org/show_bug.cgi?id=5553

Thanks to Antonio Ospite <ospite@studenti.unina.it> for testing.

Cc: Dave Jones <davej@codemonkey.org.uk>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
arch/i386/kernel/cpu/cpufreq/speedstep-smi.c

index 28cc5d524afcd18a2dce1ee4f5ccb3d2c737faf1..cfc4276e670e3eac2ccc2f1c0a81f3258ff8a586 100644 (file)
@@ -75,7 +75,9 @@ static int speedstep_smi_ownership (void)
        __asm__ __volatile__(
                "out %%al, (%%dx)\n"
                : "=D" (result)
-               : "a" (command), "b" (function), "c" (0), "d" (smi_port), "D" (0), "S" (magic)
+               : "a" (command), "b" (function), "c" (0), "d" (smi_port),
+                       "D" (0), "S" (magic)
+               : "memory"
        );
 
        dprintk("result is %x\n", result);