rdmsr/wrmsr error (patch to linux-2.0.25 included)

David Dyck (dcd@tc.fluke.com)
Sun, 10 Nov 1996 22:45:05 -0800


Here is a patch that replaces the rdmsr and wrmsr
with the correct .byte instructions.

(I tested this by upgrading the assembler to correctly
the rdmsr/wrmsr instructions, and replaced the instructions
with .bytes, as defined in binutils/include/opcodes/i386.h,
and generated identical .o files)

I think that since just a few lines down in the same
source file is another pentium instruction using .byte,
we should not force everyone to upgrade assemblers
just for this one patch that was added in 2.0.25)

David Dyck

--- linux/arch/i386/kernel/time.c.new Sun Nov 10 20:29:11 1996
+++ linux/arch/i386/kernel/time.c Sun Nov 10 22:32:10 1996
@@ -471,9 +471,9 @@
if( x86_model == 0 ) {
/* turn on cycle counters during power down */
__asm__ __volatile__ (" movl $0x83, %%ecx \n \
- rdmsr \n \
+ .byte 0x0f,0x32 \n \
orl $1,%%eax \n \
- wrmsr \n "
+ .byte 0x0f,0x30 \n "
: : : "ax", "cx", "dx" );
udelay(500);
}