diff options
-rw-r--r-- | Documentation/kernel-parameters.txt | 4 | ||||
-rw-r--r-- | drivers/acpi/thermal.c | 18 |
2 files changed, 16 insertions, 6 deletions
diff --git a/Documentation/kernel-parameters.txt b/Documentation/kernel-parameters.txt index 52e1c2d26a25..4c7d2774d2a4 100644 --- a/Documentation/kernel-parameters.txt +++ b/Documentation/kernel-parameters.txt | |||
@@ -1820,6 +1820,10 @@ and is between 256 and 4096 characters. It is defined in the file | |||
1820 | thash_entries= [KNL,NET] | 1820 | thash_entries= [KNL,NET] |
1821 | Set number of hash buckets for TCP connection | 1821 | Set number of hash buckets for TCP connection |
1822 | 1822 | ||
1823 | thermal.nocrt= [HW,ACPI] | ||
1824 | Set to disable actions on ACPI thermal zone | ||
1825 | critical and hot trip points. | ||
1826 | |||
1823 | thermal.off= [HW,ACPI] | 1827 | thermal.off= [HW,ACPI] |
1824 | 1: disable ACPI thermal control | 1828 | 1: disable ACPI thermal control |
1825 | 1829 | ||
diff --git a/drivers/acpi/thermal.c b/drivers/acpi/thermal.c index 74e25be8abc9..57d05ff44dd1 100644 --- a/drivers/acpi/thermal.c +++ b/drivers/acpi/thermal.c | |||
@@ -78,6 +78,10 @@ static int tzp; | |||
78 | module_param(tzp, int, 0444); | 78 | module_param(tzp, int, 0444); |
79 | MODULE_PARM_DESC(tzp, "Thermal zone polling frequency, in 1/10 seconds.\n"); | 79 | MODULE_PARM_DESC(tzp, "Thermal zone polling frequency, in 1/10 seconds.\n"); |
80 | 80 | ||
81 | static int nocrt; | ||
82 | module_param(nocrt, int, 0); | ||
83 | MODULE_PARM_DESC(nocrt, "Set to disable action on ACPI thermal zone critical and hot trips.\n"); | ||
84 | |||
81 | static int off; | 85 | static int off; |
82 | module_param(off, int, 0); | 86 | module_param(off, int, 0); |
83 | MODULE_PARM_DESC(off, "Set to disable ACPI thermal support.\n"); | 87 | MODULE_PARM_DESC(off, "Set to disable ACPI thermal support.\n"); |
@@ -442,7 +446,7 @@ static int acpi_thermal_get_devices(struct acpi_thermal *tz) | |||
442 | 446 | ||
443 | static int acpi_thermal_critical(struct acpi_thermal *tz) | 447 | static int acpi_thermal_critical(struct acpi_thermal *tz) |
444 | { | 448 | { |
445 | if (!tz || !tz->trips.critical.flags.valid) | 449 | if (!tz || !tz->trips.critical.flags.valid || nocrt) |
446 | return -EINVAL; | 450 | return -EINVAL; |
447 | 451 | ||
448 | if (tz->temperature >= tz->trips.critical.temperature) { | 452 | if (tz->temperature >= tz->trips.critical.temperature) { |
@@ -464,7 +468,7 @@ static int acpi_thermal_critical(struct acpi_thermal *tz) | |||
464 | 468 | ||
465 | static int acpi_thermal_hot(struct acpi_thermal *tz) | 469 | static int acpi_thermal_hot(struct acpi_thermal *tz) |
466 | { | 470 | { |
467 | if (!tz || !tz->trips.hot.flags.valid) | 471 | if (!tz || !tz->trips.hot.flags.valid || nocrt) |
468 | return -EINVAL; | 472 | return -EINVAL; |
469 | 473 | ||
470 | if (tz->temperature >= tz->trips.hot.temperature) { | 474 | if (tz->temperature >= tz->trips.hot.temperature) { |
@@ -839,12 +843,14 @@ static int acpi_thermal_trip_seq_show(struct seq_file *seq, void *offset) | |||
839 | goto end; | 843 | goto end; |
840 | 844 | ||
841 | if (tz->trips.critical.flags.valid) | 845 | if (tz->trips.critical.flags.valid) |
842 | seq_printf(seq, "critical (S5): %ld C\n", | 846 | seq_printf(seq, "critical (S5): %ld C%s", |
843 | KELVIN_TO_CELSIUS(tz->trips.critical.temperature)); | 847 | KELVIN_TO_CELSIUS(tz->trips.critical.temperature), |
848 | nocrt ? " <disabled>\n" : "\n"); | ||
844 | 849 | ||
845 | if (tz->trips.hot.flags.valid) | 850 | if (tz->trips.hot.flags.valid) |
846 | seq_printf(seq, "hot (S4): %ld C\n", | 851 | seq_printf(seq, "hot (S4): %ld C%s", |
847 | KELVIN_TO_CELSIUS(tz->trips.hot.temperature)); | 852 | KELVIN_TO_CELSIUS(tz->trips.hot.temperature), |
853 | nocrt ? " <disabled>\n" : "\n"); | ||
848 | 854 | ||
849 | if (tz->trips.passive.flags.valid) { | 855 | if (tz->trips.passive.flags.valid) { |
850 | seq_printf(seq, | 856 | seq_printf(seq, |