Hi, On Tue, Jun 13, 2023 at 02:15:10PM +0200, Marek Szyprowski wrote: > On 13.06.2023 13:15, Marek Szyprowski wrote: > > On 05.05.2023 13:25, Maxime Ripard wrote: > >> From: Stephen Boyd > >> > >> We'll need to turn the code in clk_mux_determine_rate_flags() to deal > >> with CLK_SET_RATE_NO_REPARENT into a helper clock drivers will be able > >> to use if they don't want to allow reparenting. > >> > >> Cc: Abel Vesa > >> Cc: Alessandro Zummo > >> Cc: Alexandre Belloni > >> Cc: Alexandre Torgue > >> Cc: "Andreas Färber" > >> Cc: AngeloGioacchino Del Regno > >> Cc: Baolin Wang > >> Cc: Charles Keepax > >> Cc: Chen-Yu Tsai > >> Cc: Chen-Yu Tsai > >> Cc: Chunyan Zhang > >> Cc: Claudiu Beznea > >> Cc: Daniel Vetter > >> Cc: David Airlie > >> Cc: David Lechner > >> Cc: Dinh Nguyen > >> Cc: Fabio Estevam > >> Cc: Geert Uytterhoeven > >> Cc: Jaroslav Kysela > >> Cc: Jernej Skrabec > >> Cc: Jonathan Hunter > >> Cc: Kishon Vijay Abraham I > >> Cc: Liam Girdwood > >> Cc: Linus Walleij > >> Cc: Luca Ceresoli > >> Cc: Manivannan Sadhasivam > >> Cc: Mark Brown > >> Cc: Markus Schneider-Pargmann > >> Cc: Max Filippov > >> Cc: Maxime Coquelin > >> Cc: Mikko Perttunen > >> Cc: Miles Chen > >> Cc: Nicolas Ferre > >> Cc: Orson Zhai > >> Cc: Paul Cercueil > >> Cc: Peng Fan > >> Cc: Peter De Schrijver > >> Cc: Prashant Gaikwad > >> Cc: Richard Fitzgerald > >> Cc: Samuel Holland > >> Cc: Sascha Hauer > >> Cc: Sekhar Nori > >> Cc: Shawn Guo > >> Cc: Takashi Iwai > >> Cc: Thierry Reding > >> Cc: Ulf Hansson > >> Cc: Vinod Koul > >> Cc: dri-devel@lists.freedesktop.org > >> Cc: linux-actions@lists.infradead.org > >> Cc: linux-arm-kernel@lists.infradead.org > >> Cc: linux-mips@vger.kernel.org > >> Cc: linux-phy@lists.infradead.org > >> Cc: linux-renesas-soc@vger.kernel.org > >> Cc: linux-rtc@vger.kernel.org > >> Cc: linux-stm32@st-md-mailman.stormreply.com > >> Cc: linux-sunxi@lists.linux.dev > >> Cc: linux-tegra@vger.kernel.org > >> Cc: NXP Linux Team > >> Cc: patches@opensource.cirrus.com > >> Cc: Pengutronix Kernel Team > >> Signed-off-by: Stephen Boyd > >> Signed-off-by: Maxime Ripard > >> --- > > > > This patch landed in today's linux-next as commit 1b4e99fda73f ("clk: > > Move no reparent case into a separate function"). Unfortunately it > > causes serious regression of some of my test boards. Namely Exynos3250 > > based boards are so slow after it, that my test scripts fail with a > > timeout waiting for them to finish booting. I will try to debug this > > later in the evening to check what has happened that some clocks got > > very low rate. > > > I just got a few spare minutes, so I decided to take a look into this > issue. The following change fixed my problem: > > diff --git a/drivers/clk/clk.c b/drivers/clk/clk.c > index ffc9f03840b7..7ac9f7a8cb84 100644 > --- a/drivers/clk/clk.c > +++ b/drivers/clk/clk.c > @@ -629,6 +629,7 @@ clk_core_determine_rate_no_reparent(struct clk_hw *hw, >                 best = clk_core_get_rate_nolock(core); >         } > > +       req->best_parent_rate = best; >         req->rate = best; > >         return 0; > > best_parent_rate is still being used somewhere in the code and needs to > be updated regardless of the CLK_SET_RATE_NO_REPARENT flag. Yeah, that makes sense, could you send a patch? Thanks for figuring it out! Maxime