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] [thread-next>] [day] [month] [year] [list]
Message-ID: <1308F9C6-F629-42BE-A72A-5BED01D1EDFB@icenowy.me>
Date:   Tue, 25 Jul 2023 12:01:58 +0800
From:   Icenowy Zheng <uwu@...nowy.me>
To:     Chen-Yu Tsai <wenst@...omium.org>,
        Daniel Lezcano <daniel.lezcano@...aro.org>
CC:     Mark Brown <broonie@...nel.org>,
        Icenowy Zheng <zhengxingda@...as.ac.cn>,
        Amit Kucheria <amitk@...nel.org>,
        Zhang Rui <rui.zhang@...el.com>, linux-pm@...r.kernel.org,
        linux-kernel@...r.kernel.org, linux-arm-kernel@...ts.infradead.org,
        linux-sunxi@...ts.linux.dev
Subject: Re: [PATCH RESEND RESEND] thermal/of: support thermal zones w/o trips subnode



于 2023年7月24日 GMT+08:00 12:25:02, Chen-Yu Tsai <wenst@...omium.org> 写到:
>On Sun, Jul 23, 2023 at 12:12:49PM +0200, Daniel Lezcano wrote:
>> 
>> Hi Mark,
>> 
>> On 22/07/2023 22:11, Mark Brown wrote:
>> > On Sat, Jul 22, 2023 at 08:25:34PM +0800, Icenowy Zheng wrote:
>> > > From: Icenowy Zheng <uwu@...nowy.me>
>> > > 
>> > > Although the current device tree binding of thermal zones require the
>> > > trips subnode, the binding in kernel v5.15 does not require it, and many
>> > > device trees shipped with the kernel, for example,
>> > > allwinner/sun50i-a64.dtsi and mediatek/mt8183-kukui.dtsi in ARM64, still
>> > > comply to the old binding and contain no trips subnode.
>> > > 
>> > > Allow the code to successfully register thermal zones w/o trips subnode
>> > > for DT binding compatibility now.
>> > > 
>> > > Furtherly, the inconsistency between DTs and bindings should be resolved
>> > > by either adding empty trips subnode or dropping the trips subnode
>> > > requirement.
>> > 
>> > This makes sense to me - it allows people to see the reported
>> > temperature even if there's no trips defined which seems more
>> > helpful than refusing to register.
>> 
>> The binding describes the trip points as required and that since the
>> beginning.
>
>Not really. It was made optional in the v5.15 kernel release by commit
>
>    22fc857538c3 dt-bindings: thermal: Make trips node optional

Yes, thanks for the clarification.

My understand of DT binding tells me that this means lacking of the trips node
must be handled, before we solve the inconsistency between current
DT binding and shipped DTs.

The latter problem could be discussed, but the former problem is a MUST
unless we're breaking the compatibility promise of DT bindings (and shipped DTs).

>
>> What changed is now the code reflects the required property while before it
>> was permissive, that was an oversight.
>> 
>> Just a reminder about the thermal framework goals:
>> 
>>   1. It protects the silicon (thus critical and hot trip points)
>> 
>>   2. It mitigates the temperature (thus cooling device bound to trip points)
>> 
>>   3. It notifies the userspace when a trip point is crossed
>> 
>> So if the thermal zone is described but without any of this goal above, it
>> is pointless.
>> 
>> If the goal is to report the temperature only, then hwmon should be used
>> instead.
>
>What about thermal sensors with multiple channels? Some of the channels
>are indeed tied to important hardware blocks like the CPU cores and
>should be tied into the thermal tripping. However other channels might
>only be used for temperature read-out and have no such requirement.
>
>Should we be mixing thermal and hwmon APIs in the driver?
>
>> If the goal is to mitigate by userspace, then the trip point *must* be used
>> to prevent the userspace polling the temperature. With the trip point the
>> sensor will be set to fire an interrupt at the given trip temperature.
>> 
>> IOW, trip points are not optional
>
>for measurement points that are used for thermal throttling /
>mitigation.
>
>ChenYu
>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ