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
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <021bec8e-2cf7-99fb-d224-e16796b95567@linaro.org>
Date:   Wed, 15 Jul 2020 19:15:00 -0400
From:   Thara Gopinath <thara.gopinath@...aro.org>
To:     Zhang Rui <rui.zhang@...el.com>, daniel.lezcano@...aro.org,
        robh+dt@...nel.org
Cc:     linux-pm@...r.kernel.org, devicetree@...r.kernel.org,
        linux-kernel@...r.kernel.org
Subject: Re: [RFC PATCH 3/4] thermal:core:Add genetlink notifications for
 monitoring falling temperature



On 7/15/20 4:46 AM, Zhang Rui wrote:
> On Fri, 2020-07-10 at 09:51 -0400, Thara Gopinath wrote:
>> Add notification calls for trip type THERMAL_TRIP_COLD when
>> temperature
>> crosses the trip point in either direction.
>>
>> Signed-off-by: Thara Gopinath <thara.gopinath@...aro.org>
>> ---
>>   drivers/thermal/thermal_core.c | 21 +++++++++++++++------
>>   1 file changed, 15 insertions(+), 6 deletions(-)
>>
>> diff --git a/drivers/thermal/thermal_core.c
>> b/drivers/thermal/thermal_core.c
>> index 750a89f0c20a..e2302ca1cd3b 100644
>> --- a/drivers/thermal/thermal_core.c
>> +++ b/drivers/thermal/thermal_core.c
>> @@ -429,12 +429,21 @@ static void handle_thermal_trip(struct
>> thermal_zone_device *tz, int trip)
>>   		tz->ops->get_trip_hyst(tz, trip, &hyst);
>>   
>>   	if (tz->last_temperature != THERMAL_TEMP_INVALID) {
>> -		if (tz->last_temperature < trip_temp &&
>> -		    tz->temperature >= trip_temp)
>> -			thermal_notify_tz_trip_up(tz->id, trip);
>> -		if (tz->last_temperature >= trip_temp &&
>> -		    tz->temperature < (trip_temp - hyst))
>> -			thermal_notify_tz_trip_down(tz->id, trip);
>> +		if (type == THERMAL_TRIP_COLD) {
>> +			if (tz->last_temperature > trip_temp &&
>> +			    tz->temperature <= trip_temp)
>> +				thermal_notify_tz_trip_down(tz->id,
>> trip);
> 
> trip_type should also be part of the event because trip_down/trip_up
> for hot trip and cold trip have different meanings.
> Or can we use some more generic names like trip_on/trip_off? trip_on
> means the trip point is violated or actions need to be taken for the
> specific trip points, for both hot and cold trips. I know
> trip_on/trip_off doesn't represent what I mean clearly, but surely you
> can find a better name.

Makes sense.. I will fix this in the next version. I don't have a good 
name at the moment but will think of something!


-- 
Warm Regards
Thara

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ