Skip to content

Commit

Permalink
[PATCH] cpufreq: speedstep-smi asm fix
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Andrew Morton authored and Linus Torvalds committed Mar 25, 2006
1 parent 1e8c573 commit f081a52
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion arch/i386/kernel/cpu/cpufreq/speedstep-smi.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit f081a52

Please sign in to comment.