Messages in this thread |  | | From | John Madieu <> | | Subject | RE: [PATCH v5 14/14] ASoC: rsnd: Add system suspend/resume support | | Date | Tue, 5 May 2026 03:03:28 +0000 |
| |
Hi Geert,
Thanks for your review.
> -----Original Message----- > From: Geert Uytterhoeven <geert@linux-m68k.org> > Sent: Dienstag, 28. April 2026 12:25 > To: John Madieu <john.madieu@gmail.com> > Subject: Re: [PATCH v5 14/14] ASoC: rsnd: Add system suspend/resume > support > > Hi John, > > On Wed, 15 Apr 2026 at 14:47, John Madieu <john.madieu@gmail.com> wrote: > > Add per-module suspend/resume functions following the existing driver > > architecture where each module manages its own resources in its own > > file. core.c provides common clock/reset helpers and orchestrates the > > calls in the correct order (reverse probe for suspend, probe order for > > resume). > > > > Infrastructure clocks (ADG, audmacpp, SCU) are managed globally using > > optional APIs to remain transparent to platforms that don't specify > > these clocks/resets. > > > > Signed-off-by: John Madieu <john.madieu.xa@bp.renesas.com> > > Thanks for your patch! > > This causes a crash on Gray Hawk Single (R-Car V4M), but not on Salvator- > XS (R-Car H3 ES2.0): > > Unable to handle kernel NULL pointer dereference at virtual address > 0000000000000008 > Mem abort info: > ESR = 0x0000000096000004 > EC = 0x25: DABT (current EL), IL = 32 bits > SET = 0, FnV = 0 > EA = 0, S1PTW = 0 > FSC = 0x04: level 0 translation fault > Data abort info: > ISV = 0, ISS = 0x00000004, ISS2 = 0x00000000 > CM = 0, WnR = 0, TnD = 0, TagAccess = 0 > GCS = 0, Overlay = 0, DirtyBit = 0, Xs = 0 > user pgtable: 4k pages, 48-bit VAs, pgdp=00000004879ed000 > [0000000000000008] pgd=0000000000000000, p4d=0000000000000000 > Internal error: Oops: 0000000096000004 [#1] SMP > CPU: 0 UID: 0 PID: 675 Comm: s2idle Not tainted > 7.1.0-rc1-arm64-renesas-03756-g4cf47bc1e3d7 #3579 PREEMPT > Hardware name: Renesas Gray Hawk Single board based on r8a779h0 (DT) > pstate: 60400005 (nZCv daif +PAN -UAO -TCO -DIT -SSBS BTYPE=--) > pc : rsnd_src_suspend+0x60/0x98 > lr : rsnd_suspend+0x44/0x6c > sp : ffff800082e03ab0 > x29: ffff800082e03ab0 x28: ffff000444022ac0 x27: ffff8000817d9050 > x26: 0000000000000002 x25: ffff80008073dd64 x24: ffff800080ab0b20 > x23: 0000000000000000 x22: ffff0004408a84a0 x21: 0000000000000002 > x20: ffff0004402d6e80 x19: ffff0004402d6e80 x18: 0000000000000000 > x17: 003fffffffffffff x16: ffff800082d8bc18 x15: ffff0005bef86f00 > x14: ffff000444022b40 x13: 0000000000000112 x12: 071c71c71c71c71c > x11: 00000000000000c0 x10: 00000000000009f0 x9 : ffff800082e03880 > x8 : ffff000444022ac0 x7 : ffff0005bef86f80 x6 : 0000000000000000 > x5 : 0000000000000084 x4 : ffff000444022ac0 x3 : 0000000000000000 > x2 : ffff000444022ac0 x1 : 0000000000000000 x0 : 0000000000000000 > Call trace: > rsnd_src_suspend+0x60/0x98 (P) > rsnd_suspend+0x44/0x6c > device_suspend+0x134/0x3d8 > dpm_suspend+0x164/0x268 > dpm_suspend_start+0x4c/0x64 > suspend_devices_and_enter+0x1c8/0x544 > pm_suspend+0x194/0x1e0 > state_store+0x7c/0x100 > kobj_attr_store+0x14/0x24 > sysfs_kf_write+0x78/0x8c > kernfs_fop_write_iter+0x128/0x1d0 > vfs_write+0x210/0x390 > ksys_write+0x6c/0x100 > __arm64_sys_write+0x18/0x20 > invoke_syscall+0x50/0x104 > el0_svc_common.constprop.0+0x3c/0xd4 > do_el0_svc+0x18/0x20 > el0_svc+0x24/0xd8 > el0t_64_sync_handler+0x98/0xdc > el0t_64_sync+0x154/0x158 > Code: 6b13001f 54ffff0c f94013f5 f9402e80 (f9400413) > ---[ end trace 0000000000000000 ]--- > > > --- a/sound/soc/renesas/rcar/src.c > > +++ b/sound/soc/renesas/rcar/src.c > > @@ -848,3 +848,29 @@ void rsnd_src_remove(struct rsnd_priv *priv) > > rsnd_mod_quit(rsnd_mod_get(src)); > > } > > } > > + > > +void rsnd_src_suspend(struct rsnd_priv *priv) { > > + struct rsnd_src *src; > > + int i; > > + > > + for_each_rsnd_src(src, priv, i) > > + rsnd_suspend_clk_reset(rsnd_mod_get(src)->clk, > > + rsnd_mod_get(src)->rstc); > > + > > + clk_disable_unprepare(rsnd_priv_to_src_ctrl(priv)->scu_x2); > > Apparently rsnd_priv_to_src_ctrl(priv) is NULL.
Indeed. Thanks for pointing it. In rsnd_src_probe(), we have:
node = rsnd_src_of_node(priv); if (!node) return 0;
early in the function, so priv->src_ctrl stays NULL on platforms without SRC. This should be fixed in v6 with proper checks in suspend/resume.
Regards, John
|  |