CPU speeds aren't constants; this is probably not the right place to put
it. It also assumes there's only one CPU, which isn't acceptable.
Being the author of the original patch, I agree that its a hack - but
it's better than nothing :-) Plus, it doesn't necessarily assume only
one CPU - it does assume they all have the same fixed speed though.
It doesn't seem to serve much useful purpose; the information is already
available to the user in the boot-time message buffer, and it's not
useful as a number to a running process.
The same information is already available to the user via the
machdep.tsc_freq sysctl if there is a tsc, modulo bugs in the timecounter
code (this sysctl is actually only available if there is a tsc AND
the tsc timecounter was initialized at boot time). If there is no
tsc, then machdep.tsc_freq fails properly but hw.cpuhz bogusly says that
the frequency is 0.
To Unsubscribe: send mail to majo...@FreeBSD.org
with "unsubscribe freebsd-arch" in the body of the message