summaryrefslogtreecommitdiffstats
path: root/sys/kern/kern_tc.c
diff options
context:
space:
mode:
authorjhb <jhb@FreeBSD.org>2015-01-05 20:44:44 +0000
committerjhb <jhb@FreeBSD.org>2015-01-05 20:44:44 +0000
commit55d0376a65d3179e1380bdefcea0329e58d3df75 (patch)
treeec71cc12df2ca8f19bd299ffa3546e15f67fbb62 /sys/kern/kern_tc.c
parentea343b0642d0e291f0d4c039da85c77d98c6f16b (diff)
downloadFreeBSD-src-55d0376a65d3179e1380bdefcea0329e58d3df75.zip
FreeBSD-src-55d0376a65d3179e1380bdefcea0329e58d3df75.tar.gz
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 Differential Revision: https://reviews.freebsd.org/D1441 No objection from: jkim MFC after: 1 week
Diffstat (limited to 'sys/kern/kern_tc.c')
-rw-r--r--sys/kern/kern_tc.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/sys/kern/kern_tc.c b/sys/kern/kern_tc.c
index 78ceff2..7a6b4e6 100644
--- a/sys/kern/kern_tc.c
+++ b/sys/kern/kern_tc.c
@@ -1330,10 +1330,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;
OpenPOWER on IntegriCloud