summaryrefslogtreecommitdiff
path: root/drivers/thermal/gov_user_space.c
AgeCommit message (Collapse)AuthorFilesLines
2023-10-20thermal: core: Pass trip pointer to governor throttle callbackRafael J. Wysocki1-3/+5
Modify the governor .throttle() callback definition so that it takes a trip pointer instead of a trip index as its second argument, adjust the governors accordingly and update the core code invoking .throttle(). This causes the governors to become independent of the representation of the list of trips in the thermal zone structure. This change is not expected to alter the general functionality. Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com> Reviewed-by: Daniel Lezcano <daniel.lezcano@linaro.org>
2022-08-30thermal: gov_user_space: Do not lock thermal zone mutexRafael J. Wysocki1-2/+3
Commit 670a5e356cb6 ("thermal/core: Move the thermal zone lock out of the governors") moved thermal zone locking away from governors, but it forgot about the user space one which deadlocks now. Fix this by removing the thermal zone locking from the user space governor. Fixes: 670a5e356cb6 ("thermal/core: Move the thermal zone lock out of the governors") Tested-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2022-04-22thermal/governor: Remove deprecated informationDaniel Lezcano1-2/+1
The userspace governor is still in use on production systems and the deprecating warning is scary. Even if we want to get rid of the userspace governor, it is too soon yet as the alternatives are not yet adopted. Change the deprecated warning by an information message suggesting to switch to the netlink thermal events. Fixes: 0275c9fb0eff ("thermal/core: Make the userspace governor deprecated") Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2021-11-05thermal: Replace pr_warn() with pr_warn_once() in user_space_bind()Rafael J. Wysocki1-2/+2
Use pr_warn_once() instead of pr_warn() to print the user space governor deprecation message in user_space_bind() to reduce the kernel log noise. Fixes: 0275c9fb0eff ("thermal/core: Make the userspace governor deprecated") Reported-by: Linus Torvalds <torvalds@linuxfoundation.org> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com> Acked-by: Daniel Lezcano <daniel.lezcano@linaro.org>
2021-10-21thermal/core: Make the userspace governor deprecatedDaniel Lezcano1-0/+9
The userspace governor is sending temperature when polling is active and trip point crossed events. Nothing else. AFAICT, this governor is used with custom kernels making the userspace governor co-existing with another governor on the same thermal zone because there was no notification mechanism, implying a hack in the framework to support this configuration. The new netlink thermal notification is able to provide more information than the userspace governor and give the opportunity to the users of this governor to replace it by a dedicated notification framework. The userspace governor will be removed as its usage is no longer needed. Add a warning message to tell the userspace governor is deprecated. Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org> Acked-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com> Reviewed-by: Lukasz Luba <lukasz.luba@arm.com> Link: https://lore.kernel.org/r/20211019163506.2831454-1-daniel.lezcano@linaro.org
2020-05-22thermal/governors: Prefix all source files with gov_Amit Kucheria1-0/+47
Bang-bang governor source file is prefixed with gov_. Do the same for other governors for consistency so they're easy to find in the sources. Signed-off-by: Amit Kucheria <amit.kucheria@linaro.org> Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org> Link: https://lore.kernel.org/r/b9a85d3204712f14e320504948c12712dc0b291b.1589199124.git.amit.kucheria@linaro.org