plan9.ini: add *notsc= option to disable use of TSC as righ resolution clock

we previously used tsc only on cpu kernel. now that
we use it on terminal kernel too, there might be some
surprises ahead.

so make it possible to disable tsc for machines where
the tsc rate is not kept constant across cores or is
dynamically adjusted by power management.
This commit is contained in:
cinap_lenrek 2013-06-19 20:56:01 +02:00
parent 35314ce1e7
commit 8da4c8dcde
2 changed files with 6 additions and 1 deletions

View file

@ -720,6 +720,11 @@ processors.
Prints a summary of the multiprocessor APIC interrupt configuration.
.SS \fL*nomsi=\fP
Disables message signaled interrupts.
.SS \fL*notsc=\fP
Disables the use of the per processor timestamp counter registers
as high resolution clock. This option is intended for machines where
the timestamp counter rate is not constant across cores or is adjusted
dynamically by power management.
.SS \fL*pcimaxbno=value\fP
This puts a limit on the maximum bus number probed
on a PCI bus (default 7).

View file

@ -797,7 +797,7 @@ cpuidentify(void)
/*
* if there is one, set tsc to a known value
*/
if(m->cpuiddx & Tsc){
if((m->cpuiddx & Tsc) != 0 && getconf("*notsc") == nil){
m->havetsc = 1;
cycles = _cycles;
if(m->cpuiddx & Cpumsr)