Bug 10958

Summary: LMSENSORS: 2.6.26-rc, enabling ACPI Termal Zone support costs sensors
Product: ACPI Reporter: Rafael J. Wysocki (rjw)
Component: Power-ThermalAssignee: Len Brown (lenb)
Status: CLOSED CODE_FIX    
Severity: normal CC: acpi-bugzilla, bunk, jdelvare, mhoffman, rene.herman
Priority: P1    
Hardware: All   
OS: Linux   
Kernel Version: 2.6.26-rc Subsystem:
Regression: Yes Bisected commit-id:
Bug Depends on:    
Bug Blocks: 10492    
Attachments: patch vs 2.6.26-rc8 adding CONFIG_THERMAL_HWMON

Description Rafael J. Wysocki 2008-06-22 11:10:45 UTC
Subject    : LMSENSORS: 2.6.26-rc, enabling ACPI Termal Zone support costs sensors
Submitter  : Rene Herman <rene.herman@keyaccess.nl>
Date       : 2008-06-22 0:47
References : http://marc.info/?l=linux-kernel&m=121409569819064&w=4
Handled-By : Hans de Goede <j.w.r.degoede@hhs.nl>
Handled-By : Rene Herman <rene.herman@keyaccess.nl>
Patch : http://lkml.org/lkml/2008/6/22/83

This entry is being used for tracking a regression from 2.6.25.  Please don't
close it until the problem is fixed in the mainline.
Comment 1 Hans de Goede 2008-06-22 13:33:00 UTC
Jean, Mark

Adding you to the CC, I got involved in this as I pointed out to Rene that this issue could be solved by using a newer lm_sensors userspace.

We need to atleast fix the userspace side of this in the 2.10.x branch and issue a new version there.

Other then that, although I disagree that the thermal zone driver hwmon temp export is breaking the ABI, it is causing regressions for 2.10.x users, so I think we (or rather the thermal zone code people) need to fix that too. I'm against the idea of adding yet another KConfig option for this, although that seems the easiest fix.
Comment 2 Rene Herman 2008-06-22 15:24:31 UTC
If correct, this one is even easier:

http://lkml.org/lkml/2008/6/22/243

On-list comment would be best; message has all the CCs.
Comment 3 Zhang Rui 2008-06-22 19:03:50 UTC
As it has already been fixed in the newer lm_sensors, do we still need to fix it in kernel rather than updating userspace?
Well, it's true that the patch can work around this problem but it's really ugly.
Plus, I don't think we should fix it in the thermal class, because nothing is done wrong as I can see.
IMO, if we want to fix it in kernel, we should fix the hwmon_device_register.
i.e. for a NULL device, hwmon_device_register should either fail or link it to a fake device node built by hwmon class.
any ideas? :)
Comment 4 Jean Delvare 2008-06-23 05:03:19 UTC
I second Rui's comment that Rene's patch is ugly. I do not want this to be applied to the kernel. The bug is known, it's in libsensors and it has even already been fixed there. All we have to do is release lm-sensors 2.10.7, and maybe document the issue so that users hitting the problem know that it is fixed by upgrading to lm-sensors 2.10.7.

I'm reassigning the bug to myself, as a reminder. I'll close it when lm-sensors 2.10.7 is released.
Comment 5 Len Brown 2008-06-25 22:31:02 UTC
Created attachment 16631 [details]
patch vs 2.6.26-rc8 adding CONFIG_THERMAL_HWMON

We'll use Rene's attached CONFIG_THERMAL_HWMON patch
to handle this issue for now.  Distros with an updated
libsensors can set CONFIG_THERMAL_HWMON=y,
and after some time for libsensors to deploy, we'll
make that the default.
Comment 6 Jean Delvare 2008-06-25 23:33:37 UTC
I'm fine with this patch, thanks.
Comment 7 Rene Herman 2008-06-26 04:39:43 UTC
Len,

will you be making sure it ends up in .26 or should I be pushing this myself?
Comment 8 Len Brown 2008-06-26 12:09:01 UTC
the patch in comment #5 is extracted from the ACPI release branch,
which we'll push to Linus when he returns next week.
Comment 9 Adrian Bunk 2008-06-29 14:08:49 UTC
fixed by commit 16d752397301b95abaa95cbaf9e785d221872311
Comment 10 Len Brown 2008-07-06 09:41:27 UTC
shipped in linux-2.6.26-rc9:

commit 16d752397301b95abaa95cbaf9e785d221872311
Author: Rene Herman <rene.herman@keyaccess.nl>
Date:   Tue Jun 24 19:38:56 2008 +0200

    thermal: Create CONFIG_THERMAL_HWMON=n