[Midnightbsd-cvs] src [7392] modify the name of the sleep related variables to correlate with the acpi update.
laffer1 at midnightbsd.org
laffer1 at midnightbsd.org
Sat Jan 2 18:43:03 EST 2016
Revision: 7392
http://svnweb.midnightbsd.org/src/?rev=7392
Author: laffer1
Date: 2016-01-02 18:43:03 -0500 (Sat, 02 Jan 2016)
Log Message:
-----------
modify the name of the sleep related variables to correlate with the acpi update.
Modified Paths:
--------------
trunk/sys/amd64/amd64/machdep.c
trunk/sys/i386/i386/machdep.c
trunk/sys/kern/kern_clocksource.c
trunk/sys/kern/kern_tc.c
trunk/sys/sys/timetc.h
trunk/sys/x86/x86/tsc.c
Property Changed:
----------------
trunk/sys/x86/x86/tsc.c
Modified: trunk/sys/amd64/amd64/machdep.c
===================================================================
--- trunk/sys/amd64/amd64/machdep.c 2016-01-02 21:49:31 UTC (rev 7391)
+++ trunk/sys/amd64/amd64/machdep.c 2016-01-02 23:43:03 UTC (rev 7392)
@@ -803,7 +803,7 @@
}
/* Apply AMD APIC timer C1E workaround. */
- if (cpu_ident_amdc1e && cpu_disable_deep_sleep) {
+ if (cpu_ident_amdc1e && cpu_disable_c3_sleep) {
msr = rdmsr(MSR_AMDK8_IPM);
if (msr & AMDK8_CMPHALT)
wrmsr(MSR_AMDK8_IPM, msr & ~AMDK8_CMPHALT);
Modified: trunk/sys/i386/i386/machdep.c
===================================================================
--- trunk/sys/i386/i386/machdep.c 2016-01-02 21:49:31 UTC (rev 7391)
+++ trunk/sys/i386/i386/machdep.c 2016-01-02 23:43:03 UTC (rev 7392)
@@ -1389,7 +1389,7 @@
#ifndef XEN
/* Apply AMD APIC timer C1E workaround. */
- if (cpu_ident_amdc1e && cpu_disable_deep_sleep) {
+ if (cpu_ident_amdc1e && cpu_disable_c3_sleep) {
msr = rdmsr(MSR_AMDK8_IPM);
if (msr & AMDK8_CMPHALT)
wrmsr(MSR_AMDK8_IPM, msr & ~AMDK8_CMPHALT);
Modified: trunk/sys/kern/kern_clocksource.c
===================================================================
--- trunk/sys/kern/kern_clocksource.c 2016-01-02 21:49:31 UTC (rev 7391)
+++ trunk/sys/kern/kern_clocksource.c 2016-01-02 23:43:03 UTC (rev 7392)
@@ -59,8 +59,9 @@
cyclic_clock_func_t cyclic_clock_func = NULL;
#endif
-int cpu_can_deep_sleep = 0; /* C3 state is available. */
-int cpu_disable_deep_sleep = 0; /* Timer dies in C3. */
+int cpu_deepest_sleep = 0; /* Deepest Cx state available. */
+int cpu_disable_c2_sleep = 0; /* Timer dies in C2. */
+int cpu_disable_c3_sleep = 0; /* Timer dies in C3. */
static void setuptimer(void);
static void loadtimer(struct bintime *now, int first);
@@ -655,7 +656,7 @@
else if (!periodic && (timer->et_flags & ET_FLAGS_ONESHOT) == 0)
periodic = 1;
if (timer->et_flags & ET_FLAGS_C3STOP)
- cpu_disable_deep_sleep++;
+ cpu_disable_c3_sleep++;
/*
* We honor the requested 'hz' value.
@@ -933,9 +934,9 @@
configtimer(0);
et_free(timer);
if (et->et_flags & ET_FLAGS_C3STOP)
- cpu_disable_deep_sleep++;
+ cpu_disable_c3_sleep++;
if (timer->et_flags & ET_FLAGS_C3STOP)
- cpu_disable_deep_sleep--;
+ cpu_disable_c3_sleep--;
periodic = want_periodic;
timer = et;
et_init(timer, timercb, NULL, NULL);
Modified: trunk/sys/kern/kern_tc.c
===================================================================
--- trunk/sys/kern/kern_tc.c 2016-01-02 21:49:31 UTC (rev 7391)
+++ trunk/sys/kern/kern_tc.c 2016-01-02 23:43:03 UTC (rev 7392)
@@ -10,6 +10,7 @@
#include <sys/cdefs.h>
__FBSDID("$MidnightBSD$");
+#include "opt_compat.h"
#include "opt_ntp.h"
#include <sys/param.h>
@@ -99,7 +100,7 @@
NULL, 0, sysctl_kern_boottime, "S,timeval", "System boottime");
SYSCTL_NODE(_kern, OID_AUTO, timecounter, CTLFLAG_RW, 0, "");
-SYSCTL_NODE(_kern_timecounter, OID_AUTO, tc, CTLFLAG_RW, 0, "");
+static SYSCTL_NODE(_kern_timecounter, OID_AUTO, tc, CTLFLAG_RW, 0, "");
static int timestepwarnings;
SYSCTL_INT(_kern_timecounter, OID_AUTO, stepwarnings, CTLFLAG_RW,
@@ -493,10 +494,10 @@
/* 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;
Modified: trunk/sys/sys/timetc.h
===================================================================
--- trunk/sys/sys/timetc.h 2016-01-02 21:49:31 UTC (rev 7391)
+++ trunk/sys/sys/timetc.h 2016-01-02 23:43:03 UTC (rev 7392)
@@ -58,7 +58,7 @@
* means "only use at explicit request".
*/
u_int tc_flags;
-#define TC_FLAGS_C3STOP 1 /* Timer dies in C3. */
+#define TC_FLAGS_C2STOP 1 /* Timer dies in C2+. */
void *tc_priv;
/* Pointer to the timecounter's private parts. */
Modified: trunk/sys/x86/x86/tsc.c
===================================================================
--- trunk/sys/x86/x86/tsc.c 2016-01-02 21:49:31 UTC (rev 7391)
+++ trunk/sys/x86/x86/tsc.c 2016-01-02 23:43:03 UTC (rev 7392)
@@ -449,12 +449,12 @@
* Currently only Intel CPUs are known for this problem unless
* the invariant TSC bit is set.
*/
- if (cpu_can_deep_sleep && cpu_vendor_id == CPU_VENDOR_INTEL &&
+ if (cpu_deepest_sleep >= 2 && cpu_vendor_id == CPU_VENDOR_INTEL &&
(amd_pminfo & AMDPM_TSC_INVARIANT) == 0) {
tsc_timecounter.tc_quality = -1000;
- tsc_timecounter.tc_flags |= TC_FLAGS_C3STOP;
+ tsc_timecounter.tc_flags |= TC_FLAGS_C2STOP;
if (bootverbose)
- printf("TSC timecounter disabled: C3 enabled.\n");
+ printf("TSC timecounter disabled: C2/C3 enabled.\n");
goto init;
}
Property changes on: trunk/sys/x86/x86/tsc.c
___________________________________________________________________
Deleted: cvs2svn:cvs-rev
## -1 +0,0 ##
-1.1.1.1
\ No newline at end of property
More information about the Midnightbsd-cvs
mailing list