From: Pavel Machek <pavel@ucw.cz>
To: ACPI mailing list <acpi-devel@lists.sourceforge.net>,
kernel list <linux-kernel@vger.kernel.org>
Subject: If your ACPI-enabled machine does clean shutdown randomly...
Date: Fri, 28 Nov 2003 15:52:49 +0100 [thread overview]
Message-ID: <20031128145249.GA563@elf.ucw.cz> (raw)
...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?]
next reply other threads:[~2003-11-28 14:52 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-11-28 14:52 Pavel Machek [this message]
[not found] ` <20031128145249.GA563-I/5MKhXcvmPrBKCeMvbIDA@public.gmane.org>
2003-11-28 16:02 ` If your ACPI-enabled machine does clean shutdown randomly 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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20031128145249.GA563@elf.ucw.cz \
--to=pavel@ucw.cz \
--cc=acpi-devel@lists.sourceforge.net \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox