cpuid_eax damages registers (2.4.7pre7)

Julian Anastasov (ja@himel.com)
Wed, 18 Jul 2001 13:48:00 +0300 (EEST)


Hello,

I don't know whether cpuid_eax (2.4.7pre) should preserve the
registers changed from cpuid but I have an oops on boot with 2.4.7pre7 in
squash_the_stupid_serial_number where cpuid_eax changes ebx and the
parameter "c" is loaded with "Genu". The following change fixes the
problem:

from:

c->cpuid_level = cpuid_eax(0);

to:

unsigned int dummy;

cpuid(0, &c->cpuid_level, &dummy, &dummy, &dummy);

but I'm not sure in the definitions of these cpuid_XXX funcs. I see
that they are used at many places. IMO, they have to preserve the
registers.

Regards

--
Julian Anastasov <ja@ssi.bg>

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