summaryrefslogtreecommitdiffstats
path: root/arch/i386
diff options
context:
space:
mode:
authorAndrew Morton <akpm@osdl.org>2006-03-25 01:51:51 -0800
committerLinus Torvalds <torvalds@g5.osdl.org>2006-03-25 08:42:45 -0800
commitf081a529f808ed450c22553de7b3275e0ffde9a0 (patch)
tree0c50e4a3a4a95a5d97c1e9ceddaed6c0034115aa /arch/i386
parent1e8c573933fd7975679766850252ad08667e5ca4 (diff)
downloadlinux-f081a529f808ed450c22553de7b3275e0ffde9a0.tar.gz
linux-f081a529f808ed450c22553de7b3275e0ffde9a0.tar.bz2
linux-f081a529f808ed450c22553de7b3275e0ffde9a0.zip
[PATCH] cpufreq: speedstep-smi asm fix
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: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'arch/i386')
-rw-r--r--arch/i386/kernel/cpu/cpufreq/speedstep-smi.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/arch/i386/kernel/cpu/cpufreq/speedstep-smi.c b/arch/i386/kernel/cpu/cpufreq/speedstep-smi.c
index 28cc5d524afc..cfc4276e670e 100644
--- a/arch/i386/kernel/cpu/cpufreq/speedstep-smi.c
+++ b/arch/i386/kernel/cpu/cpufreq/speedstep-smi.c
@@ -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);