Re: Microsecond accuracy

From: H. Peter Anvin (hpa@zytor.com)
Date: Thu Dec 07 2000 - 10:33:23 EST


Followup to: <Pine.LNX.4.21.0012071411170.970-100000@penguin.homenet>
By author: Tigran Aivazian <tigran@veritas.com>
In newsgroup: linux.dev.kernel
>
> while we are on this subject, please let me emphasize that you should
> _not_ be using cpuid instruction to detect the presence of TSC but should
> parse the /proc/cpuinfo file. There are many valid reasons why Linux's
> idea of TSC presence may not be the same as hardware's (cpuid
> instruction) idea.
>

Unfortunately the most important instance of the in-kernel flag -- the
global one in the somewhat misnamed boot_cpu_data.x86_features --
isn't actually readable in the /proc/cpuinfo file. It is perfectly
possible (e.g. the "notsc" option) for ALL the CPUs to report this
capability, but the global capability to still be off.

I would like to have exported the global capabilities into
/proc/cpuinfo, but I'm worried about breaking software (the "flags"
versus "features" issue was bad enough -- unfortunately, in cases like
this, there probably is no "good" solution.)

        -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.kernel.org
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Thu Dec 07 2000 - 21:00:17 EST