Re: Oops report on microcode.o linux-2.4.0-test1-ac11

From: H. Peter Anvin (hpa@zytor.com)
Date: Sat Jun 10 2000 - 18:05:29 EST


Followup to: <20000609200655.A15221@puffin.external.hp.com>
By author: Philipp Rumpf <prumpf@puffin.external.hp.com>
In newsgroup: linux.dev.kernel
>
> Rather obvious one :)
>
> What happens is we execute cpuid as serializing, but don't tell gcc this
> invalidates %eax, %ebx, %ecx, and %edx. This should be corrected by this
> patch:
>
> diff -ur linux/arch/i386/kernel/microcode.c linux-prumpf/arch/i386/kernel/microcode.c
> --- linux/arch/i386/kernel/microcode.c Fri Jun 9 19:05:09 2000
> +++ linux-prumpf/arch/i386/kernel/microcode.c Fri Jun 9 19:06:19 2000
> @@ -227,7 +227,7 @@
> }
>
> wrmsr(0x79, (unsigned int)(m->bits), 0);
> - __asm__ __volatile__ ("cpuid");
> + __asm__ __volatile__ ("cpuid" : : : "ax", "bx", "cx", "dx", "cc");
> rdmsr(0x8B, val[0], val[1]);
>
> req->err = 0;
>

The "cc" isn't required.

        -hpa

-- 
<hpa@transmeta.com> at work, <hpa@zytor.com> in private!
"Unix gives you enough rope to shoot yourself in the foot."
http://www.zytor.com/~hpa/puzzle.txt

- 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/



This archive was generated by hypermail 2b29 : Thu Jun 15 2000 - 21:00:22 EST