lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20090612092737.GD30843@prithivi.gnumonks.org>
Date:	Fri, 12 Jun 2009 17:27:37 +0800
From:	Harald Welte <HaraldWelte@...tech.com>
To:	Jean Delvare <khali@...ux-fr.org>
Cc:	Tomaz Mertelj <tomaz.mertelj@...st.arnes.si>,
	Andrew Morton <akpm@...ux-foundation.org>,
	linux-kernel@...r.kernel.org, lm-sensors@...sensors.org
Subject: Re: [lm-sensors] [PATCH] hwmon: Add driver for VIA CPU core
	temperature

Hi Jean and Tomaz,

On Fri, Jun 12, 2009 at 10:12:00AM +0200, Jean Delvare wrote:
> > > Harald,
> > 
> > You carefully removed Harald from Cc: so he probably didn't read your
> > email.

That was indeed true, thanks for noticing this.

> > > via-cputemp-isa-0000
> 
> Harald, dashes in hwmon chip names are _prohibited_. Please change to
> via_cputemp or similar.

done.

> Temperature values are supposed to be expressed in millidegrees C, not
> degrees C as it seems to be doing 

> (although 25 degrees C seems pretty low for a CPU temperature?) 

It's really low, though the VIA Nano on my desk has 30 degrees C and doesn't
need a fan.  Only during kernel compiles it goes to something like 40
centigrade.

Some older C7 (Model A) had an errata where the temperature sensors had a
really high error on low temperatures.

There is also another errata with that C7 Model A, where if you underclock
the FSB of the CPU, the temperature reading would be wrong (but much too
high in that case).

Since there really is nothing we can do in software to fix this, I didn't
put any of this in the driver.  What I could do though is some bits to
add a printk() message once you load the driver on such a system.

> The drivers needs to multiply values by 1000 before exporting them to sysfs.
> Then "sensors" will report the correct temperature value.

done.  Please find an incremental patch right here:
=============
diff --git a/drivers/hwmon/via-cputemp.c b/drivers/hwmon/via-cputemp.c
index 1032355..2abe516 100644
--- a/drivers/hwmon/via-cputemp.c
+++ b/drivers/hwmon/via-cputemp.c
@@ -37,7 +37,7 @@
 #include <asm/msr.h>
 #include <asm/processor.h>
 
-#define DRVNAME	"via-cputemp"
+#define DRVNAME	"via_cputemp"
 
 typedef enum { SHOW_TEMP, SHOW_LABEL, SHOW_NAME } SHOW;
 
@@ -81,7 +81,7 @@ static ssize_t show_temp(struct device *dev,
 	if (err)
 		return -EAGAIN;
 
-	err = sprintf(buf, "%d\n", eax & 0xffffff);
+	err = sprintf(buf, "%d\n", (eax & 0xffffff) * 1000);
 
 	return err;
 }
=============

I'll re-submit the full driver after adding the above-mentioned printk.

-- 
- Harald Welte <HaraldWelte@...tech.com>	    http://linux.via.com.tw/
============================================================================
VIA Free and Open Source Software Liaison
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ