Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 64397
b: refs/heads/master
c: c52a741
h: refs/heads/master
i:
  64395: e7ee6c2
v: v3
  • Loading branch information
Len Brown committed Aug 14, 2007
1 parent 5e25992 commit c1f3ed3
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 3c1d36da1d5ed36979340efd233ddaacc45b0a02
refs/heads/master: c52a7419af18594426bc601d1ea346dbbcf71e28
4 changes: 4 additions & 0 deletions trunk/Documentation/kernel-parameters.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1826,6 +1826,10 @@ and is between 256 and 4096 characters. It is defined in the file
-1: disable all active trip points in all thermal zones
<degrees C>: override all lowest active trip points

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

thermal.nocrt= [HW,ACPI]
Set to disable actions on ACPI thermal zone
critical and hot trip points.
Expand Down
18 changes: 18 additions & 0 deletions trunk/drivers/acpi/thermal.c
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,10 @@ static int act;
module_param(act, int, 0644);
MODULE_PARM_DESC(act, "Disable or override all lowest active trip points.");

static int crt;
module_param(crt, int, 0644);
MODULE_PARM_DESC(crt, "Disable or lower all critical trip points.");

static int tzp;
module_param(tzp, int, 0444);
MODULE_PARM_DESC(tzp, "Thermal zone polling frequency, in 1/10 seconds.");
Expand Down Expand Up @@ -340,6 +344,20 @@ static int acpi_thermal_get_trip_points(struct acpi_thermal *tz)
tz->trips.critical.temperature));
}

if (tz->trips.critical.flags.valid == 1) {
if (crt == -1) {
tz->trips.critical.flags.valid = 0;
} else if (crt > 0) {
unsigned long crt_k = CELSIUS_TO_KELVIN(crt);

/*
* Allow override to lower critical threshold
*/
if (crt_k < tz->trips.critical.temperature)
tz->trips.critical.temperature = crt_k;
}
}

/* Critical Sleep (optional) */

status =
Expand Down

0 comments on commit c1f3ed3

Please sign in to comment.