aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/acpi/thermal.c
diff options
context:
space:
mode:
authorLen Brown <len.brown@intel.com>2007-08-14 15:49:32 -0400
committerLen Brown <len.brown@intel.com>2007-08-14 15:49:32 -0400
commitc52a7419af18594426bc601d1ea346dbbcf71e28 (patch)
treeb964b0de460e3508e092efa3b69fbc7267aef735 /drivers/acpi/thermal.c
parent3c1d36da1d5ed36979340efd233ddaacc45b0a02 (diff)
ACPI: thermal: create "thermal.crt=C" bootparam
Some hardware will malfunction at a temperature below the BIOS provided critical shutdown threshold. This hook allows moving the critical trip points down to a temperature which provokes a graceful shutdown before the hardware malfunction. http://bugzilla.kernel.org/show_bug.cgi?id=8884 WARNING: A trip-point override will not get noticed until the system delivers a temperature change event, or unless thermal zone polling is enabled. eg. "thermal.tzp=10" Signed-off-by: Len Brown <len.brown@intel.com>
Diffstat (limited to 'drivers/acpi/thermal.c')
-rw-r--r--drivers/acpi/thermal.c18
1 files changed, 18 insertions, 0 deletions
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;
79module_param(act, int, 0644); 79module_param(act, int, 0644);
80MODULE_PARM_DESC(act, "Disable or override all lowest active trip points."); 80MODULE_PARM_DESC(act, "Disable or override all lowest active trip points.");
81 81
82static int crt;
83module_param(crt, int, 0644);
84MODULE_PARM_DESC(crt, "Disable or lower all critical trip points.");
85
82static int tzp; 86static int tzp;
83module_param(tzp, int, 0444); 87module_param(tzp, int, 0444);
84MODULE_PARM_DESC(tzp, "Thermal zone polling frequency, in 1/10 seconds."); 88MODULE_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 =