diff options
author | Andriy Gapon <avg@FreeBSD.org> | 2018-05-29 16:03:53 +0000 |
---|---|---|
committer | Andriy Gapon <avg@FreeBSD.org> | 2018-05-29 16:03:53 +0000 |
commit | ba79ab821559cbf14276e7717e9b0fa38cec1cb8 (patch) | |
tree | 3fc9f816f4092bc581d83957a203adfaac1fe74a /sys | |
parent | 075bac9787d44915e4de612321018d3726db4644 (diff) | |
download | src-ba79ab821559cbf14276e7717e9b0fa38cec1cb8.tar.gz src-ba79ab821559cbf14276e7717e9b0fa38cec1cb8.zip |
fix x86 UP build broken by r334204, TSC resynchronization
Reported by: bde
MFC after: 1 week
X-MFC with: r334204
Notes
Notes:
svn path=/head/; revision=334338
Diffstat (limited to 'sys')
-rw-r--r-- | sys/x86/x86/tsc.c | 20 |
1 files changed, 6 insertions, 14 deletions
diff --git a/sys/x86/x86/tsc.c b/sys/x86/x86/tsc.c index aecc6702d075..3269ab94706d 100644 --- a/sys/x86/x86/tsc.c +++ b/sys/x86/x86/tsc.c @@ -505,19 +505,6 @@ retry: #undef N -#else - -/* - * The function is not called, it is provided to avoid linking failure - * on uniprocessor kernel. - */ -static int -test_tsc(int adj_max_count __unused) -{ - - return (0); -} - #endif /* SMP */ static void @@ -578,9 +565,12 @@ init_TSC_tc(void) * non-zero value. The TSC seems unreliable in virtualized SMP * environments, so it is set to a negative quality in those cases. */ +#ifdef SMP if (mp_ncpus > 1) tsc_timecounter.tc_quality = test_tsc(smp_tsc_adjust); - else if (tsc_is_invariant) + else +#endif /* SMP */ + if (tsc_is_invariant) tsc_timecounter.tc_quality = 1000; max_freq >>= tsc_shift; @@ -618,6 +608,7 @@ SYSINIT(tsc_tc, SI_SUB_SMP, SI_ORDER_ANY, init_TSC_tc, NULL); void resume_TSC(void) { +#ifdef SMP int quality; /* If TSC was not good on boot, it is unlikely to become good now. */ @@ -637,6 +628,7 @@ resume_TSC(void) tsc_timecounter.tc_quality, quality); tsc_timecounter.tc_quality = quality; } +#endif /* SMP */ } /* |