Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=a70cdc5200b0eb9fc3ef64efb29baac9b2cf2431
Commit:     a70cdc5200b0eb9fc3ef64efb29baac9b2cf2431
Parent:     730ff34de766a6fddee25ac1c32bc49c1a2fd758
Author:     Len Brown <[EMAIL PROTECTED]>
AuthorDate: Sun Aug 12 00:12:35 2007 -0400
Committer:  Len Brown <[EMAIL PROTECTED]>
CommitDate: Sun Aug 12 00:12:35 2007 -0400

    ACPI: thermal: create "thermal.psv=" to override passive trip points
    
    "thermal.psv=-1" disables passive trip points
    for all ACPI thermal zones.
    
    "thermal.psv=C", where 'C' is degrees Celsius,
    overrides all existing passive trip points
    for all ACPI thermal zones.
    
    thermal.psv is checked at module load time,
    and in response to trip-point change events.
    
    Note that if the system does not deliver thermal zone
    temperature change events near the new trip-point,
    then it will not be noticed.  To force your custom
    trip point to be noticed, you may need to enable polling:
    eg. thermal.tzp=3000 invokes polling every 5 minutes.
    
    Note that once passive thermal throttling is invoked,
    it has its own internal Thermal Sampling Period (_TSP),
    that is unrelated to _TZP.
    
    WARNING: disabling or raising a thermal trip point
    may result in increased running temperature and
    shorter hardware lifetime on some systems.
    
    Signed-off-by: Len Brown <[EMAIL PROTECTED]>
---
 Documentation/kernel-parameters.txt |    4 ++++
 drivers/acpi/thermal.c              |   17 ++++++++++++++---
 2 files changed, 18 insertions(+), 3 deletions(-)

diff --git a/Documentation/kernel-parameters.txt 
b/Documentation/kernel-parameters.txt
index ed7d791..52e1c2d 100644
--- a/Documentation/kernel-parameters.txt
+++ b/Documentation/kernel-parameters.txt
@@ -1823,6 +1823,10 @@ and is between 256 and 4096 characters. It is defined in 
the file
        thermal.off=    [HW,ACPI]
                        1: disable ACPI thermal control
 
+       thermal.psv=    [HW,ACPI]
+                       -1: disable all passive trip points
+                       <degrees C>: override all passive trip points to this 
value
+
        thermal.tzp=    [HW,ACPI]
                        Specify global default ACPI thermal zone polling rate
                        <deci-seconds>: poll all this frequency
diff --git a/drivers/acpi/thermal.c b/drivers/acpi/thermal.c
index b6b3bec..74e25be 100644
--- a/drivers/acpi/thermal.c
+++ b/drivers/acpi/thermal.c
@@ -82,6 +82,10 @@ static int off;
 module_param(off, int, 0);
 MODULE_PARM_DESC(off, "Set to disable ACPI thermal support.\n");
 
+static int psv;
+module_param(psv, int, 0644);
+MODULE_PARM_DESC(psv, "Disable or override all passive trip points.\n");
+
 static int acpi_thermal_add(struct acpi_device *device);
 static int acpi_thermal_remove(struct acpi_device *device, int type);
 static int acpi_thermal_resume(struct acpi_device *device);
@@ -343,9 +347,16 @@ static int acpi_thermal_get_trip_points(struct 
acpi_thermal *tz)
 
        /* Passive: Processors (optional) */
 
-       status =
-           acpi_evaluate_integer(tz->device->handle, "_PSV", NULL,
-                                 &tz->trips.passive.temperature);
+       if (psv == -1) {
+               status = AE_SUPPORT;
+       } else if (psv > 0) {
+               tz->trips.passive.temperature = CELSIUS_TO_KELVIN(psv);
+               status = AE_OK;
+       } else {
+               status = acpi_evaluate_integer(tz->device->handle,
+                       "_PSV", NULL, &tz->trips.passive.temperature);
+       }
+
        if (ACPI_FAILURE(status)) {
                tz->trips.passive.flags.valid = 0;
                ACPI_DEBUG_PRINT((ACPI_DB_INFO, "No passive threshold\n"));
-
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  http://vger.kernel.org/majordomo-info.html

Reply via email to