lkml.org 
[lkml]   [1996]   [Nov]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subjectrdmsr/wrmsr error (patch to linux-2.0.25 included)

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);
}

\
 
 \ /
  Last update: 2005-03-22 13:37    [W:0.039 / U:0.204 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site