Re: AE_ERROR, ACPI thermal trip point state changed

From: NÃmeth MÃrton
Date: Wed Nov 19 2008 - 17:20:37 EST


Hi,

Andi Kleen wrote:
> NÃmeth MÃrton <nm127@xxxxxxxxxxx> writes:
>> As of 2.6.27-rc3 the patch is still not included in the mainstream. I
>> hope that this patch was not forgotten completely.
>
> It's already in Linus' tree, will be in rc4.

I compiled and tried 2.6.28-rc5. In the dmesg I get the following message:

[ 63.589603] ACPI Exception (thermal-0538): AE_ERROR, ACPI thermal trip point state changed
[ 63.589669] Please send acpidump to linux-acpi@xxxxxxxxxxxxxxx
[ 63.589805] [20080926]

The original patch still applies for 2.6.28-rc5 (with some offsets). This patch
is not included in 2.6.28-rc5, yet. The "AE_ERROR..." message does not appear
any more if I apply the patch. I attached this original patch for easier reference.

Regards,

MÃrton NÃmeth


thermal fixup for broken BIOS which has invalid trip points.

ACPI thermal driver only re-evaluate valid trip points.
For the broken BIOS show in
http://bugzilla.kernel.org/show_bug.cgi?id=8544
the active[0] is set to invalid at boot time
and it will not be re-evaluated again.
We can still get a warning message at boot time.

http://marc.info/?l=linux-kernel&m=120496222629983&w=2

Signed-off-by: Zhang Rui<rui.zhang@xxxxxxxxx>
---
drivers/acpi/thermal.c | 16 ++++++++++++----
1 file changed, 12 insertions(+), 4 deletions(-)

Index: linux-2.6/drivers/acpi/thermal.c
===================================================================
--- linux-2.6.orig/drivers/acpi/thermal.c
+++ linux-2.6/drivers/acpi/thermal.c
@@ -401,7 +401,8 @@ static int acpi_thermal_trips_update(str
}

/* Passive (optional) */
- if (flag & ACPI_TRIPS_PASSIVE) {
+ if (((flag & ACPI_TRIPS_PASSIVE) && tz->trips.passive.flags.valid) ||
+ (flag == ACPI_TRIPS_INIT)) {
valid = tz->trips.passive.flags.valid;
if (psv == -1) {
status = AE_SUPPORT;
@@ -440,8 +441,11 @@ static int acpi_thermal_trips_update(str
memset(&devices, 0, sizeof(struct acpi_handle_list));
status = acpi_evaluate_reference(tz->device->handle, "_PSL",
NULL, &devices);
- if (ACPI_FAILURE(status))
+ if (ACPI_FAILURE(status)) {
+ printk(KERN_WARNING PREFIX
+ "Invalid passive threshold\n");
tz->trips.passive.flags.valid = 0;
+ }
else
tz->trips.passive.flags.valid = 1;

@@ -465,7 +469,8 @@ static int acpi_thermal_trips_update(str
if (act == -1)
break; /* disable all active trip points */

- if (flag & ACPI_TRIPS_ACTIVE) {
+ if ((flag == ACPI_TRIPS_INIT) || ((flag & ACPI_TRIPS_ACTIVE) &&
+ tz->trips.active[i].flags.valid)) {
status = acpi_evaluate_integer(tz->device->handle,
name, NULL, &tz->trips.active[i].temperature);
if (ACPI_FAILURE(status)) {
@@ -497,8 +502,11 @@ static int acpi_thermal_trips_update(str
memset(&devices, 0, sizeof(struct acpi_handle_list));
status = acpi_evaluate_reference(tz->device->handle,
name, NULL, &devices);
- if (ACPI_FAILURE(status))
+ if (ACPI_FAILURE(status)) {
+ printk(KERN_WARNING PREFIX
+ "Invalid active%d threshold\n", i);
tz->trips.active[i].flags.valid = 0;
+ }
else
tz->trips.active[i].flags.valid = 1;