[PATCH] Thermal: undo throttling at exit of forced passive mode

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxxxxxx>
---
 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

--
To unsubscribe from this list: send the line "unsubscribe linux-acpi" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux IBM ACPI]     [Linux Power Management]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]     [Linux Resources]

  Powered by Linux