Commit 22a94d79a34bf010d11996d30eed8ee3fc1a4fbf
Committed by
Len Brown
1 parent
7745384080
Exists in
master
and in
4 other branches
ACPI: Allow overriding to higher critical trip point.
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>
Showing 2 changed files with 6 additions and 4 deletions Side-by-side Diff
Documentation/kernel-parameters.txt
... | ... | @@ -2146,7 +2146,7 @@ |
2146 | 2146 | |
2147 | 2147 | thermal.crt= [HW,ACPI] |
2148 | 2148 | -1: disable all critical trip points in all thermal zones |
2149 | - <degrees C>: lower all critical trip points | |
2149 | + <degrees C>: override all critical trip points | |
2150 | 2150 | |
2151 | 2151 | thermal.nocrt= [HW,ACPI] |
2152 | 2152 | Set to disable actions on ACPI thermal zone |
drivers/acpi/thermal.c
... | ... | @@ -388,10 +388,12 @@ |
388 | 388 | } else if (crt > 0) { |
389 | 389 | unsigned long crt_k = CELSIUS_TO_KELVIN(crt); |
390 | 390 | /* |
391 | - * Allow override to lower critical threshold | |
391 | + * Allow override critical threshold | |
392 | 392 | */ |
393 | - if (crt_k < tz->trips.critical.temperature) | |
394 | - tz->trips.critical.temperature = crt_k; | |
393 | + if (crt_k > tz->trips.critical.temperature) | |
394 | + printk(KERN_WARNING PREFIX | |
395 | + "Critical threshold %d C\n", crt); | |
396 | + tz->trips.critical.temperature = crt_k; | |
395 | 397 | } |
396 | 398 | } |
397 | 399 | } |