* [PATCH 1/6] ACPI: thermal: "thermal.off=1" disables ACPI thermal support
@ 2007-08-09 5:58 ` Len Brown
0 siblings, 0 replies; 11+ messages in thread
From: Len Brown @ 2007-08-09 5:58 UTC (permalink / raw)
To: linux-acpi; +Cc: Len Brown
"thermal.off=1" disables all ACPI thermal support at boot time,
just as CONFIG_ACPI_THERMAL=n does at build time.
This bootparam is for users who run pre-compiled kernels, but
have some intractable issue with ACPI thermal control.
Note that on some systems, disabling ACPI thermal support
will cause the system to run hotter and reduce the
lifetime of the hardware.
Signed-off-by: Len Brown <len.brown@intel.com>
---
Documentation/kernel-parameters.txt | 3 +++
drivers/acpi/thermal.c | 9 ++++++++-
2 files changed, 11 insertions(+), 1 deletions(-)
diff --git a/Documentation/kernel-parameters.txt b/Documentation/kernel-parameters.txt
index efdb42f..464aea1 100644
--- a/Documentation/kernel-parameters.txt
+++ b/Documentation/kernel-parameters.txt
@@ -1820,6 +1820,9 @@ 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.off= [HW,ACPI]
+ 1: disable ACPI thermal control
+
time Show timing data prefixed to each printk message line
[deprecated, see 'printk.time']
diff --git a/drivers/acpi/thermal.c b/drivers/acpi/thermal.c
index 5a62de1..61337d9 100644
--- a/drivers/acpi/thermal.c
+++ b/drivers/acpi/thermal.c
@@ -78,6 +78,10 @@ static int tzp;
module_param(tzp, int, 0);
MODULE_PARM_DESC(tzp, "Thermal zone polling frequency, in 1/10 seconds.\n");
+static int off;
+module_param(off, int, 0);
+MODULE_PARM_DESC(off, "Set to disable ACPI thermal support.\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);
@@ -1285,7 +1289,10 @@ static int __init acpi_thermal_init(void)
{
int result = 0;
-
+ if (off) {
+ printk(KERN_NOTICE "ACPI: thermal control disabled\n");
+ return -ENODEV;
+ }
acpi_thermal_dir = proc_mkdir(ACPI_THERMAL_CLASS, acpi_root_dir);
if (!acpi_thermal_dir)
return -ENODEV;
--
1.5.3.rc4.29.g74276
^ permalink raw reply related [flat|nested] 11+ messages in thread* [PATCH 2/6] ACPI: thermal: expose "thermal.tzp="
@ 2007-08-09 5:58 ` Len Brown
0 siblings, 0 replies; 11+ messages in thread
From: Len Brown @ 2007-08-09 5:58 UTC (permalink / raw)
To: linux-acpi; +Cc: Len Brown
Thermal Zone Polling frequency (_TZP) is an optional ACPI object
recommending the rate that the OS should poll the associated thermal zone.
If _TZP is 0, no polling should be used.
If _TZP is non-zero, then the platform recommends that
the thermal zone be polled at the specified rate.
The minimum period is 30 seconds.
The maximum period is 5 minutes.
(note _TZP and thermal.tzp units are in deci-seconds,
so _TZP = 300 corresponds to 30 seconds)
If _TZP is not present, ACPI 3.0b recommends that the
thermal zone be polled at an "OS provided default frequency".
However, common industry practice is:
1. The BIOS never specifies any _TZP
2. The OS never polls any thermal zones
Ie. OS depends on the platform's ability to
provoke thermal events when necessary, and
the "OS provided default frequency" is "never":-)
The Linux kernel already follows this common industry practice --
thermal zones are not polled unless _TZP is present and non-zero.
But thermal zone polling is useful as a workaround for systems
which have ACPI thermal control, but have an issue with
thermal events. Indeed, some Linux distributions still
set a non-zero thermal polling frequency for this reason.
But rather than ask the user to write a polling frequency
into all the /proc/acpi/thermal_zone/*/polling_frequency
files, here we simply document and expose the already
existing module parameter to do the same at system level.
Note this is a module-load time parameter only.
Signed-off-by: Len Brown <len.brown@intel.com>
---
Documentation/kernel-parameters.txt | 5 +++++
drivers/acpi/thermal.c | 2 +-
2 files changed, 6 insertions(+), 1 deletions(-)
diff --git a/Documentation/kernel-parameters.txt b/Documentation/kernel-parameters.txt
index 464aea1..2c21ed4 100644
--- a/Documentation/kernel-parameters.txt
+++ b/Documentation/kernel-parameters.txt
@@ -1823,6 +1823,11 @@ and is between 256 and 4096 characters. It is defined in the file
thermal.off= [HW,ACPI]
1: disable ACPI thermal control
+ thermal.tzp= [HW,ACPI]
+ Specify global default ACPI thermal zone polling rate
+ <deci-seconds>: poll all this frequency
+ 0: no polling (default)
+
time Show timing data prefixed to each printk message line
[deprecated, see 'printk.time']
diff --git a/drivers/acpi/thermal.c b/drivers/acpi/thermal.c
index 61337d9..b6b3bec 100644
--- a/drivers/acpi/thermal.c
+++ b/drivers/acpi/thermal.c
@@ -75,7 +75,7 @@ MODULE_DESCRIPTION("ACPI Thermal Zone Driver");
MODULE_LICENSE("GPL");
static int tzp;
-module_param(tzp, int, 0);
+module_param(tzp, int, 0444);
MODULE_PARM_DESC(tzp, "Thermal zone polling frequency, in 1/10 seconds.\n");
static int off;
--
1.5.3.rc4.29.g74276
^ permalink raw reply related [flat|nested] 11+ messages in thread* [PATCH 2/6] ACPI: thermal: expose "thermal.tzp="
@ 2007-08-09 5:58 ` Len Brown
0 siblings, 0 replies; 11+ messages in thread
From: Len Brown @ 2007-08-09 5:58 UTC (permalink / raw)
To: linux-acpi; +Cc: Len Brown
Thermal Zone Polling frequency (_TZP) is an optional ACPI object
recommending the rate that the OS should poll the associated thermal zone.
If _TZP is 0, no polling should be used.
If _TZP is non-zero, then the platform recommends that
the thermal zone be polled at the specified rate.
The minimum period is 30 seconds.
The maximum period is 5 minutes.
(note _TZP and thermal.tzp units are in deci-seconds,
so _TZP = 300 corresponds to 30 seconds)
If _TZP is not present, ACPI 3.0b recommends that the
thermal zone be polled at an "OS provided default frequency".
However, common industry practice is:
1. The BIOS never specifies any _TZP
2. The OS never polls any thermal zones
Ie. OS depends on the platform's ability to
provoke thermal events when necessary, and
the "OS provided default frequency" is "never":-)
The Linux kernel already follows this common industry practice --
thermal zones are not polled unless _TZP is present and non-zero.
But thermal zone polling is useful as a workaround for systems
which have ACPI thermal control, but have an issue with
thermal events. Indeed, some Linux distributions still
set a non-zero thermal polling frequency for this reason.
But rather than ask the user to write a polling frequency
into all the /proc/acpi/thermal_zone/*/polling_frequency
files, here we simply document and expose the already
existing module parameter to do the same at system level.
Note this is a module-load time parameter only.
Signed-off-by: Len Brown <len.brown@intel.com>
---
Documentation/kernel-parameters.txt | 5 +++++
drivers/acpi/thermal.c | 2 +-
2 files changed, 6 insertions(+), 1 deletions(-)
diff --git a/Documentation/kernel-parameters.txt b/Documentation/kernel-parameters.txt
index 464aea1..2c21ed4 100644
--- a/Documentation/kernel-parameters.txt
+++ b/Documentation/kernel-parameters.txt
@@ -1823,6 +1823,11 @@ and is between 256 and 4096 characters. It is defined in the file
thermal.off= [HW,ACPI]
1: disable ACPI thermal control
+ thermal.tzp= [HW,ACPI]
+ Specify global default ACPI thermal zone polling rate
+ <deci-seconds>: poll all this frequency
+ 0: no polling (default)
+
time Show timing data prefixed to each printk message line
[deprecated, see 'printk.time']
diff --git a/drivers/acpi/thermal.c b/drivers/acpi/thermal.c
index 61337d9..b6b3bec 100644
--- a/drivers/acpi/thermal.c
+++ b/drivers/acpi/thermal.c
@@ -75,7 +75,7 @@ MODULE_DESCRIPTION("ACPI Thermal Zone Driver");
MODULE_LICENSE("GPL");
static int tzp;
-module_param(tzp, int, 0);
+module_param(tzp, int, 0444);
MODULE_PARM_DESC(tzp, "Thermal zone polling frequency, in 1/10 seconds.\n");
static int off;
--
1.5.3.rc4.29.g74276
^ permalink raw reply related [flat|nested] 11+ messages in thread
* [PATCH 3/6] ACPI: thermal: create "thermal.psv=" bootparam
@ 2007-08-09 5:58 ` Len Brown
2007-08-09 17:22 ` Len Brown
0 siblings, 1 reply; 11+ messages in thread
From: Len Brown @ 2007-08-09 5:58 UTC (permalink / raw)
To: linux-acpi; +Cc: Len Brown
"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
^ permalink raw reply related [flat|nested] 11+ messages in thread* [PATCH 3/6] ACPI: thermal: create "thermal.psv=" bootparam
@ 2007-08-09 5:58 ` Len Brown
2007-08-09 17:22 ` Len Brown
0 siblings, 1 reply; 11+ messages in thread
From: Len Brown @ 2007-08-09 5:58 UTC (permalink / raw)
To: linux-acpi; +Cc: Len Brown
"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
^ permalink raw reply related [flat|nested] 11+ messages in thread* Re: [PATCH 3/6] ACPI: thermal: create "thermal.psv=" bootparam
2007-08-09 5:58 ` Len Brown
@ 2007-08-09 17:22 ` Len Brown
0 siblings, 0 replies; 11+ messages in thread
From: Len Brown @ 2007-08-09 17:22 UTC (permalink / raw)
To: linux-acpi
Subject: ACPI: thermal: create "thermal.psv=" to override passive trip points
From: Len Brown <len.brown@intel.com>
"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 <len.brown@intel.com>
---
This updates the previous version of this patch
so that -1 disables _PSV (instead of 0),
and the user's Celsius value is properly converted
to Kelvin*10 for internal use.
Index: linus/Documentation/kernel-parameters.txt
===================================================================
--- linus.orig/Documentation/kernel-parameters.txt
+++ linus/Documentation/kernel-parameters.txt
@@ -1823,6 +1823,10 @@ and is between 256 and 4096 characters.
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
Index: linus/drivers/acpi/thermal.c
===================================================================
--- linus.orig/drivers/acpi/thermal.c
+++ linus/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(
/* 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"));
^ permalink raw reply [flat|nested] 11+ messages in thread
* [PATCH 4/6] ACPI: thermal: create "thermal.nocrt" bootparam
@ 2007-08-09 5:58 ` Len Brown
0 siblings, 0 replies; 11+ messages in thread
From: Len Brown @ 2007-08-09 5:58 UTC (permalink / raw)
To: linux-acpi; +Cc: Len Brown
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 lm-sensors@lm-sensors.org
and linux-acpi@vger.kernel.org
Otherwise, file a Linux/ACPI bug, or notify
just linux-acpi@vger.kernel.org.
Signed-off-by: Len Brown <len.brown@intel.com>
---
Documentation/kernel-parameters.txt | 4 ++++
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 9118fc6..897bb63 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.
+
thermal.off= [HW,ACPI]
1: disable ACPI thermal control
diff --git a/drivers/acpi/thermal.c b/drivers/acpi/thermal.c
index 9d7453c..1642980 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->trips.hot.flags.valid)
+ if (!tz || !tz->trips.hot.flags.valid || nocrt)
return -EINVAL;
if (tz->temperature >= tz->trips.hot.temperature) {
@@ -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,
--
1.5.3.rc4.29.g74276
^ permalink raw reply related [flat|nested] 11+ messages in thread* [PATCH 4/6] ACPI: thermal: create "thermal.nocrt" bootparam
@ 2007-08-09 5:58 ` Len Brown
0 siblings, 0 replies; 11+ messages in thread
From: Len Brown @ 2007-08-09 5:58 UTC (permalink / raw)
To: linux-acpi; +Cc: Len Brown
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 lm-sensors@lm-sensors.org
and linux-acpi@vger.kernel.org
Otherwise, file a Linux/ACPI bug, or notify
just linux-acpi@vger.kernel.org.
Signed-off-by: Len Brown <len.brown@intel.com>
---
Documentation/kernel-parameters.txt | 4 ++++
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 9118fc6..897bb63 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.
+
thermal.off= [HW,ACPI]
1: disable ACPI thermal control
diff --git a/drivers/acpi/thermal.c b/drivers/acpi/thermal.c
index 9d7453c..1642980 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->trips.hot.flags.valid)
+ if (!tz || !tz->trips.hot.flags.valid || nocrt)
return -EINVAL;
if (tz->temperature >= tz->trips.hot.temperature) {
@@ -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,
--
1.5.3.rc4.29.g74276
^ permalink raw reply related [flat|nested] 11+ messages in thread
* [PATCH 5/6] ACPI: thermal: add thermal.act= bootparam
@ 2007-08-09 5:58 ` Len Brown
2007-08-11 4:29 ` Len Brown
0 siblings, 1 reply; 11+ messages in thread
From: Len Brown @ 2007-08-09 5:58 UTC (permalink / raw)
To: linux-acpi; +Cc: Len Brown
thermal.act=-1 disables all active trip points
in all ACPI thermal zones.
thermal.act=C, where C > 0, overrides all first active trip points
in all thermal zones to C degrees Celcius.
Note, overriding this trip-point will disable any BIOS attempts
to implement hysterisis around AC0, and may result in the fan
starting and stopping frequently if temperature frequently crosses C.
Signed-off-by: Len Brown <len.brown@intel.com>
---
Documentation/kernel-parameters.txt | 4 ++++
drivers/acpi/thermal.c | 20 ++++++++++++++++----
2 files changed, 20 insertions(+), 4 deletions(-)
diff --git a/Documentation/kernel-parameters.txt b/Documentation/kernel-parameters.txt
index 897bb63..a82d46f 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.act= [HW,ACPI]
+ -1: disable all active trip points in all thermal zones
+ <degrees C>: override all lowest active trip points
+
thermal.nocrt= [HW,ACPI]
Set to disable actions on ACPI thermal zone
critical and hot trip points.
diff --git a/drivers/acpi/thermal.c b/drivers/acpi/thermal.c
index 1642980..2b48ab9 100644
--- a/drivers/acpi/thermal.c
+++ b/drivers/acpi/thermal.c
@@ -74,6 +74,10 @@ MODULE_AUTHOR("Paul Diefenbaugh");
MODULE_DESCRIPTION("ACPI Thermal Zone Driver");
MODULE_LICENSE("GPL");
+static int act;
+module_param(act, int, 0644);
+MODULE_PARM_DESC(act, "Disable or override all lowest active trip points.\n");
+
static int tzp;
module_param(tzp, int, 0444);
MODULE_PARM_DESC(tzp, "Thermal zone polling frequency, in 1/10 seconds.\n");
@@ -405,11 +409,19 @@ static int acpi_thermal_get_trip_points(struct acpi_thermal *tz)
char name[5] = { '_', 'A', 'C', ('0' + i), '\0' };
- status =
- acpi_evaluate_integer(tz->device->handle, name, NULL,
- &tz->trips.active[i].temperature);
- if (ACPI_FAILURE(status))
+ if (act == -1)
+ break; /* disable all active trip points */
+
+ status = acpi_evaluate_integer(tz->device->handle,
+ name, NULL, &tz->trips.active[i].temperature);
+
+ if (ACPI_FAILURE(status)) {
+ /* override last valid trip point */
+ if ((i > 0) && (act > 0))
+ tz->trips.active[i - 1].temperature =
+ CELSIUS_TO_KELVIN(act);
break;
+ }
name[2] = 'L';
status =
--
1.5.3.rc4.29.g74276
^ permalink raw reply related [flat|nested] 11+ messages in thread* [PATCH 5/6] ACPI: thermal: add thermal.act= bootparam
@ 2007-08-09 5:58 ` Len Brown
2007-08-11 4:29 ` Len Brown
0 siblings, 1 reply; 11+ messages in thread
From: Len Brown @ 2007-08-09 5:58 UTC (permalink / raw)
To: linux-acpi; +Cc: Len Brown
thermal.act=-1 disables all active trip points
in all ACPI thermal zones.
thermal.act=C, where C > 0, overrides all first active trip points
in all thermal zones to C degrees Celcius.
Note, overriding this trip-point will disable any BIOS attempts
to implement hysterisis around AC0, and may result in the fan
starting and stopping frequently if temperature frequently crosses C.
Signed-off-by: Len Brown <len.brown@intel.com>
---
Documentation/kernel-parameters.txt | 4 ++++
drivers/acpi/thermal.c | 20 ++++++++++++++++----
2 files changed, 20 insertions(+), 4 deletions(-)
diff --git a/Documentation/kernel-parameters.txt b/Documentation/kernel-parameters.txt
index 897bb63..a82d46f 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.act= [HW,ACPI]
+ -1: disable all active trip points in all thermal zones
+ <degrees C>: override all lowest active trip points
+
thermal.nocrt= [HW,ACPI]
Set to disable actions on ACPI thermal zone
critical and hot trip points.
diff --git a/drivers/acpi/thermal.c b/drivers/acpi/thermal.c
index 1642980..2b48ab9 100644
--- a/drivers/acpi/thermal.c
+++ b/drivers/acpi/thermal.c
@@ -74,6 +74,10 @@ MODULE_AUTHOR("Paul Diefenbaugh");
MODULE_DESCRIPTION("ACPI Thermal Zone Driver");
MODULE_LICENSE("GPL");
+static int act;
+module_param(act, int, 0644);
+MODULE_PARM_DESC(act, "Disable or override all lowest active trip points.\n");
+
static int tzp;
module_param(tzp, int, 0444);
MODULE_PARM_DESC(tzp, "Thermal zone polling frequency, in 1/10 seconds.\n");
@@ -405,11 +409,19 @@ static int acpi_thermal_get_trip_points(struct acpi_thermal *tz)
char name[5] = { '_', 'A', 'C', ('0' + i), '\0' };
- status =
- acpi_evaluate_integer(tz->device->handle, name, NULL,
- &tz->trips.active[i].temperature);
- if (ACPI_FAILURE(status))
+ if (act == -1)
+ break; /* disable all active trip points */
+
+ status = acpi_evaluate_integer(tz->device->handle,
+ name, NULL, &tz->trips.active[i].temperature);
+
+ if (ACPI_FAILURE(status)) {
+ /* override last valid trip point */
+ if ((i > 0) && (act > 0))
+ tz->trips.active[i - 1].temperature =
+ CELSIUS_TO_KELVIN(act);
break;
+ }
name[2] = 'L';
status =
--
1.5.3.rc4.29.g74276
^ permalink raw reply related [flat|nested] 11+ messages in thread* Re: [PATCH 5/6] ACPI: thermal: add thermal.act= bootparam
2007-08-09 5:58 ` Len Brown
@ 2007-08-11 4:29 ` Len Brown
0 siblings, 0 replies; 11+ messages in thread
From: Len Brown @ 2007-08-11 4:29 UTC (permalink / raw)
To: linux-acpi
Subject: ACPI: thermal: create "thermal.act=" to disable or override active trip point
From: Len Brown <len.brown@intel.com>
thermal.act=-1 disables all active trip points
in all ACPI thermal zones.
thermal.act=C, where C > 0, overrides all lowest temperature
active trip points in all thermal zones to C degrees Celsius.
Raising this trip-point may allow you to keep your system silent
up to a higher temperature. However, it will not allow you to
raise the lowest temperature trip point above the next higher
trip point (if there is one). Lowering this trip point may
kick in the fan sooner.
Note that overriding this trip-point will disable any BIOS attempts
to implement hysteresis around the lowest temperature trip point.
This may result in the fan starting and stopping frequently
if temperature frequently crosses C.
WARNING: raising trip points above the manufacturer's defaults
may cause the system to run at higher temperature and shorten
its life.
Signed-off-by: Len Brown <len.brown@intel.com>
---
refreshed to add check to limit trip-point override
to equal the next higher trip point.
Index: linus/Documentation/kernel-parameters.txt
===================================================================
--- linus.orig/Documentation/kernel-parameters.txt
+++ linus/Documentation/kernel-parameters.txt
@@ -1820,6 +1820,10 @@ and is between 256 and 4096 characters.
thash_entries= [KNL,NET]
Set number of hash buckets for TCP connection
+ thermal.act= [HW,ACPI]
+ -1: disable all active trip points in all thermal zones
+ <degrees C>: override all lowest active trip points
+
thermal.nocrt= [HW,ACPI]
Set to disable actions on ACPI thermal zone
critical and hot trip points.
Index: linus/drivers/acpi/thermal.c
===================================================================
--- linus.orig/drivers/acpi/thermal.c
+++ linus/drivers/acpi/thermal.c
@@ -74,6 +74,10 @@ MODULE_AUTHOR("Paul Diefenbaugh");
MODULE_DESCRIPTION("ACPI Thermal Zone Driver");
MODULE_LICENSE("GPL");
+static int act;
+module_param(act, int, 0644);
+MODULE_PARM_DESC(act, "Disable or override all lowest active trip points.\n");
+
static int tzp;
module_param(tzp, int, 0444);
MODULE_PARM_DESC(tzp, "Thermal zone polling frequency, in 1/10 seconds.\n");
@@ -405,11 +409,33 @@ static int acpi_thermal_get_trip_points(
char name[5] = { '_', 'A', 'C', ('0' + i), '\0' };
- status =
- acpi_evaluate_integer(tz->device->handle, name, NULL,
- &tz->trips.active[i].temperature);
- if (ACPI_FAILURE(status))
+ if (act == -1)
+ break; /* disable all active trip points */
+
+ status = acpi_evaluate_integer(tz->device->handle,
+ name, NULL, &tz->trips.active[i].temperature);
+
+ if (ACPI_FAILURE(status)) {
+ if (i == 0) /* no active trip points */
+ break;
+ if (act <= 0) /* no override requested */
+ break;
+ if (i == 1) { /* 1 trip point */
+ tz->trips.active[0].temperature =
+ CELSIUS_TO_KELVIN(act);
+ } else { /* multiple trips */
+ /*
+ * Don't allow override higher than
+ * the next higher trip point
+ */
+ tz->trips.active[i - 1].temperature =
+ (tz->trips.active[i - 2].temperature <
+ CELSIUS_TO_KELVIN(act) ?
+ tz->trips.active[i - 2].temperature :
+ CELSIUS_TO_KELVIN(act));
+ }
break;
+ }
name[2] = 'L';
status =
^ permalink raw reply [flat|nested] 11+ messages in thread
* [PATCH 6/6] ACPI: thermal: work around broken AOpen Award BIOS
@ 2007-08-09 5:58 ` Len Brown
0 siblings, 0 replies; 11+ messages in thread
From: Len Brown @ 2007-08-09 5:58 UTC (permalink / raw)
To: linux-acpi; +Cc: Len Brown
Use DMI to:
1. enable polling (BIOS thermal events are broken)
2. disable active trip points (BIOS fan control is broken)
3. disable passive trip point (BIOS hard-codes it too low)
The actual temperature reading does work,
and with the aid of polling, the critical
trip point should work too.
http://bugzilla.kernel.org/show_bug.cgi?id=8842
Signed-off-by: Len Brown <len.brown@intel.com>
---
drivers/acpi/thermal.c | 65 ++++++++++++++++++++++++++++++++++++++++++++++++
1 files changed, 65 insertions(+), 0 deletions(-)
diff --git a/drivers/acpi/thermal.c b/drivers/acpi/thermal.c
index 2b48ab9..d105d65 100644
--- a/drivers/acpi/thermal.c
+++ b/drivers/acpi/thermal.c
@@ -33,6 +33,7 @@
#include <linux/kernel.h>
#include <linux/module.h>
+#include <linux/dmi.h>
#include <linux/init.h>
#include <linux/types.h>
#include <linux/proc_fs.h>
@@ -1314,10 +1315,74 @@ static int acpi_thermal_resume(struct acpi_device *device)
return AE_OK;
}
+#ifdef CONFIG_DMI
+static int thermal_act(struct dmi_system_id *d) {
+
+ if (act == 0) {
+ printk(KERN_NOTICE "ACPI: %s detected: "
+ "disabling all active thermal trip points\n", d->ident);
+ act = -1;
+ }
+ return 0;
+}
+static int thermal_tzp(struct dmi_system_id *d) {
+
+ if (tzp == 0) {
+ printk(KERN_NOTICE "ACPI: %s detected: "
+ "enabling thermal zone polling\n", d->ident);
+ tzp = 300; /* 300 dS = 30 Seconds */
+ }
+ return 0;
+}
+static int thermal_psv(struct dmi_system_id *d) {
+
+ if (psv == 0) {
+ printk(KERN_NOTICE "ACPI: %s detected: "
+ "disabling all passive thermal trip points\n", d->ident);
+ psv = -1;
+ }
+ return 0;
+}
+
+static struct dmi_system_id thermal_dmi_table[] __initdata = {
+ /*
+ * Award BIOS on this AOpen makes thermal control almost worthless.
+ * http://bugzilla.kernel.org/show_bug.cgi?id=8842
+ */
+ {
+ .callback = thermal_act,
+ .ident = "AOpen i915GMm-HFS",
+ .matches = {
+ DMI_MATCH(DMI_BOARD_VENDOR, "AOpen"),
+ DMI_MATCH(DMI_BOARD_NAME, "i915GMm-HFS"),
+ },
+ },
+ {
+ .callback = thermal_psv,
+ .ident = "AOpen i915GMm-HFS",
+ .matches = {
+ DMI_MATCH(DMI_BOARD_VENDOR, "AOpen"),
+ DMI_MATCH(DMI_BOARD_NAME, "i915GMm-HFS"),
+ },
+ },
+ {
+ .callback = thermal_tzp,
+ .ident = "AOpen i915GMm-HFS",
+ .matches = {
+ DMI_MATCH(DMI_BOARD_VENDOR, "AOpen"),
+ DMI_MATCH(DMI_BOARD_NAME, "i915GMm-HFS"),
+ },
+ },
+ {}
+};
+#endif /* CONFIG_DMI */
+
static int __init acpi_thermal_init(void)
{
int result = 0;
+ dmi_check_system(thermal_dmi_table);
+
if (off) {
printk(KERN_NOTICE "ACPI: thermal control disabled\n");
return -ENODEV;
--
1.5.3.rc4.29.g74276
^ permalink raw reply related [flat|nested] 11+ messages in thread* [PATCH 6/6] ACPI: thermal: work around broken AOpen Award BIOS
@ 2007-08-09 5:58 ` Len Brown
0 siblings, 0 replies; 11+ messages in thread
From: Len Brown @ 2007-08-09 5:58 UTC (permalink / raw)
To: linux-acpi; +Cc: Len Brown
Use DMI to:
1. enable polling (BIOS thermal events are broken)
2. disable active trip points (BIOS fan control is broken)
3. disable passive trip point (BIOS hard-codes it too low)
The actual temperature reading does work,
and with the aid of polling, the critical
trip point should work too.
http://bugzilla.kernel.org/show_bug.cgi?id=8842
Signed-off-by: Len Brown <len.brown@intel.com>
---
drivers/acpi/thermal.c | 65 ++++++++++++++++++++++++++++++++++++++++++++++++
1 files changed, 65 insertions(+), 0 deletions(-)
diff --git a/drivers/acpi/thermal.c b/drivers/acpi/thermal.c
index 2b48ab9..d105d65 100644
--- a/drivers/acpi/thermal.c
+++ b/drivers/acpi/thermal.c
@@ -33,6 +33,7 @@
#include <linux/kernel.h>
#include <linux/module.h>
+#include <linux/dmi.h>
#include <linux/init.h>
#include <linux/types.h>
#include <linux/proc_fs.h>
@@ -1314,10 +1315,74 @@ static int acpi_thermal_resume(struct acpi_device *device)
return AE_OK;
}
+#ifdef CONFIG_DMI
+static int thermal_act(struct dmi_system_id *d) {
+
+ if (act == 0) {
+ printk(KERN_NOTICE "ACPI: %s detected: "
+ "disabling all active thermal trip points\n", d->ident);
+ act = -1;
+ }
+ return 0;
+}
+static int thermal_tzp(struct dmi_system_id *d) {
+
+ if (tzp == 0) {
+ printk(KERN_NOTICE "ACPI: %s detected: "
+ "enabling thermal zone polling\n", d->ident);
+ tzp = 300; /* 300 dS = 30 Seconds */
+ }
+ return 0;
+}
+static int thermal_psv(struct dmi_system_id *d) {
+
+ if (psv == 0) {
+ printk(KERN_NOTICE "ACPI: %s detected: "
+ "disabling all passive thermal trip points\n", d->ident);
+ psv = -1;
+ }
+ return 0;
+}
+
+static struct dmi_system_id thermal_dmi_table[] __initdata = {
+ /*
+ * Award BIOS on this AOpen makes thermal control almost worthless.
+ * http://bugzilla.kernel.org/show_bug.cgi?id=8842
+ */
+ {
+ .callback = thermal_act,
+ .ident = "AOpen i915GMm-HFS",
+ .matches = {
+ DMI_MATCH(DMI_BOARD_VENDOR, "AOpen"),
+ DMI_MATCH(DMI_BOARD_NAME, "i915GMm-HFS"),
+ },
+ },
+ {
+ .callback = thermal_psv,
+ .ident = "AOpen i915GMm-HFS",
+ .matches = {
+ DMI_MATCH(DMI_BOARD_VENDOR, "AOpen"),
+ DMI_MATCH(DMI_BOARD_NAME, "i915GMm-HFS"),
+ },
+ },
+ {
+ .callback = thermal_tzp,
+ .ident = "AOpen i915GMm-HFS",
+ .matches = {
+ DMI_MATCH(DMI_BOARD_VENDOR, "AOpen"),
+ DMI_MATCH(DMI_BOARD_NAME, "i915GMm-HFS"),
+ },
+ },
+ {}
+};
+#endif /* CONFIG_DMI */
+
static int __init acpi_thermal_init(void)
{
int result = 0;
+ dmi_check_system(thermal_dmi_table);
+
if (off) {
printk(KERN_NOTICE "ACPI: thermal control disabled\n");
return -ENODEV;
--
1.5.3.rc4.29.g74276
^ permalink raw reply related [flat|nested] 11+ messages in thread