Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 63949
b: refs/heads/master
c: f548714
h: refs/heads/master
i:
  63947: 16a950d
v: v3
  • Loading branch information
Len Brown committed Aug 12, 2007
1 parent d5b881b commit 1ff6684
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 7 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: a70cdc5200b0eb9fc3ef64efb29baac9b2cf2431
refs/heads/master: f54871456162aff557d57bec51639b1288d4a84b
4 changes: 4 additions & 0 deletions trunk/Documentation/kernel-parameters.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1820,6 +1820,10 @@ and is between 256 and 4096 characters. It is defined in the file
thash_entries= [KNL,NET]
Set number of hash buckets for TCP connection

thermal.nocrt= [HW,ACPI]
Set to disable actions on ACPI thermal zone
critical and hot trip points.

thermal.off= [HW,ACPI]
1: disable ACPI thermal control

Expand Down
18 changes: 12 additions & 6 deletions trunk/drivers/acpi/thermal.c
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,10 @@ static int tzp;
module_param(tzp, int, 0444);
MODULE_PARM_DESC(tzp, "Thermal zone polling frequency, in 1/10 seconds.\n");

static int nocrt;
module_param(nocrt, int, 0);
MODULE_PARM_DESC(nocrt, "Set to disable action on ACPI thermal zone critical and hot trips.\n");

static int off;
module_param(off, int, 0);
MODULE_PARM_DESC(off, "Set to disable ACPI thermal support.\n");
Expand Down Expand Up @@ -442,7 +446,7 @@ static int acpi_thermal_get_devices(struct acpi_thermal *tz)

static int acpi_thermal_critical(struct acpi_thermal *tz)
{
if (!tz || !tz->trips.critical.flags.valid)
if (!tz || !tz->trips.critical.flags.valid || nocrt)
return -EINVAL;

if (tz->temperature >= tz->trips.critical.temperature) {
Expand All @@ -464,7 +468,7 @@ static int acpi_thermal_critical(struct acpi_thermal *tz)

static int acpi_thermal_hot(struct acpi_thermal *tz)
{
if (!tz || !tz->trips.hot.flags.valid)
if (!tz || !tz->trips.hot.flags.valid || nocrt)
return -EINVAL;

if (tz->temperature >= tz->trips.hot.temperature) {
Expand Down Expand Up @@ -839,12 +843,14 @@ static int acpi_thermal_trip_seq_show(struct seq_file *seq, void *offset)
goto end;

if (tz->trips.critical.flags.valid)
seq_printf(seq, "critical (S5): %ld C\n",
KELVIN_TO_CELSIUS(tz->trips.critical.temperature));
seq_printf(seq, "critical (S5): %ld C%s",
KELVIN_TO_CELSIUS(tz->trips.critical.temperature),
nocrt ? " <disabled>\n" : "\n");

if (tz->trips.hot.flags.valid)
seq_printf(seq, "hot (S4): %ld C\n",
KELVIN_TO_CELSIUS(tz->trips.hot.temperature));
seq_printf(seq, "hot (S4): %ld C%s",
KELVIN_TO_CELSIUS(tz->trips.hot.temperature),
nocrt ? " <disabled>\n" : "\n");

if (tz->trips.passive.flags.valid) {
seq_printf(seq,
Expand Down

0 comments on commit 1ff6684

Please sign in to comment.