diff options
author | jhb <jhb@FreeBSD.org> | 2015-04-02 01:02:42 +0000 |
---|---|---|
committer | jhb <jhb@FreeBSD.org> | 2015-04-02 01:02:42 +0000 |
commit | b09b758bf25e41249b9253a3a796713405f28b4d (patch) | |
tree | 7694f537b30d0bb29bc4821549a8b28e4d2fb4b4 /sys/kern/kern_tc.c | |
parent | 5fdf8ec7775f40bbf293206a9670387f9b26b1e2 (diff) | |
download | FreeBSD-src-b09b758bf25e41249b9253a3a796713405f28b4d.zip FreeBSD-src-b09b758bf25e41249b9253a3a796713405f28b4d.tar.gz |
MFC 276724:
On some Intel CPUs with a P-state but not C-state invariant TSC the TSC
may also halt in C2 and not just C3 (it seems that in some cases the BIOS
advertises its C3 state as a C2 state in _CST). Just play it safe and
disable both C2 and C3 states if a user forces the use of the TSC as the
timecounter on such CPUs.
PR: 192316
Diffstat (limited to 'sys/kern/kern_tc.c')
-rw-r--r-- | sys/kern/kern_tc.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/sys/kern/kern_tc.c b/sys/kern/kern_tc.c index 9fe7ebe..d671da5 100644 --- a/sys/kern/kern_tc.c +++ b/sys/kern/kern_tc.c @@ -1331,10 +1331,10 @@ tc_windup(void) /* Now is a good time to change timecounters. */ if (th->th_counter != timecounter) { #ifndef __arm__ - if ((timecounter->tc_flags & TC_FLAGS_C3STOP) != 0) - cpu_disable_deep_sleep++; - if ((th->th_counter->tc_flags & TC_FLAGS_C3STOP) != 0) - cpu_disable_deep_sleep--; + if ((timecounter->tc_flags & TC_FLAGS_C2STOP) != 0) + cpu_disable_c2_sleep++; + if ((th->th_counter->tc_flags & TC_FLAGS_C2STOP) != 0) + cpu_disable_c2_sleep--; #endif th->th_counter = timecounter; th->th_offset_count = ncount; |