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=1796378365; b=M4l9IYsoVEpXnxHL4ktQYC9oBbbIv8KW2nW0YZMaGUFhyJ/iw5/8L2Od9KASo3Zx/jG+ NIFMhmZQKZjKKoE0OQZiCd5afZL9BcXHBKt12SIer23xVELPmVV02kfKFmNMPeBRKQwaB Q+klDBk9tMlLvIONhwfoDW3zXiGJokeI7gWNNCivMMP796FK0GGTquqfhbfY5DNNNloWV jqxYqofC99JBsu6JewzsTpGyMAFRBphaxPJ2WHlQU6nr6ObJj8Kyary2ri2bFzNUQfYpt Kf6htcciz2+EFd9XlfX1EALAcVNxyZcZnHdP2PXNYHlDiaRTZkDnF/RbxgLN6JbN1gQ== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796378365; h=Received:DKIM-Signature:Message-ID:From:Subject:Reply-To:To:Cc: In-Reply-To:References:Content-Type:Content-Transfer-Encoding:Date; bh=QFbkkbcdcigWdDQsCwPZrGMzG76V6qWAFunjSffjgys=; b=j9XopUcRayCvuQ/kh+Bz3hsAdfm3bqUij/OM7GkRz1hbmypcL1OfSx3pDLytDXSL0lih 3mJB2oLIzH7syBVJf9GUV/rcDxssoITbgY0sTXyWypCMidDITuHTAvdmRZO+18NvpO8lF VXs+RB76pYA1+tRXtRNt9yh1WaWHaRR4AMuCOb7J347Ey7riEP3IatB042va7OPR9Bvqx HmFbfaXXCoPjoA8WXdCwVF1I1M8tmdJ2STAecSZRbCK2OJuqWmsqLuvo7WHY1iclnItH8 +YTV8M7ms2BBkzqAEhJ04AdJ1pL4Rda0AUOfgNFxQqN42BH+4I5epxTQkaLDRpTkOsA== 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=kFIRxpsK; 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 0F4CF606A322 for ; Fri, 4 Dec 2026 09:59:24 +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=kFIRxpsK Received: by smtp.kernel.org (Postfix) with ESMTPSA id 769F11F000CE; Fri, 4 Dec 2026 09:59:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1796378364; bh=QFbkkbcdcigWdDQsCwPZrGMzG76V6qWAFunjSffjgys=; h=From:Subject:Reply-To:To:Cc:In-Reply-To:References:Date; b=kFIRxpsKiT23iiGpW/e949x77+pXixw9F58o2WuJuw4pQjC4C3T7UZs4Vm1Cl2lpY HORfMvMAglSlgp8pnraYOhmbp4IRlSQ19/1plz1Jyie5NHCrqyaZYmQ/QQlCBFDBUi mPENs4pDMDy5E2qqT5VpQDuxgaX8aY+3AsvBs3c0yuRBmdafjsqYuW2hxneEeO4ol+ 6CiZePoOOqEvlDXMQDEw5jmQA+Q3stWdFurBIzmJl1f7fXC05fanuchM/IBSIJhKFD baTHudzYKV4FhTAOtTeQsTh+qIO5wref7xJL5VX7TlMj0y1eL/KQIe2j3i3ohnCTBV 1ckMGkHu8JWxQ== Message-ID: From: sashiko-bot@kernel.org Subject: Re: [PATCH v2 2/2] clk: renesas: rzg2l-cpg: Skip resets and MSTOP restore on s2idle resume Reply-To: sashiko-reviews@lists.linux.dev To: "Claudiu Beznea" Cc: linux-clk@vger.kernel.org, wsa+renesas@sang-engineering.com In-Reply-To: <20261204094532.1052522-3-claudiu.beznea@kernel.org> References: <20261204094532.1052522-1-claudiu.beznea@kernel.org> <20261204094532.1052522-3-claudiu.beznea@kernel.org> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Date: Fri, 04 Dec 2026 09:59:24 +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 2 potential issues to consider: - [High] clk: renesas: rzg2l_cpg_resume() skips restore on RISC-V SBI suspend-to-RAM - [Medium] clk: renesas: rzg2l_cpg_resume() disables hibernation restore_noirq -- commit 125f430fe29577ed1821b9bcbe0dc9f5cab8e351 Author: Claudiu Beznea clk: renesas: rzg2l-cpg: Skip resets and MSTOP restore on s2idle resume This commit returns early from rzg2l_cpg_resume() when pm_suspend_via_firmware() is false, skipping reset de-assertion and MSTOP re-initialization. > diff --git a/drivers/clk/renesas/rzg2l-cpg.c b/drivers/clk/renesas/rzg2l-= cpg.c > index 5b255d8a7a6f3..07ff6282622b5 100644 > --- a/drivers/clk/renesas/rzg2l-cpg.c > +++ b/drivers/clk/renesas/rzg2l-cpg.c [ ... ] > @@ -2699,6 +2700,9 @@ static int rzg2l_cpg_resume(struct device *dev) > struct rzg2l_cpg_priv *priv =3D dev_get_drvdata(dev); > int ret; > =20 > + if (!pm_suspend_via_firmware()) > + return 0; > + > ret =3D rzg2l_cpg_deassert_crit_resets(&priv->rcdev, priv->info); > if (ret) > return ret; [Severity: High] Does this skip CPG restore on RISC-V SBI suspend-to-RAM? In arch/riscv/kernel/suspend.c, sbi_system_suspend_ops has no .begin callback and never calls pm_set_suspend_via_firmware(), so pm_suspend_via_firmware() always returns false on RISC-V. On RZ/Five (r9a07g043), resuming from SBI suspend-to-RAM skips rzg2l_cpg_deassert_crit_resets() and rzg2l_mod_enable_crit_clock_init_mstop(), leaving the DMAC resets asserted, module clocks disabled, and MSTOP state out of sync. Checking pm_suspend_no_platform(), which suspend_devices_and_enter() sets specifically for PM_SUSPEND_TO_IDLE, would target s2idle without breaking RISC-V suspend-to-RAM. [Severity: Medium] Will this also disable hibernation restore? NOIRQ_SYSTEM_SLEEP_PM_OPS() wires rzg2l_cpg_resume() to .restore_noirq as well. During hibernation, hibernation_snapshot() clears the suspend flags and DT platforms register no platform_hibernation_ops, so pm_suspend_via_firmware() is false during dpm_resume_start(PMSG_RESTORE). With CONFIG_HIBERNATION=3Dy and CONFIG_SUSPEND=3Dn, pm_suspend_via_firmware= () is also stubbed to return false, making .restore_noirq a permanent no-op and leaving boot-kernel reset, clock, and MSTOP states unreconciled with the restored image. Using pm_suspend_no_platform(), or separating .resume_noirq and .restore_noirq in rzg2l_cpg_pm_ops, would preserve hibernation restore. --=20 Sashiko AI review =C2=B7 https://sashiko.dev/#/patchset/20261204094532.1052= 522-1-claudiu.beznea@kernel.org?part=3D2