Thermal: undo throttling at exit of forced passive mode
PATCH 1/1 Thermal: undo throttling at exit of forced passive mode
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
--- drivers/thermal/thermal_sys.c | 4 +++- 1 files changed, 3 insertions(+), 1 deletions(-)
drivers/thermal/thermal_sys.c +3 -1
@@ -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 ;
Signature · 1 line
1.7.5.4
Zhang Rui
reviewerQuoted 10 lines · Jacob Pan
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
agreed.
Will re-base this patch on top of my changes.
thanks,
rui
Quoted 13 lines
Signed-off-by Jacob Pan <[email protected]>--- drivers/thermal/thermal_sys.c | 4 +++- 1 files changed, 3 insertions(+), 1 deletions(-)drivers/thermal/thermal_sys.c +0
-0@@ -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,
drivers/thermal/thermal_sys.c passive_store(struct device *dev, struct device_attribute *attr, · line 261
Quoted 10 lines
drivers/thermal/thermal_sys.c +3
-1- 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 ;
--
To unsubscribe from this list: send the line "unsubscribe linux-acpi" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html