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: <3abfc379-d353-6caf-0cf0-83559a460be6@linaro.org>
Date:   Fri, 25 Feb 2022 18:41:42 +0100
From:   Daniel Lezcano <daniel.lezcano@...aro.org>
To:     Benjamin Li <benl@...areup.com>
Cc:     Amit Kucheria <amitk@...nel.org>,
        Thara Gopinath <thara.gopinath@...aro.org>,
        Bjorn Andersson <bjorn.andersson@...aro.org>,
        Zac Crosby <zac@...areup.com>, Andy Gross <agross@...nel.org>,
        "Rafael J. Wysocki" <rafael@...nel.org>,
        Zhang Rui <rui.zhang@...el.com>, linux-arm-msm@...r.kernel.org,
        linux-pm@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v3] drivers: thermal: tsens: respect thermal_device_mode
 in threshold irq reporting

On 25/02/2022 17:46, Benjamin Li wrote:
> On Fri, Feb 25, 2022 at 6:02 AM Daniel Lezcano
> <daniel.lezcano@...aro.org> wrote:
>>> Some drivers that support thermal zone disabling implement a set_mode
>>> operation and simply disable the sensor or the relevant IRQ(s), so they
>>> actually don't log anything when zones are disabled. These drivers are
>>> imx_thermal.c, intel_quark_dts_thermal.c, and int3400_thermal.c.
>>>
>>> For tsens.c, implementing a change_mode would require migrating the driver
>>> from devm_thermal_zone_of_sensor_register to thermal_zone_device_register
>>> (or updating thermal_of.c to add a change_mode operation in thermal_zone_
>>> of_device_ops).
>>>
>>> stm_thermal.c seems to use this patch's model of not disabling IRQs when
>>> the zone is disabled (they still perform the thermal_zone_device_update
>>> upon IRQ, but return -EAGAIN from their get_temp).
>>
>> What is the concern by changing the core code to have a correct handling
>> of the disabled / enabled state in this driver ? (and by this way give
>> the opportunity to other drivers to fix their code)'
> 
> It seems fine, is that the preference? Updating thermal_of.c to add a
> change_mode
> operation in thermal_zone_of_device_ops?

I'm not a big fan of this duplicated ops structure but preferably it 
would be better to put it there (except if you see a better way to do it)



-- 
<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

Powered by Openwall GNU/*/Linux Powered by OpenVZ