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: <a755bf7d32d2482a6318fab614f669f3.sboyd@kernel.org>
Date: Sun, 07 Apr 2024 19:45:01 -0700
From: Stephen Boyd <sboyd@...nel.org>
To: Albert Ou <aou@...s.berkeley.edu>, Andy Shevchenko <andy.shevchenko@...il.com>, Conor Dooley <conor.dooley@...rochip.com>, Emil Renner Berthing <kernel@...il.dk>, Geert Uytterhoeven <geert@...ux-m68k.org>, Hal Feng <hal.feng@...rfivetech.com>, Krzysztof Kozlowski <krzysztof.kozlowski@...aro.org>, Michael Turquette <mturquette@...libre.com>, Palmer Dabbelt <palmer@...belt.com>, Paul Walmsley <paul.walmsley@...ive.com>
Cc: linux-clk@...r.kernel.org, linux-riscv@...ts.infradead.org, linux-kernel@...r.kernel.org, Geert Uytterhoeven <geert@...ux-m68k.org>, Samuel Holland <samuel.holland@...ive.com>
Subject: Re: [PATCH v3] clk: starfive: jh7100: Use clk_hw for external input clocks

Quoting Geert Uytterhoeven (2024-03-29 05:16:58)
> The Starfive JH7100 clock driver does not use the DT "clocks" property
> to find the external main input clock, but instead relies on the name of
> the actual clock provider ("osc_sys").  This is fragile, and caused
> breakage when sanitizing clock node names in DTS.
> 
> Fix this by obtaining the external main input clock using
> devm_clk_get(), and passing the returned clk_hw object to
> devm_clk_hw_register_fixed_factor_parent_hw().
> 
> While name-based look-up of the other external input clocks works as-is,
> convert them to a similar clk_hw-based scheme to increase uniformity,
> and to decrease the number of (multiple identical) name-based look-ups.

Why can't we use index based lookups and clk_parent_data? We don't want
clk providers to call clk consumer APIs.

> 
> Fixes: f03606470886 ("riscv: dts: starfive: replace underscores in node names")
> Fixes: 4210be668a09ee20 ("clk: starfive: Add JH7100 clock generator driver")
> Signed-off-by: Geert Uytterhoeven <geert@...ux-m68k.org>
> Reviewed-by: Samuel Holland <samuel.holland@...ive.com>
> ---
> After this is applied, the workaround in commit 7921e231f85a349d
> ("riscv: dts: starfive: jh7100: fix root clock names") can be reverted.
>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ