All of lore.kernel.org
 help / color / mirror / Atom feed
From: Len Brown <len.brown@intel.com>
To: linux-acpi@vger.kernel.org
Cc: Len Brown <len.brown@intel.com>
Subject: [PATCH 3/6] ACPI: thermal: create "thermal.psv=" bootparam
Date: Thu,  9 Aug 2007 01:58:53 -0400	[thread overview]
Message-ID: <11866391391260-git-send-email-len.brown@intel.com> (raw)
Message-ID: <95fa38b440b56d248ad09a75d1187310527e7b17.1186638234.git.len.brown@intel.com> (raw)
In-Reply-To: <11866391381018-git-send-email-len.brown@intel.com>
In-Reply-To: <c405f58ecf5ebf0ba3752cb24a7cd0cc5075646d.1186638234.git.len.brown@intel.com>

"thermal.psv=0" disables passive trip points
for all ACPI thermal zones.

"thermal.psv=C", where 'C' is degrees Celcius,
overrides 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 it to be
noticed, you can enable polling:
eg. thermal.tzp=3000 invokes polling every 5 minutes.

Note that once passive thermal throttling is invoked,
it has its own internal polling frequencey that is
independent of tzp.

WARNING: disabling or raising a thermal trip point
will result in increased running temperature and
shorter hardware lifetime on some systems.

Signed-off-by: Len Brown <len.brown@intel.com>
---
 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 2c21ed4..9118fc6 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]
+			0: 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..9d7453c 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 = -1;
+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 == 0) {
+		status = AE_SUPPORT;
+	} else if (psv > 0) {
+		tz->trips.passive.temperature = 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"));
-- 
1.5.3.rc4.29.g74276

  parent reply	other threads:[~2007-08-09  5:59 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-08-09  5:58 ACPI Thermal workaround hooks Len Brown
2007-08-09  5:58 ` [PATCH 1/6] ACPI: thermal: "thermal.off=1" disables ACPI thermal support Len Brown
2007-08-09  5:58   ` Len Brown
2007-08-09  5:58   ` [PATCH 2/6] ACPI: thermal: expose "thermal.tzp=" Len Brown
2007-08-09  5:58     ` Len Brown
2007-08-09  5:58   ` Len Brown [this message]
2007-08-09  5:58     ` [PATCH 3/6] ACPI: thermal: create "thermal.psv=" bootparam Len Brown
2007-08-09 17:22       ` Len Brown
2007-08-09  5:58   ` [PATCH 4/6] ACPI: thermal: create "thermal.nocrt" bootparam Len Brown
2007-08-09  5:58     ` Len Brown
2007-08-09  5:58   ` [PATCH 5/6] ACPI: thermal: add thermal.act= bootparam Len Brown
2007-08-09  5:58     ` Len Brown
2007-08-11  4:29       ` Len Brown
2007-08-09  5:58   ` [PATCH 6/6] ACPI: thermal: work around broken AOpen Award BIOS Len Brown
2007-08-09  5:58     ` Len Brown
2007-08-09 17:33 ` ACPI Thermal workaround hooks Thomas Renninger
2007-08-11  4:41   ` Len Brown

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=11866391391260-git-send-email-len.brown@intel.com \
    --to=len.brown@intel.com \
    --cc=linux-acpi@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.