Re: 6x86 recognition

Rafael Reilova (rreilova@ececs.uc.edu)
Thu, 6 Aug 1998 16:58:43 -0400 (EDT)


Hi All,

Kernels 2.1.109+ should support Cyrix detection already (we rewrote it all
in C code, have a look at arch/i386/kernel/setup.c and
include/asm-i386/bugs.h).

There have been two reports of failed detection when changing the compiler
options from 486 to 586 or 686. I found a small oversight in one of the
port access asm macros to the Cyrix CPU regs (patch included below).

One of the asm contraint's clobber-list is not correct. It also removes a
superflous instruction with generates a useless "movb al,al".

Although I been unable to find incorrect code without the patch (tried
egcs, gcc 2.8 & 2.7.2), the unpatched version is still asking for trouble.

Please test if the following correction fixes the problem...

Cheers,

Rafael

--- linux-2.1.114/include/asm-i386/processor.h Wed Jul 29 23:47:14 1998
+++ linux/include/asm-i386/processor.h Thu Aug 6 07:14:53 1998
@@ -131,9 +131,9 @@
{
unsigned char data;

- __asm__ __volatile__("movb %1,%%al\n\t"
+ __asm__ __volatile__(
"outb %%al,$0x22\n\t"
- "inb $0x23,%%al" : "=a" (data) : "q" (reg));
+ "inb $0x23,%%al" : "=a" (data) : "0" (reg));
return data;
}

@@ -141,7 +141,7 @@
{
__asm__ __volatile__("outb %%al,$0x22\n\t"
"movb %1,%%al\n\t"
- "outb %%al,$0x23" : : "a" (reg), "q" (data));
+ "outb %%al,$0x23" : : "a" (reg), "q" (data) : "ax");
}

/*

-
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.altern.org/andrebalsa/doc/lkml-faq.html