From: Jacob Pan <jacob.jun.pan@linux.intel.com>
To: Zhang Rui <rui.zhang@intel.com>
Cc: Len Brown <len.brown@intel.com>,
ACPI <linux-acpi@vger.kernel.org>,
Jacob Pan <jacob.jun.pan@linux.intel.com>
Subject: [PATCH] Thermal: undo throttling at exit of forced passive mode
Date: Mon, 18 Jun 2012 14:29:24 -0700 [thread overview]
Message-ID: <1340054964-25685-1-git-send-email-jacob.jun.pan@linux.intel.com> (raw)
When a thermal zone is in forced passive mode and temperature is above
passive trip point, processors are throttled to various states. However,
when user disables forced passive throttling, the processors could be
left in throttling state even when temperature is below passive trip
points.
This patch fixes the issue by always undo processor throttling when user
exits force passive mode. It is safe in that any subsequent thermal conditions
will still be handled according to trip point settings
Signed-off-by: Jacob Pan <jacob.jun.pan@linux.intel.com>
---
drivers/thermal/thermal_sys.c | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
diff --git a/drivers/thermal/thermal_sys.c b/drivers/thermal/thermal_sys.c
index 022bacb..ea867ff 100644
--- a/drivers/thermal/thermal_sys.c
+++ b/drivers/thermal/thermal_sys.c
@@ -250,10 +250,12 @@ passive_store(struct device *dev, struct device_attribute *attr,
mutex_lock(&thermal_list_lock);
list_for_each_entry(cdev, &thermal_cdev_list, node) {
if (!strncmp("Processor", cdev->type,
- sizeof("Processor")))
+ sizeof("Processor"))) {
thermal_zone_unbind_cooling_device(tz,
THERMAL_TRIPS_NONE,
cdev);
+ cdev->ops->set_cur_state(cdev, 0);
+ }
}
mutex_unlock(&thermal_list_lock);
tz->passive_delay = 0;
--
1.7.5.4
next reply other threads:[~2012-06-18 21:30 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-06-18 21:29 Jacob Pan [this message]
2012-06-19 1:14 ` [PATCH] Thermal: undo throttling at exit of forced passive mode Zhang Rui
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=1340054964-25685-1-git-send-email-jacob.jun.pan@linux.intel.com \
--to=jacob.jun.pan@linux.intel.com \
--cc=len.brown@intel.com \
--cc=linux-acpi@vger.kernel.org \
--cc=rui.zhang@intel.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox