Skip to contentSkip to conversation

ACPI thermal: Don't invalidate thermal zone if critical trip point is bad

PATCH Applied Thomas Renninger 3 participants 16 messages Feb 16, 2010 – Feb 22, 2010 1 message not in the archive

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/2 ACPI thermal: Don't invalidate thermal zone if critical trip point is bad

Some BIOSes return a negative value for the critical trip point. We currently invalidate the whole thermal zone in this case. But it may still be needed for cooling, also without critical trip point:

Same if there is no critical trip point, but ACPI spec says there must at least be one trip point, it need not to be a critical (see next patch).

Reference: http://bugzilla.novell.com/show_bug.cgi?id=531547

---
 drivers/acpi/thermal.c |   18 ++++++++++--------
 1 files changed, 10 insertions(+), 8 deletions(-)
drivers/acpi/thermal.c +10 -8
index 9073ada..8fa71b8 100644
@@ -368,7 +368,7 @@ static int acpi_thermal_trips_update(struct acpi_thermal *tz, int flag)
 	int valid = 0;
 	int i;
 
-	/* Critical Shutdown (required) */
+	/* Critical Shutdown */
 	if (flag & ACPI_TRIPS_CRITICAL) {
 		status = acpi_evaluate_integer(tz->device->handle,
 				"_CRT", NULL, &tmp);
@@ -379,17 +379,19 @@ static int acpi_thermal_trips_update(struct acpi_thermal *tz, int flag)
 		 * Below zero (Celsius) values clearly aren't right for sure..
 		 * ... so lets discard those as invalid.
 		 */
-		if (ACPI_FAILURE(status) ||
-				tz->trips.critical.temperature <= 2732) {
+		if (ACPI_FAILURE(status)) {
+			tz->trips.critical.flags.valid = 0;
+			ACPI_DEBUG_PRINT((ACPI_DB_INFO,
+					  "No critical threshold\n"));
+		} else if (tmp <= 2732) {
+			printk(KERN_WARNING FW_BUG "Invalid critical threshold "
+			       "(_CRT:%)\n", tmp);
 			tz->trips.critical.flags.valid = 0;
-			ACPI_EXCEPTION((AE_INFO, status,
-					"No or invalid critical threshold"));
-			return -ENODEV;
 		} else {
 			tz->trips.critical.flags.valid = 1;
 			ACPI_DEBUG_PRINT((ACPI_DB_INFO,
-					"Found critical threshold [%lu]\n",
-					tz->trips.critical.temperature));
+					  "Found critical threshold [%lu]\n",
+					  tz->trips.critical.temperature));
 		}
 		if (tz->trips.critical.flags.valid == 1) {
 			if (crt == -1) {
Signature · 1 line
1.6.3
#1 lore raw

PATCH 2/2 ACPI thermal: Check for thermal zone requirement

ACPI spec says (11.5 Thermal Zone Interface Requirements):
A thermal zone must contain at least one trip point (critical, near critical, active, or passive)

Check this once at init time.

---
 drivers/acpi/thermal.c |   18 +++++++++++++++++-
 1 files changed, 17 insertions(+), 1 deletions(-)
drivers/acpi/thermal.c +17 -1
index 8fa71b8..09b757a 100644
@@ -577,7 +577,23 @@ static int acpi_thermal_trips_update(struct acpi_thermal *tz, int flag)
 
 static int acpi_thermal_get_trip_points(struct acpi_thermal *tz)
 {
-	return acpi_thermal_trips_update(tz, ACPI_TRIPS_INIT);
+	int i, valid, ret = acpi_thermal_trips_update(tz, ACPI_TRIPS_INIT);
+
+	if (ret)
+		return ret;
+
+	valid = tz->trips.critical.flags.valid |
+		tz->trips.hot.flags.valid |
+		tz->trips.passive.flags.valid;
+
+	for (i = 0; i < ACPI_THERMAL_MAX_ACTIVE; i++)
+		valid |= tz->trips.active[i].flags.valid;
+
+	if (!valid) {
+		printk(KERN_WARNING FW_BUG "No valid trip found\n");
+		return -ENODEV;
+	}
+	return 0;
 }
 
 static void acpi_thermal_check(void *data)
Signature · 1 line
1.6.3
reviewer
#2 lore raw

Re: [PATCH 2/2] ACPI thermal: Check for thermal zone requiremen

Thomas,

What good things happen after this patch that didn't happen before it?

thanks,
Len Brown, Intel Open Source Technology Center

Quoted 46 lines · Thomas Renninger

ACPI spec says (11.5 Thermal Zone Interface Requirements):
A thermal zone must contain at least one trip point (critical, near critical, active, or passive)

Check this once at init time.

---
 drivers/acpi/thermal.c |   18 +++++++++++++++++-
 1 files changed, 17 insertions(+), 1 deletions(-)
drivers/acpi/thermal.c +17 -1
index 8fa71b8..09b757a 100644
@@ -577,7 +577,23 @@ static int acpi_thermal_trips_update(struct acpi_thermal *tz, int flag)
 
 static int acpi_thermal_get_trip_points(struct acpi_thermal *tz)
 {
-	return acpi_thermal_trips_update(tz, ACPI_TRIPS_INIT);
+	int i, valid, ret = acpi_thermal_trips_update(tz, ACPI_TRIPS_INIT);
+
+	if (ret)
+		return ret;
+
+	valid = tz->trips.critical.flags.valid |
+		tz->trips.hot.flags.valid |
+		tz->trips.passive.flags.valid;
+
+	for (i = 0; i < ACPI_THERMAL_MAX_ACTIVE; i++)
+		valid |= tz->trips.active[i].flags.valid;
+
+	if (!valid) {
+		printk(KERN_WARNING FW_BUG "No valid trip found\n");
+		return -ENODEV;
+	}
+	return 0;
 }
 
 static void acpi_thermal_check(void *data)
Signature · 1 line
1.6.3
#3 lore raw

Re: [PATCH 2/2] ACPI thermal: Check for thermal zone requiremen

Quoted 3 lines · On Friday 19 February 2010 07:39:43 Len Brown wrote:

Thomas,

What good things happen after this patch that didn't happen before it?

The guy sees a valid temperature, in /proc-/sys and also in the corresponding X-apps (which his original complaints were).

The thermal zone has a valid passive trip point (95 C), which now is active again.

He reported this as a regression, let me double check:

Oh dear..., _CRT doesn't return anything for Windows 2006 (or newer, not defined Windowses) -> broken trip point.

There is a Linux workaround (which does not work anymore, this probably was the reason for the regression -> OSI!=Linux), which make _CRT return a valid trip point like on old Windowses.

So this makes the behavior more "latest Windows OS" like. Hmm, depends whether Windows still takes the thermal zone into account if _CRT is not available or invalid.
The fact that a valid _HOT trip point is only exported on latest Windowses, hardens the guess that Windows also serves this thermal zone with an invalid critical trip point.
It looks like the (TPOS == 0x40) thermal workarounds wants to avoid thermal shutdowns (critical) in case 100 C are reached and change it into a (debug?) message (_HOT) on latest Windowses.

Thomas

Related ASL output:

If (_OSI ("Linux"))

                {
                    Store (One, LINX)
                    Store (0x80, OSTB)
                    Store (0x80, TPOS)
                }
If (_OSI ("Windows 2006"))
                {
                    Store (0x40, OSTB)
                    Store (0x40, TPOS)
                }

...
Name (TPC, 0x64)
Method (_HOT, 0, Serialized)

{
    If (LEqual (TPOS, 0x40))
    {
        Return (Add (0x0AAC, Multiply (TPC, 0x0A)))
    }
}

Method (_CRT, 0, Serialized)

{
    If (LNotEqual (TPOS, 0x40))
    {
        Return (Add (0x0AAC, Multiply (TPC, 0x0A)))
    }
}
reviewer
#4 lore raw

Re: [PATCH 2/2] ACPI thermal: Check for thermal zone requiremen

Quoted 7 lines
Quoted 1 line

What good things happen after this patch that didn't happen before it?

The guy sees a valid temperature, in /proc-/sys and also in the corresponding X-apps (which his original complaints were).

The thermal zone has a valid passive trip point (95 C), which now is active again.

I understand the 1st patch to not disqualify a TZ if it has a bogus _CRT. That would make a TZ show up rather than get discarded. If that patch compiled cleanly, I'd apply it...

I don't understand this patch to scan a TZ for trip points and print out a kernel warning about a firmware bug for TZ's which have none, and disqualify those TZ's. That isn't going to make temperature available when it was not already available. That is going to add an additional kernel message about a firmware bug we can't fix, and could actually delete a thermal zone with a working temperature that used to be present, no?

Quoted 45 lines

He reported this as a regression, let me double check:

Oh dear..., _CRT doesn't return anything for Windows 2006 (or newer, not defined Windowses) -> broken trip point.

There is a Linux workaround (which does not work anymore, this probably was the reason for the regression -> OSI!=Linux), which make _CRT return a valid trip point like on old Windowses.

So this makes the behavior more "latest Windows OS" like. Hmm, depends whether Windows still takes the thermal zone into account if _CRT is not available or invalid.
The fact that a valid _HOT trip point is only exported on latest Windowses, hardens the guess that Windows also serves this thermal zone with an invalid critical trip point.
It looks like the (TPOS == 0x40) thermal workarounds wants to avoid thermal shutdowns (critical) in case 100 C are reached and change it into a (debug?) message (_HOT) on latest Windowses.

Related ASL output:

If (_OSI ("Linux"))

                {
                    Store (One, LINX)
                    Store (0x80, OSTB)
                    Store (0x80, TPOS)
                }
If (_OSI ("Windows 2006"))
                {
                    Store (0x40, OSTB)
                    Store (0x40, TPOS)
                }

...
Name (TPC, 0x64)
Method (_HOT, 0, Serialized)

{
    If (LEqual (TPOS, 0x40))
    {
        Return (Add (0x0AAC, Multiply (TPC, 0x0A)))
    }
}
Quoted 7 lines

Method (_CRT, 0, Serialized)

{
    If (LNotEqual (TPOS, 0x40))
    {
        Return (Add (0x0AAC, Multiply (TPC, 0x0A)))
    }
}

It appears that if acpi_osi=Linux were set (or TPOS were anything other than Windows 2006), then you would not get a _HOT or _CRT in this TZ.
I don't understand how that is related to this issue, as acpi_osi=Linux is not set, right?

acpi_osi="Windows 2006", on the other hand, should be set. In that case the AML will return a valid trip point for both _HOT and _CRT, yes? So what is the problem?

-Len

#5 lore raw

Re: [PATCH 2/2] ACPI thermal: Check for thermal zone requiremen

Quoted 12 lines · On Friday 19 February 2010 17:20:51 Len Brown wrote:
Quoted 7 lines
Quoted 1 line

What good things happen after this patch that didn't happen before it?

The guy sees a valid temperature, in /proc-/sys and also in the corresponding X-apps (which his original complaints were).

The thermal zone has a valid passive trip point (95 C), which now is active again.

I understand the 1st patch to not disqualify a TZ if it has a bogus _CRT. That would make a TZ show up rather than get discarded. If that patch compiled cleanly, I'd apply it...

Quoted 6 lines

I don't understand this patch to scan a TZ for trip points and print out a kernel warning about a firmware bug for TZ's which have none, and disqualify those TZ's. That isn't going to make temperature available when it was not already available. That is going to add an additional kernel message about a firmware bug we can't fix,

Hmm, Firmware bugs which we can't fix and can't even work around always should at least end up in a firmware bug/warning message.

Quoted 2 lines

and could actually delete a thermal zone with a working temperature that used to be present, no?

Not really. At least not worse than before.
Before my previous patch every thermal zone without a valid critical trip point was discarded with an error message.
Now you need at least one.

My patch sticks to the spec and only discards the thermal zone if there is no trip point at all. In this case you want to throw a (firmware bug) message as something is obviously wrong.

Thomas

reviewer
#6 lore raw

Re: [PATCH 2/2] ACPI thermal: Check for thermal zone requiremen

Quoted 22 lines · Thomas Renninger
Quoted 12 lines · On Friday 19 February 2010 17:20:51 Len Brown wrote:
Quoted 7 lines
Quoted 1 line

What good things happen after this patch that didn't happen before it?

The guy sees a valid temperature, in /proc-/sys and also in the corresponding X-apps (which his original complaints were).

The thermal zone has a valid passive trip point (95 C), which now is active again.

I understand the 1st patch to not disqualify a TZ if it has a bogus _CRT. That would make a TZ show up rather than get discarded. If that patch compiled cleanly, I'd apply it...

Quoted 6 lines

I don't understand this patch to scan a TZ for trip points and print out a kernel warning about a firmware bug for TZ's which have none, and disqualify those TZ's. That isn't going to make temperature available when it was not already available. That is going to add an additional kernel message about a firmware bug we can't fix,

Hmm, Firmware bugs which we can't fix and can't even work around always should at least end up in a firmware bug/warning message.

Quoted 6 lines
Quoted 2 lines

and could actually delete a thermal zone with a working temperature that used to be present, no?

Not really. At least not worse than before.
Before my previous patch every thermal zone without a valid critical trip point was discarded with an error message.

i agree with the 1st patch,
as I said, if it built cleanly (hint hint) I'd apply it.

Quoted 5 lines

Now you need at least one.

My patch sticks to the spec and only discards the thermal zone if there is no trip point at all. In this case you want to throw a (firmware bug) message as something is obviously wrong.

This is the non-obvious part.
Yes, a thermal zone that has no trip point doesn't follow the spec. I don't know if any exist or not, but I don't see any harm if they do. I think it would be dandy for linuxfirmware test kit to look for this BIOS issue, but I don't see how the user is helped if the kernel looks for it. All the get is an additional kernel message and perhaps the loss of the ability to
tell the temperature when perhaps they could before.
That doesn't sound like a step forward.

thanks,
Len Brown, Intel Open Source Technology Center

#7 lore raw

Re: [PATCH 2/2] ACPI thermal: Check for thermal zone requiremen

Quoted 4 lines · Len Brown

On Fri, 19 Feb 2010, Thomas Renninger wrote:

i agree with the 1st patch,
as I said, if it built cleanly (hint hint) I'd apply it.

Coming soon.

Quoted 6 lines
Quoted 5 lines

Now you need at least one.

My patch sticks to the spec and only discards the thermal zone if there is no trip point at all. In this case you want to throw a (firmware bug) message as something is obviously wrong.

Quoted 9 lines

This is the non-obvious part.
Yes, a thermal zone that has no trip point doesn't follow the spec. I don't know if any exist or not, but I don't see any harm if they do. I think it would be dandy for linuxfirmware test kit to look for this BIOS issue, but I don't see how the user is helped if the kernel looks for it. All the get is an additional kernel message and perhaps the loss of the ability to
tell the temperature when perhaps they could before.
That doesn't sound like a step forward.

Thinking about this again:
I fully agree.
Just ignore the 2nd patch.

Thanks,

Thomas

#8 lore raw

Re: [PATCH 2/2] ACPI thermal: Check for thermal zone requiremen

In reply to Len Brown

Hi,

I haven't seen your post at then end of the mail...

Quoted 40 lines · Len Brown
Quoted 26 lines

Related ASL output:

If (_OSI ("Linux"))

                {
                    Store (One, LINX)
                    Store (0x80, OSTB)
                    Store (0x80, TPOS)
                }
If (_OSI ("Windows 2006"))
                {
                    Store (0x40, OSTB)
                    Store (0x40, TPOS)
                }

...
Name (TPC, 0x64)
Method (_HOT, 0, Serialized)

{
    If (LEqual (TPOS, 0x40))
    {
        Return (Add (0x0AAC, Multiply (TPC, 0x0A)))
    }
}
Quoted 7 lines

Method (_CRT, 0, Serialized)

{
    If (LNotEqual (TPOS, 0x40))
    {
        Return (Add (0x0AAC, Multiply (TPC, 0x0A)))
    }
}

It appears that if acpi_osi=Linux were set (or TPOS were anything other than Windows 2006), then you would not get a _HOT or _CRT in this TZ.
I don't understand how that is related to this issue, as acpi_osi=Linux is not set, right?

Quoted 3 lines

acpi_osi="Windows 2006", on the other hand, should be set. In that case the AML will return a valid trip point for both _HOT and _CRT, yes? So what is the problem?

The problem is that in:
- _HOT it's a LEqual (TPOS, 0x40)
- _CRT it's a LNotEqual (TPOS, 0x40)

You will get a valid hot tp on Windows 2006 (or newer) and an invalid critical one.
On all others you get an invalid hot, but a valid critical tp (which is also the case with osi=Linux).

Thomas

reviewer Applied
#9 lore raw
In reply to Thomas Renninger

applied

This issue rings a bell -- I think we discussed that it was a theoretical problem a while back. I'm glad that SuSE got a live tester and you were able to follow up, Thomas.

thanks,
Len Brown, Intel Open Source Technology Center

reviewer
#10 lore raw

drivers/acpi/thermal.c:388: warning: unknown conversion type character ‘)’ in format drivers/acpi/thermal.c:388: warning: too many arguments for format

#11 lore raw

PATCH 1/1 ACPI thermal: Don't invalidate thermal zone if critical trip point is bad

Some BIOSes return a negative value for the critical trip point. We currently invalidate the whole thermal zone in this case. But it may still be needed for cooling, also without critical trip point:

Same if there is no critical trip point, but ACPI spec says there must at least be one trip point, it need not to be a critical (see next patch).

Reference: http://bugzilla.novell.com/show_bug.cgi?id=531547

---
 drivers/acpi/thermal.c |   18 ++++++++++--------
 1 files changed, 10 insertions(+), 8 deletions(-)
drivers/acpi/thermal.c +10 -8
index 9073ada..8fa71b8 100644
@@ -368,7 +368,7 @@ static int acpi_thermal_trips_update(struct acpi_thermal *tz, int flag)
 	int valid = 0;
 	int i;
 
-	/* Critical Shutdown (required) */
+	/* Critical Shutdown */
 	if (flag & ACPI_TRIPS_CRITICAL) {
 		status = acpi_evaluate_integer(tz->device->handle,
 				"_CRT", NULL, &tmp);
@@ -379,17 +379,19 @@ static int acpi_thermal_trips_update(struct acpi_thermal *tz, int flag)
 		 * Below zero (Celsius) values clearly aren't right for sure..
 		 * ... so lets discard those as invalid.
 		 */
-		if (ACPI_FAILURE(status) ||
-				tz->trips.critical.temperature <= 2732) {
+		if (ACPI_FAILURE(status)) {
+			tz->trips.critical.flags.valid = 0;
+			ACPI_DEBUG_PRINT((ACPI_DB_INFO,
+					  "No critical threshold\n"));
+		} else if (tmp <= 2732) {
+			printk(KERN_WARNING FW_BUG "Invalid critical threshold "
+			       "(_CRT:%)\n", tmp);
 			tz->trips.critical.flags.valid = 0;
-			ACPI_EXCEPTION((AE_INFO, status,
-					"No or invalid critical threshold"));
-			return -ENODEV;
 		} else {
 			tz->trips.critical.flags.valid = 1;
 			ACPI_DEBUG_PRINT((ACPI_DB_INFO,
-					"Found critical threshold [%lu]\n",
-					tz->trips.critical.temperature));
+					  "Found critical threshold [%lu]\n",
+					  tz->trips.critical.temperature));
 		}
 		if (tz->trips.critical.flags.valid == 1) {
 			if (crt == -1) {
Signature · 1 line
1.6.3
#12 lore raw

drivers/acpi/thermal.c static int acpi_thermal_trips_update(struct acpi_thermal *tz, int flag) · line 388

Quoted 2 lines · Thomas Renninger
drivers/acpi/thermal.c +2 -0
+			printk(KERN_WARNING FW_BUG "Invalid critical threshold "
+			       "(_CRT:%)\n", tmp);

Argh, I forgot to refresh, resending in a minute.

Sorry about that,

Thomas

#13 lore raw

PATCH 1/1 ACPI thermal: Don't invalidate thermal zone if critical trip point is bad

In reply to Thomas Renninger

V2: Corrected integer/long conversion.

Some BIOSes return a negative value for the critical trip point. Especially since Windows 2006...
We currently invalidate the whole thermal zone in this case. But it may still be needed for cooling, also without critical trip point.

This patch invalidates the critical trip point if no _CRT function is found or if it returns negative values, but does not invalidate the whole thermal zone in this case.

Reference: http://bugzilla.novell.com/show_bug.cgi?id=531547

---
 drivers/acpi/thermal.c |   18 ++++++++++--------
 1 files changed, 10 insertions(+), 8 deletions(-)
drivers/acpi/thermal.c +10 -8
index 9073ada..77b8e1e 100644
@@ -368,7 +368,7 @@ static int acpi_thermal_trips_update(struct acpi_thermal *tz, int flag)
 	int valid = 0;
 	int i;
 
-	/* Critical Shutdown (required) */
+	/* Critical Shutdown */
 	if (flag & ACPI_TRIPS_CRITICAL) {
 		status = acpi_evaluate_integer(tz->device->handle,
 				"_CRT", NULL, &tmp);
@@ -379,17 +379,19 @@ static int acpi_thermal_trips_update(struct acpi_thermal *tz, int flag)
 		 * Below zero (Celsius) values clearly aren't right for sure..
 		 * ... so lets discard those as invalid.
 		 */
-		if (ACPI_FAILURE(status) ||
-				tz->trips.critical.temperature <= 2732) {
+		if (ACPI_FAILURE(status)) {
+			tz->trips.critical.flags.valid = 0;
+			ACPI_DEBUG_PRINT((ACPI_DB_INFO,
+					  "No critical threshold\n"));
+		} else if (tmp <= 2732) {
+			printk(KERN_WARNING FW_BUG "Invalid critical threshold "
+			       "(%llu)\n", tmp);
 			tz->trips.critical.flags.valid = 0;
-			ACPI_EXCEPTION((AE_INFO, status,
-					"No or invalid critical threshold"));
-			return -ENODEV;
 		} else {
 			tz->trips.critical.flags.valid = 1;
 			ACPI_DEBUG_PRINT((ACPI_DB_INFO,
-					"Found critical threshold [%lu]\n",
-					tz->trips.critical.temperature));
+					  "Found critical threshold [%lu]\n",
+					  tz->trips.critical.temperature));
 		}
 		if (tz->trips.critical.flags.valid == 1) {
 			if (crt == -1) {
Signature · 1 line
1.6.3
reviewer
#14 lore raw
Quoted 37 lines · Thomas Renninger

V2: Corrected integer/long conversion.

Some BIOSes return a negative value for the critical trip point. Especially since Windows 2006...
We currently invalidate the whole thermal zone in this case. But it may still be needed for cooling, also without critical trip point.

This patch invalidates the critical trip point if no _CRT function is found or if it returns negative values, but does not invalidate the whole thermal zone in this case.

Reference: http://bugzilla.novell.com/show_bug.cgi?id=531547

---
 drivers/acpi/thermal.c |   18 ++++++++++--------
 1 files changed, 10 insertions(+), 8 deletions(-)
drivers/acpi/thermal.c +1 -1
index 9073ada..77b8e1e 100644
@@ -368,7 +368,7 @@ static int acpi_thermal_trips_update(struct acpi_thermal *tz, int flag)
 	int valid = 0;
 	int i;
 
-	/* Critical Shutdown (required) */
+	/* Critical Shutdown */
 	if (flag & ACPI_TRIPS_CRITICAL) {
 		status = acpi_evaluate_integer(tz->device->handle,
 				"_CRT", NULL, &tmp);

drivers/acpi/thermal.c static int acpi_thermal_trips_update(struct acpi_thermal *tz, int flag) · line 385

Quoted 9 lines
drivers/acpi/thermal.c +4 -2
@@ -379,17 +379,19 @@ static int acpi_thermal_trips_update(struct acpi_thermal *tz, int flag)
 		 * Below zero (Celsius) values clearly aren't right for sure..
 		 * ... so lets discard those as invalid.
 		 */
-		if (ACPI_FAILURE(status) ||
-				tz->trips.critical.temperature <= 2732) {
+		if (ACPI_FAILURE(status)) {
+			tz->trips.critical.flags.valid = 0;
+			ACPI_DEBUG_PRINT((ACPI_DB_INFO,
+					  "No critical threshold\n"));

No critical threshold is also a violation of ACPI spec. what about using FW_BUG here as well?

thanks,
rui

Quoted 17 lines
drivers/acpi/thermal.c +5 -5
+		} else if (tmp <= 2732) {
+			printk(KERN_WARNING FW_BUG "Invalid critical threshold "
+			       "(%llu)\n", tmp);
 			tz->trips.critical.flags.valid = 0;
-			ACPI_EXCEPTION((AE_INFO, status,
-					"No or invalid critical threshold"));
-			return -ENODEV;
 		} else {
 			tz->trips.critical.flags.valid = 1;
 			ACPI_DEBUG_PRINT((ACPI_DB_INFO,
-					"Found critical threshold [%lu]\n",
-					tz->trips.critical.temperature));
+					  "Found critical threshold [%lu]\n",
+					  tz->trips.critical.temperature));
 		}
 		if (tz->trips.critical.flags.valid == 1) {
 			if (crt == -1) {

A message that is not in the archive (sent off-list or not yet received): [email protected]

reviewer Acked-by
#16 lore raw
Quoted 16 lines · Thomas Renninger

On Sunday 21 February 2010 03:51:22 am Zhang Rui wrote:
...

Quoted 5 lines
Quoted 5 lines
(quoted diff) +0 -0
@@ -379,17 +379,19 @@ static int acpi_thermal_trips_update(struct

acpi_thermal *tz, int flag) * Below zero (Celsius) values clearly aren't right for sure.. * ... so lets discard those as invalid.

drivers/acpi/thermal.c +0 -1
 		 */
-		if (ACPI_FAILURE(status) ||
Quoted 8 lines

drivers/acpi/thermal.c static int acpi_thermal_trips_update(struct acpi_thermal *tz, int flag) · line 385

Quoted 5 lines
drivers/acpi/thermal.c +4 -1
-				tz->trips.critical.temperature <= 2732) {
+		if (ACPI_FAILURE(status)) {
+			tz->trips.critical.flags.valid = 0;
+			ACPI_DEBUG_PRINT((ACPI_DB_INFO,
+					  "No critical threshold\n"));

No critical threshold is also a violation of ACPI spec. what about using FW_BUG here as well?

Quoted 9 lines

Could you point me to where this is stated, please. I only found Chapter 11.5 (ver. 3.0b):
Thermal Zone Interface Requirements:
A thermal zone must contain at least one trip point (critical, near critical, active, or passive)

If at another place they state that a critical trip point is required, this would contradict with each other.

you're right.
I thought I saw such statements somewhere in the ACPI spec but apparently I'm wrong. Sorry for the noise.

Quoted 7 lines

Thanks,

Thomas
--
To unsubscribe from this list: send the line "unsubscribe linux-acpi" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html