diff options
-rw-r--r-- | Documentation/kernel-parameters.txt | 4 | ||||
-rw-r--r-- | drivers/acpi/thermal.c | 18 |
2 files changed, 22 insertions, 0 deletions
diff --git a/Documentation/kernel-parameters.txt b/Documentation/kernel-parameters.txt index 975f029be25c..18dcfdd29df0 100644 --- a/Documentation/kernel-parameters.txt +++ b/Documentation/kernel-parameters.txt | |||
@@ -1826,6 +1826,10 @@ and is between 256 and 4096 characters. It is defined in the file | |||
1826 | -1: disable all active trip points in all thermal zones | 1826 | -1: disable all active trip points in all thermal zones |
1827 | <degrees C>: override all lowest active trip points | 1827 | <degrees C>: override all lowest active trip points |
1828 | 1828 | ||
1829 | thermal.crt= [HW,ACPI] | ||
1830 | -1: disable all critical trip points in all thermal zones | ||
1831 | <degrees C>: lower all critical trip points | ||
1832 | |||
1829 | thermal.nocrt= [HW,ACPI] | 1833 | thermal.nocrt= [HW,ACPI] |
1830 | Set to disable actions on ACPI thermal zone | 1834 | Set to disable actions on ACPI thermal zone |
1831 | critical and hot trip points. | 1835 | critical and hot trip points. |
diff --git a/drivers/acpi/thermal.c b/drivers/acpi/thermal.c index 9b31f36481d2..4c420feba207 100644 --- a/drivers/acpi/thermal.c +++ b/drivers/acpi/thermal.c | |||
@@ -79,6 +79,10 @@ static int act; | |||
79 | module_param(act, int, 0644); | 79 | module_param(act, int, 0644); |
80 | MODULE_PARM_DESC(act, "Disable or override all lowest active trip points."); | 80 | MODULE_PARM_DESC(act, "Disable or override all lowest active trip points."); |
81 | 81 | ||
82 | static int crt; | ||
83 | module_param(crt, int, 0644); | ||
84 | MODULE_PARM_DESC(crt, "Disable or lower all critical trip points."); | ||
85 | |||
82 | static int tzp; | 86 | static int tzp; |
83 | module_param(tzp, int, 0444); | 87 | module_param(tzp, int, 0444); |
84 | MODULE_PARM_DESC(tzp, "Thermal zone polling frequency, in 1/10 seconds."); | 88 | MODULE_PARM_DESC(tzp, "Thermal zone polling frequency, in 1/10 seconds."); |
@@ -340,6 +344,20 @@ static int acpi_thermal_get_trip_points(struct acpi_thermal *tz) | |||
340 | tz->trips.critical.temperature)); | 344 | tz->trips.critical.temperature)); |
341 | } | 345 | } |
342 | 346 | ||
347 | if (tz->trips.critical.flags.valid == 1) { | ||
348 | if (crt == -1) { | ||
349 | tz->trips.critical.flags.valid = 0; | ||
350 | } else if (crt > 0) { | ||
351 | unsigned long crt_k = CELSIUS_TO_KELVIN(crt); | ||
352 | |||
353 | /* | ||
354 | * Allow override to lower critical threshold | ||
355 | */ | ||
356 | if (crt_k < tz->trips.critical.temperature) | ||
357 | tz->trips.critical.temperature = crt_k; | ||
358 | } | ||
359 | } | ||
360 | |||
343 | /* Critical Sleep (optional) */ | 361 | /* Critical Sleep (optional) */ |
344 | 362 | ||
345 | status = | 363 | status = |