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 <sb...@kernel.org> > >> > >> 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 <abelv...@kernel.org> > >> Cc: Alessandro Zummo <a.zu...@towertech.it> > >> Cc: Alexandre Belloni <alexandre.bell...@bootlin.com> > >> Cc: Alexandre Torgue <alexandre.tor...@foss.st.com> > >> Cc: "Andreas Färber" <afaer...@suse.de> > >> Cc: AngeloGioacchino Del Regno <angelogioacchino.delre...@collabora.com> > >> Cc: Baolin Wang <baolin.w...@linux.alibaba.com> > >> Cc: Charles Keepax <ckee...@opensource.cirrus.com> > >> Cc: Chen-Yu Tsai <w...@csie.org> > >> Cc: Chen-Yu Tsai <we...@chromium.org> > >> Cc: Chunyan Zhang <zhang.l...@gmail.com> > >> Cc: Claudiu Beznea <claudiu.bez...@microchip.com> > >> Cc: Daniel Vetter <dan...@ffwll.ch> > >> Cc: David Airlie <airl...@gmail.com> > >> Cc: David Lechner <da...@lechnology.com> > >> Cc: Dinh Nguyen <dingu...@kernel.org> > >> Cc: Fabio Estevam <feste...@gmail.com> > >> Cc: Geert Uytterhoeven <geert+rene...@glider.be> > >> Cc: Jaroslav Kysela <pe...@perex.cz> > >> Cc: Jernej Skrabec <jernej.skra...@gmail.com> > >> Cc: Jonathan Hunter <jonath...@nvidia.com> > >> Cc: Kishon Vijay Abraham I <kis...@kernel.org> > >> Cc: Liam Girdwood <lgirdw...@gmail.com> > >> Cc: Linus Walleij <linus.wall...@linaro.org> > >> Cc: Luca Ceresoli <luca.ceres...@bootlin.com> > >> Cc: Manivannan Sadhasivam <m...@kernel.org> > >> Cc: Mark Brown <broo...@kernel.org> > >> Cc: Markus Schneider-Pargmann <m...@baylibre.com> > >> Cc: Max Filippov <jcmvb...@gmail.com> > >> Cc: Maxime Coquelin <mcoquelin.st...@gmail.com> > >> Cc: Mikko Perttunen <mperttu...@nvidia.com> > >> Cc: Miles Chen <miles.c...@mediatek.com> > >> Cc: Nicolas Ferre <nicolas.fe...@microchip.com> > >> Cc: Orson Zhai <orsonz...@gmail.com> > >> Cc: Paul Cercueil <p...@crapouillou.net> > >> Cc: Peng Fan <peng....@nxp.com> > >> Cc: Peter De Schrijver <pdeschrij...@nvidia.com> > >> Cc: Prashant Gaikwad <pgaik...@nvidia.com> > >> Cc: Richard Fitzgerald <r...@opensource.cirrus.com> > >> Cc: Samuel Holland <sam...@sholland.org> > >> Cc: Sascha Hauer <s.ha...@pengutronix.de> > >> Cc: Sekhar Nori <nsek...@ti.com> > >> Cc: Shawn Guo <shawn...@kernel.org> > >> Cc: Takashi Iwai <ti...@suse.com> > >> Cc: Thierry Reding <thierry.red...@gmail.com> > >> Cc: Ulf Hansson <ulf.hans...@linaro.org> > >> Cc: Vinod Koul <vk...@kernel.org> > >> Cc: dri-devel@lists.freedesktop.org > >> Cc: linux-acti...@lists.infradead.org > >> Cc: linux-arm-ker...@lists.infradead.org > >> Cc: linux-m...@vger.kernel.org > >> Cc: linux-...@lists.infradead.org > >> Cc: linux-renesas-...@vger.kernel.org > >> Cc: linux-...@vger.kernel.org > >> Cc: linux-st...@st-md-mailman.stormreply.com > >> Cc: linux-su...@lists.linux.dev > >> Cc: linux-te...@vger.kernel.org > >> Cc: NXP Linux Team <linux-...@nxp.com> > >> Cc: patc...@opensource.cirrus.com > >> Cc: Pengutronix Kernel Team <ker...@pengutronix.de> > >> Signed-off-by: Stephen Boyd <sb...@kernel.org> > >> Signed-off-by: Maxime Ripard <max...@cerno.tech> > >> --- > > > > 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
signature.asc
Description: PGP signature