* ACPI reads wrong temperature
@ 2008-10-31 14:02 Peter Mahlknecht
2008-10-31 14:30 ` Matthew Garrett
0 siblings, 1 reply; 16+ messages in thread
From: Peter Mahlknecht @ 2008-10-31 14:02 UTC (permalink / raw)
To: linux-acpi
Hi,
I installed Debian Lenny (2.6.26-1-686) on my notebook (Samsung P40 with the latest Bios 09HK), but the notebook continued to shutting down with the message "Critical temperature reached (65535 C). Shutting down.".
To stop this I patched the thermal module, so that it ignores every temperature above 1000 C.
The wrong temperatuer is also listed in /proc/acpi/thermal_zone/THRM/temperature. Using lm-sensors I get the following output:
sensors
acpitz-virtual-0
Adapter: Virtual device
temp1: +65535.0°C (crit = +105.0°C)
max6657-i2c-0-4c
Adapter: SMBus I801 adapter at 18e0
M/B Temp: +39.0°C (low = -65.0°C, high = +127.0°C)
(crit = +110.0°C, hyst = +100.0°C)
CPU Temp: +44.4°C (low = +35.1°C, high = +57.1°C)
(crit = +110.0°C, hyst = +100.0°C)
The acpitz-virtual-0 device is the temperature that the kernel-acpi-module reads. The temperature listed under CPU Temp is the temperature read directly by lm-sensors, which seems to be right (at least it's in the same range as when running windows).
Strange is, that during boot the right temperature seems to be read:
[ 10.519291] ACPI: Thermal Zone [THRM] (58 C)
I had the same problem also with the 2.6.18-6-686 (Lenny) and with Ubuntu Hardy Heron (think the kernel was 2.6.24).
Can somenone give me a hint how I can fix the ACPI temperatuer reading? What other logs, system outputs should I post?
B.R. Peter
--
Psssst! Schon vom neuen GMX MultiMessenger gehört? Der kann`s mit allen: http://www.gmx.net/de/go/multimessenger
--
To unsubscribe from this list: send the line "unsubscribe linux-acpi" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: ACPI reads wrong temperature
2008-10-31 14:02 ACPI reads wrong temperature Peter Mahlknecht
@ 2008-10-31 14:30 ` Matthew Garrett
2008-10-31 21:09 ` Peter Mahlknecht
0 siblings, 1 reply; 16+ messages in thread
From: Matthew Garrett @ 2008-10-31 14:30 UTC (permalink / raw)
To: Peter Mahlknecht; +Cc: linux-acpi
On Fri, Oct 31, 2008 at 03:02:47PM +0100, Peter Mahlknecht wrote:
> Hi,
> I installed Debian Lenny (2.6.26-1-686) on my notebook (Samsung P40 with the latest Bios 09HK), but the notebook continued to shutting down with the message "Critical temperature reached (65535 C). Shutting down.".
> To stop this I patched the thermal module, so that it ignores every temperature above 1000 C.
Do you get wrong temperatures if you never load the max6657 driver?
--
Matthew Garrett | mjg59@srcf.ucam.org
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: ACPI reads wrong temperature
2008-10-31 14:30 ` Matthew Garrett
@ 2008-10-31 21:09 ` Peter Mahlknecht
2008-11-02 9:25 ` Matthew Garrett
0 siblings, 1 reply; 16+ messages in thread
From: Peter Mahlknecht @ 2008-10-31 21:09 UTC (permalink / raw)
To: Matthew Garrett; +Cc: linux-acpi
-------- Original-Nachricht --------
> Datum: Fri, 31 Oct 2008 14:30:30 +0000
> Von: Matthew Garrett <mjg59@srcf.ucam.org>
> An: Peter Mahlknecht <mali100@gmx.net>
> CC: linux-acpi@vger.kernel.org
> Betreff: Re: ACPI reads wrong temperature
> On Fri, Oct 31, 2008 at 03:02:47PM +0100, Peter Mahlknecht wrote:
> > Hi,
> > I installed Debian Lenny (2.6.26-1-686) on my notebook (Samsung P40 with
> the latest Bios 09HK), but the notebook continued to shutting down with
> the message "Critical temperature reached (65535 C). Shutting down.".
> > To stop this I patched the thermal module, so that it ignores every
> temperature above 1000 C.
>
> Do you get wrong temperatures if you never load the max6657 driver?
Thanks for the hint. I get the wrong temperatures after loading the lm90 module (hwmon driver), but also if i load em28xx_cx25843, which is a part of the driver for my tv-card. Both modules depend on i2c-core, so probably the bug is related to the i2c bus?
B.R. Peter
--
"Feel free" - 10 GB Mailbox, 100 FreeSMS/Monat ...
Jetzt GMX TopMail testen: http://www.gmx.net/de/go/topmail
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: ACPI reads wrong temperature
2008-10-31 21:09 ` Peter Mahlknecht
@ 2008-11-02 9:25 ` Matthew Garrett
2008-11-02 11:31 ` Peter Mahlknecht
0 siblings, 1 reply; 16+ messages in thread
From: Matthew Garrett @ 2008-11-02 9:25 UTC (permalink / raw)
To: Peter Mahlknecht; +Cc: linux-acpi
On Fri, Oct 31, 2008 at 10:09:13PM +0100, Peter Mahlknecht wrote:
> Thanks for the hint. I get the wrong temperatures after loading the
> lm90 module (hwmon driver), but also if i load em28xx_cx25843, which
> is a part of the driver for my tv-card. Both modules depend on
> i2c-core, so probably the bug is related to the i2c bus?
In the lm90 case it's almost certainly because you have the firmware and
Linux trying to access the chip at the same time. Since it has indexed
registers, this fails very miserably. I'm surprised that the TV card
driver has any effect - it should be on an entirely spearate i2c bus.
Are you sure you don't have lm90 loaded in that case?
--
Matthew Garrett | mjg59@srcf.ucam.org
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: ACPI reads wrong temperature
2008-11-02 9:25 ` Matthew Garrett
@ 2008-11-02 11:31 ` Peter Mahlknecht
2008-11-03 2:05 ` Zhao Yakui
0 siblings, 1 reply; 16+ messages in thread
From: Peter Mahlknecht @ 2008-11-02 11:31 UTC (permalink / raw)
To: Matthew Garrett; +Cc: linux-acpi
> > Thanks for the hint. I get the wrong temperatures after loading the
> > lm90 module (hwmon driver), but also if i load em28xx_cx25843, which
> > is a part of the driver for my tv-card. Both modules depend on
> > i2c-core, so probably the bug is related to the i2c bus?
>
> In the lm90 case it's almost certainly because you have the firmware and
> Linux trying to access the chip at the same time. Since it has indexed
> registers, this fails very miserably. I'm surprised that the TV card
> driver has any effect - it should be on an entirely spearate i2c bus.
> Are you sure you don't have lm90 loaded in that case?
Yes, I am. I had also a talk with the author of the Tv-card driver and he suggested to but the problem on the lm-sensors ml: http://lists.lm-sensors.org/pipermail/lm-sensors/2008-November/024610.html
We know now that the problem is related to the i2c-i801 driver.
Peter
--
Psssst! Schon vom neuen GMX MultiMessenger gehört? Der kann`s mit allen: http://www.gmx.net/de/go/multimessenger
--
To unsubscribe from this list: send the line "unsubscribe linux-acpi" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: ACPI reads wrong temperature
2008-11-02 11:31 ` Peter Mahlknecht
@ 2008-11-03 2:05 ` Zhao Yakui
2008-11-03 9:01 ` Peter Mahlknecht
0 siblings, 1 reply; 16+ messages in thread
From: Zhao Yakui @ 2008-11-03 2:05 UTC (permalink / raw)
To: Peter Mahlknecht; +Cc: Matthew Garrett, linux-acpi@vger.kernel.org
On Sun, 2008-11-02 at 19:31 +0800, Peter Mahlknecht wrote:
> > > Thanks for the hint. I get the wrong temperatures after loading the
> > > lm90 module (hwmon driver), but also if i load em28xx_cx25843, which
> > > is a part of the driver for my tv-card. Both modules depend on
> > > i2c-core, so probably the bug is related to the i2c bus?
> >
> > In the lm90 case it's almost certainly because you have the firmware and
> > Linux trying to access the chip at the same time. Since it has indexed
> > registers, this fails very miserably. I'm surprised that the TV card
> > driver has any effect - it should be on an entirely spearate i2c bus.
> > Are you sure you don't have lm90 loaded in that case?
> Yes, I am. I had also a talk with the author of the Tv-card driver and he suggested to but the problem on the lm-sensors ml: http://lists.lm-sensors.org/pipermail/lm-sensors/2008-November/024610.html
> We know now that the problem is related to the i2c-i801 driver.
Yes. This is related with i2c-i801 driver.
We have a similar bug.
http://bugzilla.kernel.org/show_bug.cgi?id=10245
In this bug after the driver of lm_sensor is loaded, the system read the
incorrect temperature. The root cause is that the SMBus is used by ACPI
for thermal management. After the lm_sensor is loaded, Linux will use
the same bus. There is the conflict. So if the Linux doesn't attach the
driver to the SMbus, it will be OK.
Will you please attach the output of acpidump, lspci -vxxx?
Thanks.
>
> Peter
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: ACPI reads wrong temperature
2008-11-03 2:05 ` Zhao Yakui
@ 2008-11-03 9:01 ` Peter Mahlknecht
2008-11-03 14:50 ` Zhao, Yakui
0 siblings, 1 reply; 16+ messages in thread
From: Peter Mahlknecht @ 2008-11-03 9:01 UTC (permalink / raw)
To: Zhao Yakui; +Cc: linux-acpi, mjg
[-- Attachment #1: Type: text/plain, Size: 1988 bytes --]
-------- Original-Nachricht --------
> Datum: Mon, 03 Nov 2008 10:05:36 +0800
> Von: Zhao Yakui <yakui.zhao@intel.com>
> An: Peter Mahlknecht <mali100@gmx.net>
> CC: Matthew Garrett <mjg@redhat.com>, "linux-acpi@vger.kernel.org" <linux-acpi@vger.kernel.org>
> Betreff: Re: ACPI reads wrong temperature
> On Sun, 2008-11-02 at 19:31 +0800, Peter Mahlknecht wrote:
> > > > Thanks for the hint. I get the wrong temperatures after loading the
> > > > lm90 module (hwmon driver), but also if i load em28xx_cx25843, which
> > > > is a part of the driver for my tv-card. Both modules depend on
> > > > i2c-core, so probably the bug is related to the i2c bus?
> > >
> > > In the lm90 case it's almost certainly because you have the firmware
> and
> > > Linux trying to access the chip at the same time. Since it has indexed
> > > registers, this fails very miserably. I'm surprised that the TV card
> > > driver has any effect - it should be on an entirely spearate i2c bus.
> > > Are you sure you don't have lm90 loaded in that case?
> > Yes, I am. I had also a talk with the author of the Tv-card driver and
> he suggested to but the problem on the lm-sensors ml:
> http://lists.lm-sensors.org/pipermail/lm-sensors/2008-November/024610.html
> > We know now that the problem is related to the i2c-i801 driver.
> Yes. This is related with i2c-i801 driver.
> We have a similar bug.
> http://bugzilla.kernel.org/show_bug.cgi?id=10245
>
> In this bug after the driver of lm_sensor is loaded, the system read the
> incorrect temperature. The root cause is that the SMBus is used by ACPI
> for thermal management. After the lm_sensor is loaded, Linux will use
> the same bus. There is the conflict. So if the Linux doesn't attach the
> driver to the SMbus, it will be OK.
>
> Will you please attach the output of acpidump, lspci -vxxx?
I attached the two files.
Peter
--
Psssst! Schon vom neuen GMX MultiMessenger gehört? Der kann`s mit allen: http://www.gmx.net/de/go/multimessenger
[-- Attachment #2: smbus_acpi.tar.gz --]
[-- Type: application/x-gzip, Size: 34488 bytes --]
^ permalink raw reply [flat|nested] 16+ messages in thread
* RE: ACPI reads wrong temperature
2008-11-03 9:01 ` Peter Mahlknecht
@ 2008-11-03 14:50 ` Zhao, Yakui
2008-11-03 14:57 ` Matthew Garrett
0 siblings, 1 reply; 16+ messages in thread
From: Zhao, Yakui @ 2008-11-03 14:50 UTC (permalink / raw)
To: Peter Mahlknecht; +Cc: linux-acpi@vger.kernel.org, mjg@redhat.com
Thanks for the info.
From the attached info we can know that the I/O start address for SMbus is 0x18E0. And SMbus is internally used in AML code.
If the I2C-i801 driver is loaded, there is the conflict between BIOS and OS.
So I think that it is a BIOS bug. And this can't be fixed by Linux-kernel.
It had better fixed by BIOS upgrading.
Thanks.
-----Original Message-----
From: Peter Mahlknecht [mailto:mali100@gmx.net]
Sent: 2008年11月3日 17:02
To: Zhao, Yakui
Cc: linux-acpi@vger.kernel.org; mjg@redhat.com
Subject: Re: ACPI reads wrong temperature
-------- Original-Nachricht --------
> Datum: Mon, 03 Nov 2008 10:05:36 +0800
> Von: Zhao Yakui <yakui.zhao@intel.com>
> An: Peter Mahlknecht <mali100@gmx.net>
> CC: Matthew Garrett <mjg@redhat.com>, "linux-acpi@vger.kernel.org" <linux-acpi@vger.kernel.org>
> Betreff: Re: ACPI reads wrong temperature
> On Sun, 2008-11-02 at 19:31 +0800, Peter Mahlknecht wrote:
> > > > Thanks for the hint. I get the wrong temperatures after loading the
> > > > lm90 module (hwmon driver), but also if i load em28xx_cx25843, which
> > > > is a part of the driver for my tv-card. Both modules depend on
> > > > i2c-core, so probably the bug is related to the i2c bus?
> > >
> > > In the lm90 case it's almost certainly because you have the firmware
> and
> > > Linux trying to access the chip at the same time. Since it has indexed
> > > registers, this fails very miserably. I'm surprised that the TV card
> > > driver has any effect - it should be on an entirely spearate i2c bus.
> > > Are you sure you don't have lm90 loaded in that case?
> > Yes, I am. I had also a talk with the author of the Tv-card driver and
> he suggested to but the problem on the lm-sensors ml:
> http://lists.lm-sensors.org/pipermail/lm-sensors/2008-November/024610.html
> > We know now that the problem is related to the i2c-i801 driver.
> Yes. This is related with i2c-i801 driver.
> We have a similar bug.
> http://bugzilla.kernel.org/show_bug.cgi?id=10245
>
> In this bug after the driver of lm_sensor is loaded, the system read the
> incorrect temperature. The root cause is that the SMBus is used by ACPI
> for thermal management. After the lm_sensor is loaded, Linux will use
> the same bus. There is the conflict. So if the Linux doesn't attach the
> driver to the SMbus, it will be OK.
>
> Will you please attach the output of acpidump, lspci -vxxx?
I attached the two files.
Peter
--
Psssst! Schon vom neuen GMX MultiMessenger gehört? Der kann`s mit allen: http://www.gmx.net/de/go/multimessenger
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: ACPI reads wrong temperature
2008-11-03 14:50 ` Zhao, Yakui
@ 2008-11-03 14:57 ` Matthew Garrett
2008-11-03 17:47 ` Len Brown
0 siblings, 1 reply; 16+ messages in thread
From: Matthew Garrett @ 2008-11-03 14:57 UTC (permalink / raw)
To: Zhao, Yakui; +Cc: Peter Mahlknecht, linux-acpi@vger.kernel.org
On Mon, Nov 03, 2008 at 10:50:27PM +0800, Zhao, Yakui wrote:
> Thanks for the info.
> From the attached info we can know that the I/O start address for SMbus is 0x18E0. And SMbus is internally used in AML code.
>
> If the I2C-i801 driver is loaded, there is the conflict between BIOS and OS.
>
> So I think that it is a BIOS bug. And this can't be fixed by Linux-kernel.
I don't think the BIOS is doing anything wrong here. It's entitled to
assume that the operating system won't load drivers for hardware it's
not declaring.
--
Matthew Garrett | mjg59@srcf.ucam.org
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: ACPI reads wrong temperature
2008-11-03 14:57 ` Matthew Garrett
@ 2008-11-03 17:47 ` Len Brown
2008-11-03 17:48 ` Matthew Garrett
0 siblings, 1 reply; 16+ messages in thread
From: Len Brown @ 2008-11-03 17:47 UTC (permalink / raw)
To: Matthew Garrett; +Cc: Zhao, Yakui, Peter Mahlknecht, linux-acpi@vger.kernel.org
> I don't think the BIOS is doing anything wrong here. It's entitled to
> assume that the operating system won't load drivers for hardware it's
> not declaring.
agreed, we need a linux solution.
-len
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: ACPI reads wrong temperature
2008-11-03 17:47 ` Len Brown
@ 2008-11-03 17:48 ` Matthew Garrett
2008-11-06 6:12 ` Zhao Yakui
0 siblings, 1 reply; 16+ messages in thread
From: Matthew Garrett @ 2008-11-03 17:48 UTC (permalink / raw)
To: Len Brown; +Cc: Zhao, Yakui, Peter Mahlknecht, linux-acpi@vger.kernel.org
On Mon, Nov 03, 2008 at 12:47:19PM -0500, Len Brown wrote:
>
> > I don't think the BIOS is doing anything wrong here. It's entitled to
> > assume that the operating system won't load drivers for hardware it's
> > not declaring.
>
> agreed, we need a linux solution.
There's a kernel warning in this kind of situation, but IIRC we were
still at the point where there were false positives.
--
Matthew Garrett | mjg59@srcf.ucam.org
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: ACPI reads wrong temperature
2008-11-03 17:48 ` Matthew Garrett
@ 2008-11-06 6:12 ` Zhao Yakui
2008-11-06 9:11 ` Matthew Garrett
0 siblings, 1 reply; 16+ messages in thread
From: Zhao Yakui @ 2008-11-06 6:12 UTC (permalink / raw)
To: Matthew Garrett; +Cc: Len Brown, Peter Mahlknecht, linux-acpi@vger.kernel.org
On Tue, 2008-11-04 at 01:48 +0800, Matthew Garrett wrote:
> On Mon, Nov 03, 2008 at 12:47:19PM -0500, Len Brown wrote:
> >
> > > I don't think the BIOS is doing anything wrong here. It's entitled to
> > > assume that the operating system won't load drivers for hardware it's
> > > not declaring.
> >
> > agreed, we need a linux solution.
>
> There's a kernel warning in this kind of situation, but IIRC we were
> still at the point where there were false positives.
On your box after the i2c-i801 driver is loaded, the smbus controller
will be used by the AML code and i2c-i801 driver. Unfortunately there is
no synchronization between them. IMO this is the BIOS fault. The SMbus
will be accessed by the two different modules. But it is exported by
BIOS.
So the better solution is that:
a. SMBus is hidden in BIOS. In such case the Linux OS can't detect
the SMbus controller . Of course it won't try to load the device driver
for it.
b. Linux OS won't load the device driver for it.
thanks.
>
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: ACPI reads wrong temperature
2008-11-06 6:12 ` Zhao Yakui
@ 2008-11-06 9:11 ` Matthew Garrett
2008-11-12 22:20 ` Thomas Renninger
0 siblings, 1 reply; 16+ messages in thread
From: Matthew Garrett @ 2008-11-06 9:11 UTC (permalink / raw)
To: Zhao Yakui; +Cc: Len Brown, Peter Mahlknecht, linux-acpi@vger.kernel.org
On Thu, Nov 06, 2008 at 02:12:52PM +0800, Zhao Yakui wrote:
> On your box after the i2c-i801 driver is loaded, the smbus controller
> will be used by the AML code and i2c-i801 driver. Unfortunately there is
> no synchronization between them. IMO this is the BIOS fault. The SMbus
> will be accessed by the two different modules. But it is exported by
> BIOS.
No, loading i2c-i801 is harmless. The breakage occurs when you attempt
to drive the smbus.
> So the better solution is that:
> a. SMBus is hidden in BIOS. In such case the Linux OS can't detect
> the SMbus controller . Of course it won't try to load the device driver
> for it.
> b. Linux OS won't load the device driver for it.
The solution is for users not to load smbus drivers unless they know for
certain that it's safe to do so, or alternatively for us to refuse to
load i2c drivers if they overlap with ACPI resource allocations.
--
Matthew Garrett | mjg59@srcf.ucam.org
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: ACPI reads wrong temperature
2008-11-06 9:11 ` Matthew Garrett
@ 2008-11-12 22:20 ` Thomas Renninger
2008-11-12 22:27 ` Matthew Garrett
2008-11-13 10:24 ` Jean Delvare
0 siblings, 2 replies; 16+ messages in thread
From: Thomas Renninger @ 2008-11-12 22:20 UTC (permalink / raw)
To: Matthew Garrett
Cc: Zhao Yakui, Len Brown, Peter Mahlknecht,
linux-acpi@vger.kernel.org, khali
On Thursday 06 November 2008 03:11:26 am Matthew Garrett wrote:
> On Thu, Nov 06, 2008 at 02:12:52PM +0800, Zhao Yakui wrote:
> > On your box after the i2c-i801 driver is loaded, the smbus controller
> > will be used by the AML code and i2c-i801 driver. Unfortunately there is
> > no synchronization between them. IMO this is the BIOS fault. The SMbus
> > will be accessed by the two different modules. But it is exported by
> > BIOS.
>
> No, loading i2c-i801 is harmless. The breakage occurs when you attempt
> to drive the smbus.
>
> > So the better solution is that:
> > a. SMBus is hidden in BIOS. In such case the Linux OS can't detect
> > the SMbus controller . Of course it won't try to load the device driver
> > for it.
> > b. Linux OS won't load the device driver for it.
>
> The solution is for users not to load smbus drivers unless they know for
> certain that it's safe to do so, or alternatively for us to refuse to
> load i2c drivers if they overlap with ACPI resource allocations.
We already have that:
> or alternatively for us to refuse to load i2c drivers
in drivers/acpi/osl.c:
#define ENFORCE_RESOURCES_STRICT 2
#define ENFORCE_RESOURCES_LAX 1
#define ENFORCE_RESOURCES_NO 0
static unsigned int acpi_enforce_resources = ENFORCE_RESOURCES_LAX;
lax means print out warning which i2c driver conflicts with which ACPI
Operation Region.
Did you get such a message:
printk("%sACPI: %s resource %s [0x%llx-0x%llx]"
" conflicts with ACPI region %s"
" [0x%llx-0x%llx]\n",
acpi_enforce_resources == ENFORCE_RESOURCES_LAX
? KERN_WARNING : KERN_ERR,
ioport ? "I/O" : "Memory", res->name,
(long long) res->start, (long long) res->end,
res_list_elem->name,
(long long) res_list_elem->start,
(long long) res_list_elem->end);
If not, probably this specific i2c driver has to be added to check it's
resources against ACPI used Operation Regions.
Jean: Could you add that if necessary, pls.
This is the whole thread:
http://marc.info/?t=122546192400002&r=1&w=2
Thanks,
Thomas
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: ACPI reads wrong temperature
2008-11-12 22:20 ` Thomas Renninger
@ 2008-11-12 22:27 ` Matthew Garrett
2008-11-13 10:24 ` Jean Delvare
1 sibling, 0 replies; 16+ messages in thread
From: Matthew Garrett @ 2008-11-12 22:27 UTC (permalink / raw)
To: Thomas Renninger
Cc: Zhao Yakui, Len Brown, Peter Mahlknecht,
linux-acpi@vger.kernel.org, khali
On Wed, Nov 12, 2008 at 04:20:43PM -0600, Thomas Renninger wrote:
> On Thursday 06 November 2008 03:11:26 am Matthew Garrett wrote:
> > On Thu, Nov 06, 2008 at 02:12:52PM +0800, Zhao Yakui wrote:
> > > On your box after the i2c-i801 driver is loaded, the smbus controller
> > > will be used by the AML code and i2c-i801 driver. Unfortunately there is
> > > no synchronization between them. IMO this is the BIOS fault. The SMbus
> > > will be accessed by the two different modules. But it is exported by
> > > BIOS.
> >
> > No, loading i2c-i801 is harmless. The breakage occurs when you attempt
> > to drive the smbus.
> >
> > > So the better solution is that:
> > > a. SMBus is hidden in BIOS. In such case the Linux OS can't detect
> > > the SMbus controller . Of course it won't try to load the device driver
> > > for it.
> > > b. Linux OS won't load the device driver for it.
> >
> > The solution is for users not to load smbus drivers unless they know for
> > certain that it's safe to do so, or alternatively for us to refuse to
> > load i2c drivers if they overlap with ACPI resource allocations.
>
> We already have that:
> > or alternatively for us to refuse to load i2c drivers
> in drivers/acpi/osl.c:
>
> #define ENFORCE_RESOURCES_STRICT 2
> #define ENFORCE_RESOURCES_LAX 1
> #define ENFORCE_RESOURCES_NO 0
>
> static unsigned int acpi_enforce_resources = ENFORCE_RESOURCES_LAX;
>
> lax means print out warning which i2c driver conflicts with which ACPI
> Operation Region.
> Did you get such a message:
According to his logs, the warning was printed.
--
Matthew Garrett | mjg59@srcf.ucam.org
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: ACPI reads wrong temperature
2008-11-12 22:20 ` Thomas Renninger
2008-11-12 22:27 ` Matthew Garrett
@ 2008-11-13 10:24 ` Jean Delvare
1 sibling, 0 replies; 16+ messages in thread
From: Jean Delvare @ 2008-11-13 10:24 UTC (permalink / raw)
To: Thomas Renninger
Cc: Matthew Garrett, Zhao Yakui, Len Brown, Peter Mahlknecht,
linux-acpi@vger.kernel.org
Hi Thomas,
On Wed, 12 Nov 2008 16:20:43 -0600, Thomas Renninger wrote:
> On Thursday 06 November 2008 03:11:26 am Matthew Garrett wrote:
> > On Thu, Nov 06, 2008 at 02:12:52PM +0800, Zhao Yakui wrote:
> > > On your box after the i2c-i801 driver is loaded, the smbus controller
> > > will be used by the AML code and i2c-i801 driver. Unfortunately there is
> > > no synchronization between them. IMO this is the BIOS fault. The SMbus
> > > will be accessed by the two different modules. But it is exported by
> > > BIOS.
> >
> > No, loading i2c-i801 is harmless. The breakage occurs when you attempt
> > to drive the smbus.
> >
> > > So the better solution is that:
> > > a. SMBus is hidden in BIOS. In such case the Linux OS can't detect
> > > the SMbus controller . Of course it won't try to load the device driver
> > > for it.
> > > b. Linux OS won't load the device driver for it.
> >
> > The solution is for users not to load smbus drivers unless they know for
> > certain that it's safe to do so, or alternatively for us to refuse to
Except that all these drivers auto-load, so the user doesn't actually
get to verify anything beforehand. Nor do I believe they should have
to. If there's a way for the user to verify that loading the driver is
safe then the same check can be added to the driver itself. Which, as
Thomas explained, is partly implemented, just not yet enforced.
> > load i2c drivers if they overlap with ACPI resource allocations.
>
> We already have that:
> > or alternatively for us to refuse to load i2c drivers
> in drivers/acpi/osl.c:
>
> #define ENFORCE_RESOURCES_STRICT 2
> #define ENFORCE_RESOURCES_LAX 1
> #define ENFORCE_RESOURCES_NO 0
>
> static unsigned int acpi_enforce_resources = ENFORCE_RESOURCES_LAX;
>
> lax means print out warning which i2c driver conflicts with which ACPI
> Operation Region.
> Did you get such a message:
> printk("%sACPI: %s resource %s [0x%llx-0x%llx]"
> " conflicts with ACPI region %s"
> " [0x%llx-0x%llx]\n",
> acpi_enforce_resources == ENFORCE_RESOURCES_LAX
> ? KERN_WARNING : KERN_ERR,
> ioport ? "I/O" : "Memory", res->name,
> (long long) res->start, (long long) res->end,
> res_list_elem->name,
> (long long) res_list_elem->start,
> (long long) res_list_elem->end);
>
> If not, probably this specific i2c driver has to be added to check it's
> resources against ACPI used Operation Regions.
>
> Jean: Could you add that if necessary, pls.
> This is the whole thread:
> http://marc.info/?t=122546192400002&r=1&w=2
The i2c-i801 driver already has this check.
The exact same issue (reported by the same person) was already
discussed on the lm-sensors list:
http://lists.lm-sensors.org/pipermail/lm-sensors/2008-October/024608.html
http://lists.lm-sensors.org/pipermail/lm-sensors/2008-November/024610.html
With the same conclusion, i.e. i2c-i801 should be blacklisted on that
specific model, or acpi_enforce_resources=strict should be used. Or the
BIOS should hide the SMBus, that would be even better.
--
Jean Delvare
^ permalink raw reply [flat|nested] 16+ messages in thread
end of thread, other threads:[~2008-11-13 10:24 UTC | newest]
Thread overview: 16+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-10-31 14:02 ACPI reads wrong temperature Peter Mahlknecht
2008-10-31 14:30 ` Matthew Garrett
2008-10-31 21:09 ` Peter Mahlknecht
2008-11-02 9:25 ` Matthew Garrett
2008-11-02 11:31 ` Peter Mahlknecht
2008-11-03 2:05 ` Zhao Yakui
2008-11-03 9:01 ` Peter Mahlknecht
2008-11-03 14:50 ` Zhao, Yakui
2008-11-03 14:57 ` Matthew Garrett
2008-11-03 17:47 ` Len Brown
2008-11-03 17:48 ` Matthew Garrett
2008-11-06 6:12 ` Zhao Yakui
2008-11-06 9:11 ` Matthew Garrett
2008-11-12 22:20 ` Thomas Renninger
2008-11-12 22:27 ` Matthew Garrett
2008-11-13 10:24 ` Jean Delvare
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox