Commit:     f54871456162aff557d57bec51639b1288d4a84b
Parent:     a70cdc5200b0eb9fc3ef64efb29baac9b2cf2431
Author:     Len Brown <[EMAIL PROTECTED]>
AuthorDate: Sun Aug 12 00:12:44 2007 -0400
Committer:  Len Brown <[EMAIL PROTECTED]>
CommitDate: Sun Aug 12 00:12:44 2007 -0400

    ACPI: thermal: create "thermal.nocrt" to disable critical actions
    thermal.nocrt=1 disables actions on _CRT and _HOT
    ACPI thermal zone trip-points.  They will be marked
    as <disabled> in /proc/acpi/thermal_zone/*/trip_points.
    There are two cases where this option is used:
    1. Debugging a hot system crossing valid trip point.
       If your system fan is spinning at full speed,
       be sure that the vent is not clogged with dust.
       Many laptops have very fine thermal fins that are easily blocked.
       Check that the processor fan-sink is properly seated,
       has the proper thermal grease, and is really spinning.
       Check for fan related options in BIOS SETUP.
       Sometimes there is a performance vs quiet option.
       Defaults are generally the most conservative.
       If your fan is not spinning, yet /proc/acpi/fan/
       has files in it, please file a Linux/ACPI bug.
       WARNING: you risk shortening the lifetime of your
       hardware if you use this parameter on a hot system.
       Note that this refers to all system components,
       including the disk drive.
    2. Working around a cool system crossing critical
       trip point due to erroneous temperature reading.
       Try again with CONFIG_HWMON=n
       There is known potential for conflict between the
       the hwmon sub-system and the ACPI BIOS.
       If this fixes it, notify [EMAIL PROTECTED]
       and [EMAIL PROTECTED]
       Otherwise, file a Linux/ACPI bug, or notify
       just [EMAIL PROTECTED]
    Signed-off-by: Len Brown <[EMAIL PROTECTED]>
 Documentation/kernel-parameters.txt |    4 ++++
 drivers/acpi/thermal.c              |   18 ++++++++++++------
 2 files changed, 16 insertions(+), 6 deletions(-)

diff --git a/Documentation/kernel-parameters.txt 
index 52e1c2d..4c7d277 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
        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.
+    [HW,ACPI]
                        1: disable ACPI thermal control
diff --git a/drivers/acpi/thermal.c b/drivers/acpi/thermal.c
index 74e25be..57d05ff 100644
--- a/drivers/acpi/thermal.c
+++ b/drivers/acpi/thermal.c
@@ -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");
@@ -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) {
@@ -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->
+       if (!tz || !tz-> || nocrt)
                return -EINVAL;
        if (tz->temperature >= tz-> {
@@ -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->
-               seq_printf(seq, "hot (S4):                %ld C\n",
-                          KELVIN_TO_CELSIUS(tz->;
+               seq_printf(seq, "hot (S4):                %ld C%s",
+                          KELVIN_TO_CELSIUS(tz->,
+                          nocrt ? " <disabled>\n" : "\n");
        if (tz->trips.passive.flags.valid) {
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at

Reply via email to