summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Belopuhov <mikeb@cvs.openbsd.org>2017-10-18 15:26:06 +0000
committerMike Belopuhov <mikeb@cvs.openbsd.org>2017-10-18 15:26:06 +0000
commit2587b0c38cf554042188ed97e7687c300f8021bb (patch)
tree71559f52560a987a3041170929a1503158cc8cf3
parent586776ee27fa65bfaa2d9193e20c5d15829711d6 (diff)
Fixup previous; noticed by canacar@
-rw-r--r--sys/arch/amd64/amd64/tsc.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/arch/amd64/amd64/tsc.c b/sys/arch/amd64/amd64/tsc.c
index 4e17fe9a5ed..f3fd2554cf9 100644
--- a/sys/arch/amd64/amd64/tsc.c
+++ b/sys/arch/amd64/amd64/tsc.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: tsc.c,v 1.4 2017/10/18 12:52:06 mikeb Exp $ */
+/* $OpenBSD: tsc.c,v 1.5 2017/10/18 15:26:05 mikeb Exp $ */
/*
* Copyright (c) 2016,2017 Reyk Floeter <reyk@openbsd.org>
* Copyright (c) 2017 Adam Steen <adam@adamsteen.com.au>
@@ -208,8 +208,7 @@ tsc_timecounter_init(struct cpu_info *ci, uint64_t cpufreq)
!(ci->ci_flags & CPUF_INVAR_TSC))
return;
- if ((tsc_frequency = tsc_freq_cpuid(ci)) == 0)
- tsc_frequency = cpufreq;
+ tsc_frequency = tsc_freq_cpuid(ci);
tsc_is_invariant = 1;
/* Newer CPUs don't require recalibration */
@@ -218,6 +217,7 @@ tsc_timecounter_init(struct cpu_info *ci, uint64_t cpufreq)
tsc_timecounter.tc_quality = 2000;
} else {
tsc_recalibrate = 1;
+ tsc_frequency = cpufreq;
calibrate_tsc_freq();
}