From: "thermal-bot for Daniel Lezcano" <tip-bot2@linutronix.de>
To: linux-pm@vger.kernel.org
Cc: Daniel Lezcano <daniel.lezcano@linaro.org>,
rui.zhang@intel.com, amitk@kernel.org
Subject: [thermal: thermal/next] thermal/core: Rearm the monitoring only one time
Date: Tue, 23 Aug 2022 12:42:43 -0000 [thread overview]
Message-ID: <166125856384.401.8782554627619918395.tip-bot2@tip-bot2> (raw)
In-Reply-To: <20220805153834.2510142-1-daniel.lezcano@linaro.org>
The following commit has been merged into the thermal/next branch of thermal:
Commit-ID: 9662756a9a1c34b3ee606dcddfda6a457f89b07f
Gitweb: https://git.kernel.org/pub/scm/linux/kernel/git/thermal/linux.git//9662756a9a1c34b3ee606dcddfda6a457f89b07f
Author: Daniel Lezcano <daniel.lezcano@linaro.org>
AuthorDate: Fri, 05 Aug 2022 17:38:30 +02:00
Committer: Daniel Lezcano <daniel.lezcano@linaro.org>
CommitterDate: Wed, 17 Aug 2022 14:09:39 +02:00
thermal/core: Rearm the monitoring only one time
The current code calls monitor_thermal_zone() inside the
handle_thermal_trip() function. But this one is called in a loop for
each trip point which means the monitoring is rearmed several times
for nothing (assuming there could be several passive and active trip
points).
Move the monitor_thermal_zone() function out of the
handle_thermal_trip() function and after the thermal trip loop, so the
timer will be disabled or rearmed one time.
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
Link: https://lore.kernel.org/r/20220805153834.2510142-1-daniel.lezcano@linaro.org
---
drivers/thermal/thermal_core.c | 7 ++-----
1 file changed, 2 insertions(+), 5 deletions(-)
diff --git a/drivers/thermal/thermal_core.c b/drivers/thermal/thermal_core.c
index 69447ab..ea41ea6 100644
--- a/drivers/thermal/thermal_core.c
+++ b/drivers/thermal/thermal_core.c
@@ -383,11 +383,6 @@ static void handle_thermal_trip(struct thermal_zone_device *tz, int trip)
handle_critical_trips(tz, trip, trip_temp, type);
else
handle_non_critical_trips(tz, trip);
- /*
- * Alright, we handled this trip successfully.
- * So, start monitoring again.
- */
- monitor_thermal_zone(tz);
}
static void update_temperature(struct thermal_zone_device *tz)
@@ -503,6 +498,8 @@ void thermal_zone_device_update(struct thermal_zone_device *tz,
for (count = 0; count < tz->num_trips; count++)
handle_thermal_trip(tz, count);
+
+ monitor_thermal_zone(tz);
}
EXPORT_SYMBOL_GPL(thermal_zone_device_update);
prev parent reply other threads:[~2022-08-23 16:22 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-08-05 15:38 [PATCH 1/5] thermal/core: Rearm the monitoring only one time Daniel Lezcano
2022-08-05 15:38 ` [PATCH 2/5] thermal/core: Rework the monitoring a bit Daniel Lezcano
2022-08-23 12:42 ` [thermal: thermal/next] " thermal-bot for Daniel Lezcano
2022-08-05 15:38 ` [PATCH 3/5] thermal/governors: Group the thermal zone lock inside the throttle function Daniel Lezcano
2022-08-23 12:42 ` [thermal: thermal/next] " thermal-bot for Daniel Lezcano
2022-08-05 15:38 ` [PATCH 4/5] thermal/core: Move the thermal zone lock out of the governors Daniel Lezcano
2022-08-23 12:42 ` [thermal: thermal/next] " thermal-bot for Daniel Lezcano
2022-10-04 14:14 ` [PATCH 4/5] " Guenter Roeck
2022-10-04 14:21 ` Daniel Lezcano
2022-08-05 15:38 ` [PATCH 5/5] thermal/core: Move the mutex inside the thermal_zone_device_update() function Daniel Lezcano
2022-08-12 10:39 ` Marek Szyprowski
2022-08-12 13:12 ` [PATCH] thermal/core: Fix lockdep_assert() warning Daniel Lezcano
2022-08-12 13:34 ` Marek Szyprowski
2022-08-12 13:54 ` Daniel Lezcano
2022-08-20 11:57 ` Rafael J. Wysocki
2022-08-12 13:17 ` [PATCH 5/5] thermal/core: Move the mutex inside the thermal_zone_device_update() function Daniel Lezcano
2022-08-23 12:42 ` [thermal: thermal/next] " thermal-bot for Daniel Lezcano
2022-08-05 16:29 ` [PATCH 1/5] thermal/core: Rearm the monitoring only one time Rafael J. Wysocki
2022-08-05 16:37 ` Daniel Lezcano
2022-08-23 12:42 ` thermal-bot for Daniel Lezcano [this message]
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=166125856384.401.8782554627619918395.tip-bot2@tip-bot2 \
--to=tip-bot2@linutronix.de \
--cc=amitk@kernel.org \
--cc=daniel.lezcano@linaro.org \
--cc=linux-pm@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