From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=100.103.45.18 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796525949; b=teOv72ro0D8pejWmeHzT4tyQmxKPuShOa5a9w3AtkuPrnKrxjOxTnKUxs9oQs3Ocxt0X CPtBv2BdjhQCq3//nIhi+zeI96sU3nbUOSspYdrhxcC/BfZbe+EYzcRF81Bz0NFnmseIg PWpLcDTGBM31qcZfAHZCpyERlV4jpItqpmZrLcNCrlPQakVOlJhaESQn8ytGpWrN11wxg slKsHs2orV7NqsjTWNRR7DtB8o3T+cDYbjrAHabwLzZ74cm0F8Xn0ZUxI7DCQHtSbdAxP xEYQToyDuUUJK6Dyid038advef2gfbcWDB4ziu9vcvRdbzhaxtN05QMSb167LHufmOQ== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796525949; h=Received:DKIM-Signature:Message-ID:From:Subject:Reply-To:To:Cc: In-Reply-To:References:Content-Type:Content-Transfer-Encoding:Date; bh=JONwmY8udmNMFGYO3VDRjZXRF/4YSMn31lRu/ejk0uM=; b=bL29wf1vJ3aZTtclFCOVli8kkv0jCVLKA1g4+yDX+RFdB6mJgXiM6qwsVh9PDsBahSeA QG/LG9sMopt8N+JephN9TtNyi+vWTPDxmvC+XWqebim1vnE64H5mrtmfIcoj1r+qIBs9q Cqk0hvCiw4cLk6V+vzfJF7zs5rfO8jn1LjkSCu5g7dQ2slZyCRGv5UDW+1UBW0ORfDaSa v0fleQwRwOCMNcnC10EI1Q9TWLLKJ3AFE3nr4gpaR/42tyqIyHBzOflYabMFSRpVE6z3t iOoZfm0OAubt/yP6D4x+hx30w/DSLKIdsSU0xOhNIj7aon1OkDw+vc70xh734WrbOcQ== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=l7d0LILa; arc=none smtp.remote-ip=100.103.45.18 Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 2BD4E606A321 for ; Sun, 6 Dec 2026 02:59:08 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=l7d0LILa Received: by smtp.kernel.org (Postfix) with ESMTPSA id 9D8C81F0092B; Sun, 6 Dec 2026 02:59:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1796525948; bh=JONwmY8udmNMFGYO3VDRjZXRF/4YSMn31lRu/ejk0uM=; h=From:Subject:Reply-To:To:Cc:In-Reply-To:References:Date; b=l7d0LILa0VwKWa8Vc+xzXJhHm9W+1KSF7cUy4hYEylTHNuxQxNvFMeDl2PU2ata8V JMpDtLsQAYxndEIApuSwVuFY91fTYk75f2iOw/aD/xqlCh3O/3NUQ5VeLPCWpykUzJ pq3v19ZuWLD4NS5IIYZdH8qDboQOOIrTf7eGEk2Dhys0IwtOMAP77RzGAKsd33Xtzc 9NoQRJkVqf6iwgMncYuqefzo/LM/euDBB41m64zeBdGPswezGQeRG/lUyoeMI05eKn mp88Pps2YNj8w4pHXdhfjcxDHg6K7q0JT6wuhptoeJbZePUZ0WObtxR5rsYakCVqPP R4bsPQ/0Nnfig== Message-ID: From: sashiko-bot@kernel.org Subject: Re: [PATCH RFC 2/2] clk: samsung: acpm: recalculate parent chain rates on Exynos850 Reply-To: sashiko-reviews@lists.linux.dev To: "Alexey Klimov" Cc: linux-clk@vger.kernel.org In-Reply-To: <20261206-e850_acpm_clks_unstale-v1-2-3eda94959b0b@linaro.org> References: <20261206-e850_acpm_clks_unstale-v1-0-3eda94959b0b@linaro.org> <20261206-e850_acpm_clks_unstale-v1-2-3eda94959b0b@linaro.org> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Date: Sun, 06 Dec 2026 02:59:08 +0000 X-Mailing-List: linux-clk@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list Thank you for your contribution! Sashiko AI review found 1 potential issue to consider: - [Medium] clk: samsung: CLK_GET_RATE_RECALC_ANCESTORS ignores mux switches on Exynos850 -- commit 72f8fd076942edb559374323ade796c613446bde Author: Alexey Klimov clk: samsung: acpm: recalculate parent chain rates on Exynos850 This commit switches Exynos850 ACPM clocks from CLK_GET_RATE_NOCACHE to CLK_GET_RATE_RECALC_ANCESTORS so the clock framework recalculates parent rates when an ACPM clock rate is queried or set. > diff --git a/drivers/clk/samsung/clk-acpm.c b/drivers/clk/samsung/clk-acp= m.c > index d5f1e73e05f8b..2a9a164946b40 100644 > --- a/drivers/clk/samsung/clk-acpm.c > +++ b/drivers/clk/samsung/clk-acpm.c > @@ -128,12 +128,16 @@ static int acpm_clk_register(struct device *dev, st= ruct acpm_clk *aclk, > init.ops =3D &acpm_clk_ops; > aclk->hw.init =3D &init; > =20 > - /* If get_rate is set, the SoC relies on parent topology */ > + /* > + * If get_rate is set, the SoC relies on parent topology. The firmware > + * and the hardware can change the rates of the parent chain behind the > + * clock framework's back, so re-read the whole chain on every request. > + */ > if (drv_data->get_rate) { > pdata.fw_name =3D name; > init.parent_data =3D &pdata; > init.num_parents =3D 1; > - init.flags =3D CLK_GET_RATE_NOCACHE; > + init.flags =3D CLK_GET_RATE_RECALC_ANCESTORS; > } [Severity: Medium] Does CLK_GET_RATE_RECALC_ANCESTORS actually handle mux switches on Exynos850? clk_core_recalc_ancestors() only walks cached core->parent links and calls clk_recalc(), never ops->get_parent(). Samsung CMU muxes use clk_mux_ops with no recalc_rate callback, so mux registers are never re-read (as noted in commit "clk: add CLK_GET_RATE_RECALC_ANCESTORS flag"). On Exynos850, DVFS domains without dedicated PLLs such as int (CMU_CORE) rely on CMU_TOP muxes selecting among shared PLL dividers. When ACPM firmware switches such a mux, clk_get_rate() still returns the stale rate from the cached parent and clk_set_rate() can drop a request for that rate. The commit message also states that mux registers are re-read, which does not match clk_core_recalc_ancestors(). Either clk_core_recalc_ancestors() needs to re-read mux parents via get_parent(), or the commit message should reflect that mux switches are not detected. --=20 Sashiko AI review =C2=B7 https://sashiko.dev/#/patchset/20261206-e850_acpm_= clks_unstale-v1-0-3eda94959b0b@linaro.org?part=3D2