Skip to content

Commit

Permalink
ACPI: Allow overriding to higher critical trip point.
Browse files Browse the repository at this point in the history
http://bugzilla.kernel.org/show_bug.cgi?id=9129

lenb: Note that overriding a critical trip point
may simply fool the user into thinking that they
have control that they do not actually have.
For it is EC firmware that decides when the EC
sends Linux temperature change events, and the
EC may or may not decide to send Linux these events
anywhere in the neighborhood of the fake
override trip points.  Beware.

note also that thermal.nocrt is already available
to disable crtical trip point actios,
and thermal.crt=-1 is already available to
disabled critical trip points entirely.

Signed-off-by: Zhang Rui <rui.zhang@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
  • Loading branch information
Zhang Rui authored and Len Brown committed Oct 17, 2008
1 parent 7745384 commit 22a94d7
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
2 changes: 1 addition & 1 deletion Documentation/kernel-parameters.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2146,7 +2146,7 @@ and is between 256 and 4096 characters. It is defined in the file

thermal.crt= [HW,ACPI]
-1: disable all critical trip points in all thermal zones
<degrees C>: lower all critical trip points
<degrees C>: override all critical trip points

thermal.nocrt= [HW,ACPI]
Set to disable actions on ACPI thermal zone
Expand Down
8 changes: 5 additions & 3 deletions drivers/acpi/thermal.c
Original file line number Diff line number Diff line change
Expand Up @@ -388,10 +388,12 @@ static int acpi_thermal_trips_update(struct acpi_thermal *tz, int flag)
} else if (crt > 0) {
unsigned long crt_k = CELSIUS_TO_KELVIN(crt);
/*
* Allow override to lower critical threshold
* Allow override critical threshold
*/
if (crt_k < tz->trips.critical.temperature)
tz->trips.critical.temperature = crt_k;
if (crt_k > tz->trips.critical.temperature)
printk(KERN_WARNING PREFIX
"Critical threshold %d C\n", crt);
tz->trips.critical.temperature = crt_k;
}
}
}
Expand Down

0 comments on commit 22a94d7

Please sign in to comment.