diff options
author | cinap_lenrek <cinap_lenrek@felloff.net> | 2017-03-11 16:18:01 +0100 |
---|---|---|
committer | cinap_lenrek <cinap_lenrek@felloff.net> | 2017-03-11 16:18:01 +0100 |
commit | 812383473cea9b53cf3c8ff138489a3d10d65f44 (patch) | |
tree | 60aca631ac52f3d200b952cd58b3273ff8f2f12a /sys/src/9/pc/i8253.c | |
parent | 3e0e77a8521331412c96b6371622aa2f76d7aefc (diff) |
pc kernel: assume tsc and lapic clock rate on application processors is the same as on bootrap processor
Diffstat (limited to 'sys/src/9/pc/i8253.c')
-rw-r--r-- | sys/src/9/pc/i8253.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/sys/src/9/pc/i8253.c b/sys/src/9/pc/i8253.c index 1163ace3c..50fad7105 100644 --- a/sys/src/9/pc/i8253.c +++ b/sys/src/9/pc/i8253.c @@ -130,6 +130,13 @@ guesscpuhz(int aalcycles) int loops, x, y; uvlong a, b, cpufreq; + if(m->machno != 0){ + m->cpuhz = MACHP(0)->cpuhz; + m->cpumhz = MACHP(0)->cpumhz; + m->loopconst = MACHP(0)->loopconst; + return; + } + ilock(&i8253); for(loops = 1000;;loops += 1000) { /* |