lists.openwall.net | lists / announce owl-users owl-dev john-users john-dev passwdqc-users yescrypt popa3d-users / oss-security kernel-hardening musl sabotage tlsify passwords / crypt-dev xvendor / Bugtraq Full-Disclosure linux-kernel linux-netdev linux-ext4 linux-hardening linux-cve-announce PHC | |
Open Source and information security mailing list archives
| ||
|
Date: Fri, 8 Jul 2022 12:48:54 +0200 From: Daniel Lezcano <daniel.lezcano@...aro.org> To: Zhang Rui <rui.zhang@...el.com>, rafael@...nel.org Cc: quic_manafm@...cinc.com, Amit Kucheria <amitk@...nel.org>, "open list:THERMAL" <linux-pm@...r.kernel.org>, open list <linux-kernel@...r.kernel.org> Subject: Re: [PATCH 3/3] thermal/core: Fix thermal trip cross point On 08/07/2022 05:56, Zhang Rui wrote: [ ... ] >> + if (tz->last_temperature < trip_temp && tz->temperature >= >> trip_temp && >> + trip != tz->prev_trip) { >> + thermal_notify_tz_trip_up(tz->id, trip, tz- >>> temperature); >> + tz->prev_trip = trip; >> + >> + } else if (tz->last_temperature >= trip_low_temp && tz- >>> temperature < trip_low_temp && >> + trip == tz->prev_trip) { >> + thermal_notify_tz_trip_down(tz->id, trip, tz- >>> temperature); >> + tz->prev_trip = trip - 1; > > Say, let's assume hysteresis is Zero, > When the temperature increases and we do thermal_notify_tz_trip_up() > for trip 0 and trip 1, tz->prev_trip is set to 1 in this case. > And then the temperature drops below trip 0, we don't have chance to do > thermal_notify_tz_trip_down() for trip 0, because we always handle the > trips in ascending order, and tz->prev_trip is 1 when we do > handle_thermal_trip(0). Well actually you are right, I reproduced the scenario with temperature emulation. I'll investigate how to handle this case. Thanks for spotting this <http://www.linaro.org/> Linaro.org │ Open source software for ARM SoCs Follow Linaro: <http://www.facebook.com/pages/Linaro> Facebook | <http://twitter.com/#!/linaroorg> Twitter | <http://www.linaro.org/linaro-blog/> Blog
Powered by blists - more mailing lists