PERFORCE change 125916 for review
Constantine A. Murenin
cnst at FreeBSD.org
Fri Aug 31 16:13:03 PDT 2007
http://perforce.freebsd.org/chv.cgi?CH=125916
Change 125916 by cnst at dale on 2007/08/31 23:12:30
remove redundant comment and thread_lock/thread_unlock from stock CVS coretemp(4)
Affected files ...
.. //depot/projects/soc2007/cnst-sensors/sys.dev.coretemp/coretemp.c#7 edit
Differences ...
==== //depot/projects/soc2007/cnst-sensors/sys.dev.coretemp/coretemp.c#7 (text+ko) ====
@@ -221,25 +221,13 @@
if (smp_cpus > 1) {
thread_lock(curthread);
sched_bind(curthread, cpu);
+ msr = rdmsr(MSR_THERM_STATUS);
+ sched_unbind(curthread);
thread_unlock(curthread);
} else if (cpu != 0)
return (-1);
-
- /*
- * The digital temperature reading is located at bit 16
- * of MSR_THERM_STATUS.
- *
- * There is a bit on that MSR that indicates whether the
- * temperature is valid or not.
- *
- * The temperature is computed by subtracting the temperature
- * reading by Tj(max).
- */
- msr = rdmsr(MSR_THERM_STATUS);
-
- thread_lock(curthread);
- sched_unbind(curthread);
- thread_unlock(curthread);
+ else
+ msr = rdmsr(MSR_THERM_STATUS);
/*
* Check for Thermal Status and Thermal Status Log.
More information about the p4-projects
mailing list