* If your ACPI-enabled machine does clean shutdown randomly...
@ 2003-11-28 14:52 Pavel Machek
2003-11-28 16:02 ` [ACPI] " Damien Sandras
0 siblings, 1 reply; 3+ 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] 3+ messages in thread
* Re: [ACPI] If your ACPI-enabled machine does clean shutdown randomly...
2003-11-28 14:52 If your ACPI-enabled machine does clean shutdown randomly Pavel Machek
@ 2003-11-28 16:02 ` Damien Sandras
2003-11-28 16:10 ` Pavel Machek
0 siblings, 1 reply; 3+ messages in thread
From: Damien Sandras @ 2003-11-28 16:02 UTC (permalink / raw)
To: Pavel Machek; +Cc: ACPI mailing list, kernel list
Le ven 28/11/2003 à 15:52, Pavel Machek a écrit :
> ...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...
>
The problem with that patch is that it is filling the logs, but it is
certainly better than shutting the machine down without warning. I had
that problem and it took me a few minutes to figure out that it was
ACPI.
However, I didn't have that problem with kernel 2.6.0 test 9, it
appeared with 2.6.0 test 10 and test 11. I have mailed the list to see
if there was no patch I could reverse to determine where the problem
was, but I got no reaction, so I guess I will have to live with it ;)
> 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);
--
Damien Sandras <dsandras@seconix.com>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [ACPI] If your ACPI-enabled machine does clean shutdown randomly...
2003-11-28 16:02 ` [ACPI] " Damien Sandras
@ 2003-11-28 16:10 ` Pavel Machek
0 siblings, 0 replies; 3+ messages in thread
From: Pavel Machek @ 2003-11-28 16:10 UTC (permalink / raw)
To: Damien Sandras; +Cc: ACPI mailing list, kernel list
Hi!
> > ...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...
> >
>
> The problem with that patch is that it is filling the logs, but it is
> certainly better than shutting the machine down without warning. I had
> that problem and it took me a few minutes to figure out that it was
> ACPI.
I'm not pushing this patch for inclusion, only its second part.
> However, I didn't have that problem with kernel 2.6.0 test 9, it
> appeared with 2.6.0 test 10 and test 11. I have mailed the list to see
> if there was no patch I could reverse to determine where the problem
> was, but I got no reaction, so I guess I will have to live with it ;)
I have this on rather strange hw, so my tests do not count :-(.
Pavel
--
When do you have a heart between your knees?
[Johanka's followup: and *two* hearts?]
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2003-11-28 16:10 UTC | newest]
Thread overview: 3+ 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
2003-11-28 16:02 ` [ACPI] " Damien Sandras
2003-11-28 16:10 ` Pavel Machek
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).