This Old Box (or errors building 2.0.38 on a K5)

Dick Balaska (dick@buckosoft.com)
Tue, 21 Sep 1999 12:49:02 -0400


This is a multi-part message in MIME format.
--------------753E5379CB3C671502555E40
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit

Dudes and/or Dudettes:

Extreme apologies if this has been discussed. I spent only 3-4 hours
surfing for answers (insignificant dent in the terabytes of info)

sarah is a box of usual extreme uptimes. Before Hurricane Floyd went through
the other day, she'd been rebooted once since 2.0.13 was minty fresh.
(silly brag page: http://www.buckosoft.com/linux/ )

So i decided to take this opportunity to upgrade the kernel;
remembering reading about important TCP/IP fixes around 2.0.34ish.

sarah is an AMD K5. I build using -m486.
2.0.38 and i have a problem with include/asm/bugs.h .
It seems that there are these macros rdmsr() and wrmsr()
which are used in check_privacy(void) (line 179);
a function to disable PIII serial numbers.
Also there is a problem with check_k6_bug()

I did notice in my surf that 2.0.25 had a similar problem
with time.c

I crap out with:
gcc -D__KERNEL__ -I/u1/src/linux-2.0.38/include -Wall -Wstrict-prototypes -O2 -fomit-frame-pointer -fno-strength-reduce -pipe -m486 -DCPU=486 -c -o init/main.o init/main.c
{standard input}: Assembler messages:
{standard input}:283: Error: no such 386 instruction: `rdmsr'
{standard input}:287: Error: no such 386 instruction: `wrmsr'
{standard input}:345: Error: no such 386 instruction: `rdtsc'
{standard input}:357: Error: no such 386 instruction: `rdtsc'
make: *** [init/main.o] Error 1

2.0.34 builds ok (the next nearest version i had laying around)

I patched these in a similar fashion to this older technique
(time.c had rdmsr patched to equivalent .byte codes)
http://www.uwsg.indiana.edu/hypermail/linux/kernel/9611.1/0101.html

-- 
           _,--"
dik        `-._        ________-_______        "----
       _----'--'--------------------------------'--'----_
      //_| | \        dick@buckosoft.com          / | |_\\
     (_____|_|__= Guilford CT +1.203.458.0389  =__|_|_____)
     _\_____=___   http://www.buckosoft.com     ___=_____/_
       \/-(o)-~~-(o)-~~-(o)-`------'-(o)-~~-(o)-~~-(o)-\/
Early Klingon Poetry:
Wustl, Wustl, ERR RIP MIT BOOT, BIND Wustl
--------------753E5379CB3C671502555E40
Content-Type: text/plain; charset=us-ascii;
 name="main.c.patch"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
 filename="main.c.patch"

--- linux-2.0.38.orig/include/asm-i386/bugs.h Sun Jun 13 13:21:03 1999 +++ linux-2.0.38/include/asm/bugs.h Tue Sep 21 12:21:32 1999 @@ -140,12 +140,12 @@ */ #define rdmsr(msr,val1,val2) \ - __asm__ __volatile__("rdmsr" \ + __asm__ __volatile__(".byte 0x0f,0x32" \ : "=a" (val1), "=d" (val2) \ : "c" (msr)) #define wrmsr(msr,val1,val2) \ - __asm__ __volatile__("wrmsr" \ + __asm__ __volatile__(".byte 0x0f,0x30" \ : /* no outputs */ \ : "c" (msr), "a" (val1), "d" (val2)) @@ -220,10 +220,10 @@ n = K6_BUG_LOOP; f_vide = vide; - __asm__ ("rdtsc" : "=a" (d)); + __asm__ (".byte 0x0f,0x31" : "=a" (d)); /* rdtsc() */ while (n--) f_vide(); - __asm__ ("rdtsc" : "=a" (d2)); + __asm__ (".byte 0x0f,0x31" : "=a" (d2)); /* rdtsc() */ d = d2-d; if (d > 20*K6_BUG_LOOP) {

--------------753E5379CB3C671502555E40--

- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/