[lm-sensors] hwmon: (coretemp) Check the sensor existence instead of enumeration
huaxu.wan at linux.intel.com
Fri Jan 8 17:01:44 CET 2010
On 11:28 Fri 08 Jan, Jean Delvare wrote:
> Hi Huaxu,
> On Fri, 8 Jan 2010 17:23:27 +0800, Huaxu Wan wrote:
> > hwmon: (coretemp) Check the sensor existence instead of enumeration.
> > The processor supports a digital thermal sensor if CPUID.06H.EAX = 1.
> > Signed-off-by: Huaxu Wan <huaxu.wan at linux.intel.com>
> > ---
> > Documentation/hwmon/coretemp | 3 ---
> > drivers/hwmon/coretemp.c | 24 +++++++-----------------
> > 2 files changed, 7 insertions(+), 20 deletions(-)
> Hmm. I don't like it for two reasons:
> * Which guarantee do we have that "the processor supports a digital
> thermal sensor" implies that this digital thermal sensor is
> compatible with what the Core/Core2/Atom have? Couldn't the format
> change in the future?
It's quote from page 612 of Software Developer’s Manual V3A(14.5.5 On
Die Digital Thermal Sensors). Look from the history, I think it's
compatible with Core/Core2/Atom and even the feature CPU. Actually, this
patch has tested on old P4, Core2, i3(launched today?) system, all works
> * Each CPU model has its own high temperature limit, which we use to
> compute the current temperature. So we can't pretend that we support
> all future CPU models, we really do not. Just look at how complex
> function adjust_tjmax is.
TjMax varies with specific CPU series, sometimes even different within
same modle for industrial temperature. At this point, we can't support
all feature CPU models, but we can support all the released CPUs. I had
a plan to make an investigation about those.
> It would only make sense to have "universal" support if the driver
> could report a relative value. Unfortunately our sysfs interface
> doesn't support this, although there have been discussions on that
> topic lately:
This patch avoid to patch everytime for new release CPU. We foucs on
the adjust_tjmax function calibration. I think the effort is much less
than calibration for each CPU model.
BTW, I saw openBSD use the CPUID.06H.EAX to identify the sensor.
More information about the lm-sensors