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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID:
 <TY3PR01MB113463088F7A3A9F08588056F8693A@TY3PR01MB11346.jpnprd01.prod.outlook.com>
Date: Mon, 26 Jan 2026 13:06:10 +0000
From: Biju Das <biju.das.jz@...renesas.com>
To: Biju Das <biju.das.jz@...renesas.com>, Claudiu.Beznea
	<claudiu.beznea@...on.dev>, "vkoul@...nel.org" <vkoul@...nel.org>, Prabhakar
 Mahadev Lad <prabhakar.mahadev-lad.rj@...renesas.com>, "lgirdwood@...il.com"
	<lgirdwood@...il.com>, "broonie@...nel.org" <broonie@...nel.org>,
	"perex@...ex.cz" <perex@...ex.cz>, "tiwai@...e.com" <tiwai@...e.com>,
	"p.zabel@...gutronix.de" <p.zabel@...gutronix.de>, "geert+renesas@...der.be"
	<geert+renesas@...der.be>, Fabrizio Castro <fabrizio.castro.jz@...esas.com>
CC: "dmaengine@...r.kernel.org" <dmaengine@...r.kernel.org>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	"linux-sound@...r.kernel.org" <linux-sound@...r.kernel.org>,
	"linux-renesas-soc@...r.kernel.org" <linux-renesas-soc@...r.kernel.org>,
	Claudiu Beznea <claudiu.beznea.uj@...renesas.com>
Subject: RE: [PATCH 5/7] dmaengine: sh: rz-dmac: Add suspend to RAM support



> -----Original Message-----
> From: Biju Das <biju.das.jz@...renesas.com>
> Sent: 26 January 2026 12:51
> To: Claudiu.Beznea <claudiu.beznea@...on.dev>; vkoul@...nel.org; Prabhakar Mahadev Lad
> <prabhakar.mahadev-lad.rj@...renesas.com>; lgirdwood@...il.com; broonie@...nel.org; perex@...ex.cz;
> tiwai@...e.com; p.zabel@...gutronix.de; geert+renesas@...der.be; Fabrizio Castro
> <fabrizio.castro.jz@...esas.com>
> Cc: dmaengine@...r.kernel.org; linux-kernel@...r.kernel.org; linux-sound@...r.kernel.org; linux-
> renesas-soc@...r.kernel.org; Claudiu Beznea <claudiu.beznea.uj@...renesas.com>
> Subject: RE: [PATCH 5/7] dmaengine: sh: rz-dmac: Add suspend to RAM support
> 
> Hi Claudiu,
> 
> 
> > -----Original Message-----
> > From: Claudiu Beznea <claudiu.beznea@...on.dev>
> > Sent: 26 January 2026 12:39
> > Subject: Re: [PATCH 5/7] dmaengine: sh: rz-dmac: Add suspend to RAM
> > support
> >
> >
> >
> > On 1/26/26 14:10, Biju Das wrote:
> > >
> > >
> > >> -----Original Message-----
> > >> From: Claudiu Beznea <claudiu.beznea@...on.dev>
> > >> Sent: 26 January 2026 12:05
> > >> To: Biju Das <biju.das.jz@...renesas.com>; vkoul@...nel.org;
> > >> Prabhakar Mahadev Lad <prabhakar.mahadev- lad.rj@...renesas.com>;
> > >> lgirdwood@...il.com; broonie@...nel.org; perex@...ex.cz;
> > >> tiwai@...e.com; p.zabel@...gutronix.de; geert+renesas@...der.be;
> > >> Fabrizio Castro <fabrizio.castro.jz@...esas.com>
> > >> Cc: dmaengine@...r.kernel.org; linux-kernel@...r.kernel.org;
> > >> linux-sound@...r.kernel.org; linux- renesas-soc@...r.kernel.org;
> > >> Claudiu Beznea <claudiu.beznea.uj@...renesas.com>
> > >> Subject: Re: [PATCH 5/7] dmaengine: sh: rz-dmac: Add suspend to RAM
> > >> support
> > >>
> > >> Hi,
> > >>
> > >> On 1/26/26 13:03, Biju Das wrote:
> > >>> Hi Claudiu,
> > >>>
> > >>> Thanks for the patch.
> > >>>
> > >>>> -----Original Message-----
> > >>>> From: Claudiu <claudiu.beznea@...on.dev>
> > >>>> Sent: 26 January 2026 10:32
> > >>>> Subject: [PATCH 5/7] dmaengine: sh: rz-dmac: Add suspend to RAM
> > >>>> support
> > >>>>
> > >>>> From: Claudiu Beznea <claudiu.beznea.uj@...renesas.com>
> > >>>>
> > >>>> The Renesas RZ/G3S SoC supports a power saving mode in which
> > >>>> power to most SoC components is turned off, including the DMA IP.
> > >>>> Add suspend to RAM support to save and
> > >> restore the DMA IP registers.
> > >>>>
> > >>>> Cyclic DMA channels require special handling. Since they can be
> > >>>> paused and resumed during system suspend and resume, the driver
> > >>>> restores additional registers for these channels during the
> > >>>> resume phase. If a channel was not explicitly paused during
> > >>>> suspend, the driver ensures that it is paused and resumed as part
> > >>>> of the system suspend/resume flow. This might
> > >> be the case of a serial device being used with no_console_suspend.
> > >>>>
> > >>>> For non-cyclic channels, the dev_pm_ops::prepare callback waits
> > >>>> for all ongoing transfers to complete before allowing suspend-to-RAM to proceed.
> > >>>>
> > >>>> Signed-off-by: Claudiu Beznea <claudiu.beznea.uj@...renesas.com>
> > >>>> ---
> > >>>>    drivers/dma/sh/rz-dmac.c | 183 +++++++++++++++++++++++++++++++++++++--
> > >>>>    1 file changed, 175 insertions(+), 8 deletions(-)
> > >>>>
> > >>>> diff --git a/drivers/dma/sh/rz-dmac.c b/drivers/dma/sh/rz-dmac.c
> > >>>> index ab5f49a0b9f2..8f3e2719e639
> > >>>> +
> > >>>> +	pm_runtime_put_sync(dmac->dev);
> > >>>> +
> > >>>> +	ret = reset_control_assert(dmac->rstc);
> > >>>> +	if (ret) {
> > >>>> +		pm_runtime_resume_and_get(dmac->dev);
> > >>>> +		rz_dmac_suspend_recover(dmac);
> > >>>> +	}
> > >>>> +
> > >>>
> > >>>
> > >>> This patch breaks, s2idle in RZ/G3L as it turns off DMA ACLK and
> > >>> IRQ's are not routed to CPU for wakeup.
> > >>
> > >> Is this particular patch the one that explicitly breaks it? Is
> > >> there any mainline PM support available for RZ/G3L? Can it be fixed
> > >> along with the RZ/G3L support, if any, as I don't have the board to test it?
> > >
> > > Maybe your TF-A is enabling DMAACLK during resume. Can you check
> > > that mean time, I will check what you have mentioned Here?
> > >
> >
> > You used "freeze" in your example. Same did I to check your usecase.
> > That suspend type don't involve TF-A (unless something changes and I'm not aware of).
> >
> 
> Looks like reset assert in suspend() is the issue, not the clk.
> 
> echo N > /sys/module/printk/parameters/console_suspend
> root@...rc-rzg3l:~# echo 7 > /proc/sys/kernel/printk root@...rc-rzg3l:~# root@...rc-rzg3l:~#
> root@...rc-rzg3l:~# echo mem > /sys/power/state
> [   57.103165] PM: suspend entry (deep)
> [   57.106929] Filesystems sync: 0.000 seconds
> [   57.112372] Freezing user space processes
> [   57.114782] Freezing user space processes completed (elapsed 0.002 seconds)
> [   57.123730] OOM killer disabled.
> [   57.126964] Freezing remaining freezable tasks
> [   57.132691] Freezing remaining freezable tasks completed (elapsed 0.001 seconds)
> [   57.141140] renesas-gbeth 11c30000.ethernet end0: Link is Down
> [   57.148638] rzg2l_cpg_pm_suspend(): CLK_ON 0x514/gic_gicclk 1
> [   57.154428] rzg2l_cpg_pm_suspend(): CLK_ON 0x518/ia55_clk 2
> [   57.160032] rzg2l_cpg_pm_suspend(): CLK_ON 0x518/ia55_pclk 2
> [   57.165687] rzg2l_cpg_pm_suspend(): CLK_ON 0x52c/dmac_aclk 1
> [   57.171339] rzg2l_cpg_pm_suspend(): CLK_ON 0x52c/dmac_pclk 1
> [   57.177000] rzg2l_cpg_pm_suspend(): CLK_ON 0x57c/eth0_clk_axi 30c0
> [   57.183174] rzg2l_cpg_pm_suspend(): CLK_ON 0x57c/eth0_clk_chi 30c0
> [   57.189347] rzg2l_cpg_pm_suspend(): CLK_ON 0x57c/eth0_tx_i 30c0
> [   57.195258] rzg2l_cpg_pm_suspend(): CLK_ON 0x57c/eth0_rx_i 30c0
> [   57.201169] rzg2l_cpg_pm_suspend(): CLK_ON 0x57c/eth0_tx_180_i 30c0
> [   57.207426] rzg2l_cpg_pm_suspend(): CLK_ON 0x57c/eth0_rx_180_i 30c0
> [   57.213684] rzg2l_cpg_pm_suspend(): CLK_ON 0x57c/eth0_rmii_i 30c0
> [   57.219774] rzg2l_cpg_pm_suspend(): CLK_ON 0x57c/eth0_ptp_ref_i 30c0
> [   57.226120] rzg2l_cpg_pm_suspend(): CLK_ON 0x57c/eth1_clk_axi 30c0
> [   57.232290] rzg2l_cpg_pm_suspend(): CLK_ON 0x57c/eth1_clk_chi 30c0
> [   57.238459] rzg2l_cpg_pm_suspend(): CLK_ON 0x57c/eth1_tx_i 30c0
> [   57.244369] rzg2l_cpg_pm_suspend(): CLK_ON 0x57c/eth1_rx_i 30c0
> [   57.250279] rzg2l_cpg_pm_suspend(): CLK_ON 0x57c/eth1_tx_180_i 30c0
> [   57.256540] rzg2l_cpg_pm_suspend(): CLK_ON 0x57c/eth1_rx_180_i 30c0
> [   57.262798] rzg2l_cpg_pm_suspend(): CLK_ON 0x57c/eth1_rmii_i 30c0
> [   57.268884] rzg2l_cpg_pm_suspend(): CLK_ON 0x57c/eth1_ptp_ref_i 30c0
> [   57.275229] rzg2l_cpg_pm_suspend(): CLK_ON 0x584/scif0_clk_pck 1
> [   57.281228] rzg2l_cpg_pm_suspend(): CLK_ON 0x598/gpio_hclk 1
> [   57.286997] Disabling non-boot CPUs ...
> [   57.292890] psci: CPU3 killed (polled 0 ms)
> [   57.300567] psci: CPU2 killed (polled 0 ms)
> [   57.308116] psci: CPU1 killed (polled 0 ms)
> NOTICE:  BL2: v2.10.5(release):2.10.5/rzg3l_1.0.0
> NOTICE:  BL2: Built : 08:36:10, Jan 20 2026
> INFO:    BL2: Doing platform setup
> INFO:    Configuring TrustZone Controller
> INFO:    Total 3 regions set.
> INFO:    Configuring TrustZone Controller
> INFO:    Total 1 regions set.
> INFO:    Configuring TrustZone Controller
> INFO:    Total 1 regions set.
> INFO:    eMMC boot from partition 1
> INFO:    Loading image id=39 at address 0x44428
> INFO:    emmcdrv_block_len: len: 0x00001000
> INFO:    Load dst=0x44428 src=(p:1)0x260000(4864) len=0x1000(8)
> INFO:    Image id=39 loaded: 0x44428 - 0x45428
> INFO:    DDR: Retention Exit (Rev. 02.05)
> NOTICE:  BL2: SYS_LSI_MODE: 0x12051
> NOTICE:  BL2: SYS_LSI_DEVID: 0x87d9447
> INFO:    BL2: Skip loading image id 3
> INFO:    BL2: Skip loading image id 5
> NOTICE:  BL2: Booting BL31
> INFO:    Entry point address = 0x44000000
> INFO:    SPSR = 0x3cd
> INFO:    GICv3 without legacy support detected.
> INFO:    ARM GICv3 driver initialized in EL3
> [   57.313836] Enabling non-boot CPUs ...
> [   57.319883] Detected VIPT I-cache on CPU1
> [   57.319942] GICv3: CPU1: found redistributor 100 region 0:0x0000000012460000
> [   57.319992] CPU1: Booted secondary processor 0x0000000100 [0x412fd050]
> [   57.320755] CPU1 is up
> [   57.341066] Detected VIPT I-cache on CPU2
> [   57.341112] GICv3: CPU2: found redistributor 200 region 0:0x0000000012480000
> [   57.341151] CPU2: Booted secondary processor 0x0000000200 [0x412fd050]
> [   57.341886] CPU2 is up
> [   57.362133] Detected VIPT I-cache on CPU3
> [   57.362177] GICv3: CPU3: found redistributor 300 region 0:0x00000000124a0000
> [   57.362213] CPU3: Booted secondary processor 0x0000000300 [0x412fd050]
> [   57.362975] CPU3 is up
> [   57.383339] rzg2l_mod_clock_init_mstop(): CLK_ON 0x514/gic_gicclk 1
> [   57.389666] rzg2l_mod_clock_init_mstop(): CLK_ON 0x518/ia55_clk 3
> [   57.395803] rzg2l_mod_clock_init_mstop(): CLK_ON 0x518/ia55_pclk 3
> [   57.402038] rzg2l_mod_clock_init_mstop(): CLK_ON 0x57c/eth0_clk_axi 3fff
> [   57.408784] rzg2l_mod_clock_init_mstop(): CLK_ON 0x57c/eth0_clk_chi 3fff
> [   57.415544] rzg2l_mod_clock_init_mstop(): CLK_ON 0x57c/eth0_rmii_i 3fff
> [   57.422217] rzg2l_mod_clock_init_mstop(): CLK_ON 0x57c/eth0_ptp_ref_i 3fff
> [   57.429143] rzg2l_mod_clock_init_mstop(): CLK_ON 0x57c/eth1_clk_axi 3fff
> [   57.435895] rzg2l_mod_clock_init_mstop(): CLK_ON 0x57c/eth1_clk_chi 3fff
> [   57.442656] rzg2l_mod_clock_init_mstop(): CLK_ON 0x57c/eth1_rmii_i 3fff
> [   57.449314] rzg2l_mod_clock_init_mstop(): CLK_ON 0x57c/eth1_ptp_ref_i 3fff
> [   57.456240] rzg2l_mod_clock_init_mstop(): CLK_ON 0x584/scif0_clk_pck 1
> [   57.462818] rzg2l_mod_clock_init_mstop(): CLK_ON 0x598/gpio_hclk 1
> [   57.469039] ###########rzg2l_cpg_resume ########0/0
> [   57.474068] dwmac4: Master AXI performs fixed burst length
> [   57.484472] renesas-gbeth 11c30000.ethernet end0: No Safety Features support found
> [   57.492079] renesas-gbeth 11c30000.ethernet end0: IEEE 1588-2008 Advanced Timestamp supported
> [   57.500658] renesas-gbeth 11c30000.ethernet end0: configuring for phy/rgmii-id link mode
> [   57.525097] dwmac4: Master AXI performs fixed burst length
> [   57.530615] renesas-gbeth 11c40000.ethernet end1: No Safety Features support found
> [   57.538201] renesas-gbeth 11c40000.ethernet end1: IEEE 1588-2008 Advanced Timestamp supported
> [   57.546764] renesas-gbeth 11c40000.ethernet end1: configuring for phy/rgmii-id link mode
> [   57.557533] OOM killer enabled.
> [   57.560668] Restarting tasks: Starting
> [   57.565020] Restarting tasks: Done
> [   57.568586] random: crng reseeded on system resumption
> [   57.573929] PM: suspend exit
> root@...rc-rzg3l:~# [   60.574926] renesas-gbeth 11c30000.ethernet end0: Link is Up - 1Gbps/Full -
> flow control rx/tx
> 
> root@...rc-rzg3l:~#
> root@...rc-rzg3l:~# echo enabled > /sys/class/tty/ttySC3/power/wakeup
> root@...rc-rzg3l:~# echo freeze > /sys/power/state
> [   86.957826] PM: suspend entry (s2idle)
> [   86.961742] Filesystems sync: 0.000 seconds
> [   86.966381] Freezing user space processes
> [   86.972014] Freezing user space processes completed (elapsed 0.001 seconds)
> [   86.979011] OOM killer disabled.
> [   86.982248] Freezing remaining freezable tasks
> [   86.987966] Freezing remaining freezable tasks completed (elapsed 0.001 seconds)
> [   86.996469] renesas-gbeth 11c30000.ethernet end0: Link is Down
> [   87.004128] rzg2l_cpg_pm_suspend(): CLK_ON 0x514/gic_gicclk 1
> [   87.009913] rzg2l_cpg_pm_suspend(): CLK_ON 0x518/ia55_clk 3
> [   87.015484] rzg2l_cpg_pm_suspend(): CLK_ON 0x518/ia55_pclk 3
> [   87.021140] rzg2l_cpg_pm_suspend(): CLK_ON 0x52c/dmac_aclk 1
> [   87.026795] rzg2l_cpg_pm_suspend(): CLK_ON 0x52c/dmac_pclk 1
> [   87.032448] rzg2l_cpg_pm_suspend(): CLK_ON 0x57c/eth0_clk_axi 30c0
> [   87.038620] rzg2l_cpg_pm_suspend(): CLK_ON 0x57c/eth0_clk_chi 30c0
> [   87.044792] rzg2l_cpg_pm_suspend(): CLK_ON 0x57c/eth0_tx_i 30c0
> [   87.050704] rzg2l_cpg_pm_suspend(): CLK_ON 0x57c/eth0_rx_i 30c0
> [   87.056616] rzg2l_cpg_pm_suspend(): CLK_ON 0x57c/eth0_tx_180_i 30c0
> [   87.062873] rzg2l_cpg_pm_suspend(): CLK_ON 0x57c/eth0_rx_180_i 30c0
> [   87.069130] rzg2l_cpg_pm_suspend(): CLK_ON 0x57c/eth0_rmii_i 30c0
> [   87.075218] rzg2l_cpg_pm_suspend(): CLK_ON 0x57c/eth0_ptp_ref_i 30c0
> [   87.081562] rzg2l_cpg_pm_suspend(): CLK_ON 0x57c/eth1_clk_axi 30c0
> [   87.087733] rzg2l_cpg_pm_suspend(): CLK_ON 0x57c/eth1_clk_chi 30c0
> [   87.093917] rzg2l_cpg_pm_suspend(): CLK_ON 0x57c/eth1_tx_i 30c0
> [   87.099829] rzg2l_cpg_pm_suspend(): CLK_ON 0x57c/eth1_rx_i 30c0
> [   87.105741] rzg2l_cpg_pm_suspend(): CLK_ON 0x57c/eth1_tx_180_i 30c0
> [   87.111999] rzg2l_cpg_pm_suspend(): CLK_ON 0x57c/eth1_rx_180_i 30c0
> [   87.118258] rzg2l_cpg_pm_suspend(): CLK_ON 0x57c/eth1_rmii_i 30c0
> [   87.124342] rzg2l_cpg_pm_suspend(): CLK_ON 0x57c/eth1_ptp_ref_i 30c0
> [   87.130688] rzg2l_cpg_pm_suspend(): CLK_ON 0x584/scif0_clk_pck 1
> [   87.136687] rzg2l_cpg_pm_suspend(): CLK_ON 0x598/gpio_hclk 1
> 
> No IRQ's in s2idle.

Also STR does not work with critical clk as it is not turning on DMAAclk during resume.

Cheers,
Biju

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ