public inbox for linux-acpi@vger.kernel.org
 help / color / mirror / Atom feed
* If your ACPI-enabled machine does clean shutdown randomly...
@ 2003-11-28 14:52 Pavel Machek
       [not found] ` <20031128145249.GA563-I/5MKhXcvmPrBKCeMvbIDA@public.gmane.org>
  0 siblings, 1 reply; 8+ messages in thread
From: Pavel Machek @ 2003-11-28 14:52 UTC (permalink / raw)
  To: ACPI mailing list, kernel list


...then you probably need this one. (One notebook I have here
certainly needs it).

It seems that acpi likes to report completely bogus value from time to
time...

								Pavel

--- clean/drivers/acpi/thermal.c	2003-07-27 22:31:09.000000000 +0200
+++ linux/drivers/acpi/thermal.c	2003-11-25 22:27:11.000000000 +0100
@@ -456,6 +459,10 @@
 	if (!tz || !tz->trips.critical.flags.valid)
 		return_VALUE(-EINVAL);
 
+	if (KELVIN_TO_CELSIUS(tz->temperature) >= 200) {
+		printk(KERN_ALERT "Are you running CPU or nuclear power plant? ACPI claims CPU temp is %d C. Ignoring.\n", KELVIN_TO_CELSIUS(tz->temperature));
+		return_VALUE(0);
+	}
 	if (tz->temperature >= tz->trips.critical.temperature) {
 		ACPI_DEBUG_PRINT((ACPI_DB_WARN, "Critical trip point\n"));
 		tz->trips.critical.flags.enabled = 1;
@@ -467,6 +474,7 @@
 	if (result)
 		return_VALUE(result);
 
+	printk(KERN_EMERG "Critical temperature reached (%d C), shutting down.\n", tz->temperature);
 	acpi_bus_generate_event(device, ACPI_THERMAL_NOTIFY_CRITICAL, tz->trips.critical.flags.enabled);
 
 	acpi_thermal_call_usermode(ACPI_THERMAL_PATH_POWEROFF);

-- 
When do you have a heart between your knees?
[Johanka's followup: and *two* hearts?]

^ permalink raw reply	[flat|nested] 8+ messages in thread
* RE: If your ACPI-enabled machine does clean shutdown randomly...
@ 2003-12-04  5:43 Yu, Luming
       [not found] ` <3ACA40606221794F80A5670F0AF15F8401720BFF-4yWAQGcml64gGBtAFL8yw7fspsVTdybXVpNB7YpNyf8@public.gmane.org>
  0 siblings, 1 reply; 8+ messages in thread
From: Yu, Luming @ 2003-12-04  5:43 UTC (permalink / raw)
  To: Pavel Machek, ACPI mailing list, kernel list

>...then you probably need this one. (One notebook I have here
>certainly needs it).

You are lucky to have such a laptop which could expose some unknow ACPI bug .
It's great, if you can share some information with us. --Luming

>It seems that acpi likes to report completely bogus value from time to
> time...

It's great, if you can tell us other completely bogus value. I believe It will help us a lot.

>+	if (KELVIN_TO_CELSIUS(tz->temperature) >= 200) {
>+		printk(KERN_ALERT "Are you running CPU or nuclear power plant? ACPI claims CPU temp is %d C. Ignoring.\n", KELVIN_TO_CELSIUS(tz->temperature));
>+		return_VALUE(0);
>+	}


-------------------------------------------------------
This SF.net email is sponsored by: SF.net Giveback Program.
Does SourceForge.net help you be more productive?  Does it
help you create better code?  SHARE THE LOVE, and help us help
YOU!  Click Here: http://sourceforge.net/donate/

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2003-12-04 10:53 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-11-28 14:52 If your ACPI-enabled machine does clean shutdown randomly Pavel Machek
     [not found] ` <20031128145249.GA563-I/5MKhXcvmPrBKCeMvbIDA@public.gmane.org>
2003-11-28 16:02   ` Damien Sandras
     [not found]     ` <1070035371.1055.13.camel-yzJ1TzNew8IqMp+WYRx65w@public.gmane.org>
2003-11-28 16:10       ` Pavel Machek
2003-12-01  9:51   ` Gerfried Maier
     [not found]     ` <3FCB0F13.7010908-ArvQUR6U0fYD0fefG/KofA@public.gmane.org>
2003-12-01 10:08       ` Damien Sandras
2003-12-01 10:57       ` Pavel Machek
  -- strict thread matches above, loose matches on Subject: below --
2003-12-04  5:43 Yu, Luming
     [not found] ` <3ACA40606221794F80A5670F0AF15F8401720BFF-4yWAQGcml64gGBtAFL8yw7fspsVTdybXVpNB7YpNyf8@public.gmane.org>
2003-12-04 10:53   ` Pavel Machek

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox