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: <4e3b7661-7233-4142-a785-406ec384d90a@arm.com>
Date:   Tue, 21 Nov 2023 21:09:21 +0000
From:   Lukasz Luba <lukasz.luba@....com>
To:     Mateusz Majewski <m.majewski2@...sung.com>
Cc:     Bartlomiej Zolnierkiewicz <bzolnier@...il.com>,
        linux-samsung-soc@...r.kernel.org, linux-pm@...r.kernel.org,
        Krzysztof Kozlowski <krzysztof.kozlowski@...aro.org>,
        "Rafael J. Wysocki" <rafael@...nel.org>,
        Daniel Lezcano <daniel.lezcano@...aro.org>,
        Amit Kucheria <amitk@...nel.org>,
        Zhang Rui <rui.zhang@...el.com>,
        Alim Akhtar <alim.akhtar@...sung.com>,
        Liam Girdwood <lgirdwood@...il.com>,
        Mark Brown <broonie@...nel.org>,
        Marek Szyprowski <m.szyprowski@...sung.com>,
        linux-kernel@...r.kernel.org, linux-arm-kernel@...ts.infradead.org
Subject: Re: [PATCH v5 9/9] thermal: exynos: use set_trips



On 11/20/23 14:50, Mateusz Majewski wrote:
> Currently, each trip point defined in the device tree corresponds to a
> single hardware interrupt. This commit instead switches to using two
> hardware interrupts, whose values are set dynamically using the
> set_trips callback. Additionally, the critical temperature threshold is
> handled specifically.
> 
> Setting interrupts in this way also fixes a long-standing lockdep
> warning, which was caused by calling thermal_zone_get_trips with our
> lock being held. Do note that this requires TMU initialization to be
> split into two parts, as done by the parent commit: parts of the
> initialization call into the thermal_zone_device structure and so must
> be done after its registration, but the initialization is also
> responsible for setting up calibration, which must be done before
> thermal_zone_device registration, which will call set_trips for the
> first time; if the calibration is not done in time, the interrupt values
> will be silently wrong!
> 
> Signed-off-by: Mateusz Majewski <m.majewski2@...sung.com>
> ---
> v4 -> v5: Simplified Exynos 7 code, used the correct register offsets
>    for Exynos 7 and refactored some common register-setting code.
> v2 -> v3: Fixed formatting of some comments.
> v1 -> v2: We take clocks into account; anything that sets temperature
>    thresholds needs clk.
> 
>   drivers/thermal/samsung/exynos_tmu.c | 393 ++++++++++++++-------------
>   1 file changed, 209 insertions(+), 184 deletions(-)

The code LGTM and I like the idea of dynamically configured IRQs for
trips.

Reviewed-by: Lukasz Luba <lukasz.luba@....com>

Regards,
Lukasz

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ