All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] ASoC: rsnd: fixup DMAEngine API
@ 2021-11-08  4:22 Kuninori Morimoto
  2021-11-12 21:27 ` Mark Brown
  0 siblings, 1 reply; 2+ messages in thread
From: Kuninori Morimoto @ 2021-11-08  4:22 UTC (permalink / raw)
  To: Mark Brown; +Cc: Wolfram Sang, Linux-ALSA, oshihiro Shimoda, stable


From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>

commit d5bb69dc54ec1 ("ASoC: sh: rcar: dma: : use proper DMAENGINE
API for termination") updated DMAEngine API _all() to _sync(),
but it should be _async().
_all() and _async() are almost same, the difference is only return
error code. _sync() will call dmaengine_synchronize() and will be
kernel panic.
This patch is needed for v5.15 or later.

[   27.293264] BUG: scheduling while atomic: irq/130-ec70000/131/0x00000003
[   27.300084] 2 locks held by irq/130-ec70000/131:
[   27.304743]  #0: ffff0004c274d908 (&group->lock){....}-{2:2}, at: _snd_pcm_stream_lock_irqsave+0x48/0x54
[   27.314344]  #1: ffff0004c1788c60 (&priv->lock#2){....}-{2:2}, at: rsnd_soc_dai_trigger+0x70/0x7bc
[   27.323409] irq event stamp: 206
[   27.326664] hardirqs last  enabled at (205): [<ffff80001082de50>] _raw_spin_unlock_irq+0x50/0xa0
[   27.335529] hardirqs last disabled at (206): [<ffff80001082d9e4>] _raw_spin_lock_irqsave+0xc4/0xd0
[   27.344564] softirqs last  enabled at (0): [<ffff800010037324>] copy_process+0x644/0x1b10
[   27.352819] softirqs last disabled at (0): [<0000000000000000>] 0x0
[   27.359142] CPU: 0 PID: 131 Comm: irq/130-ec70000 Not tainted 5.14.0-rc1+ #918
[   27.366429] Hardware name: Renesas H3ULCB Kingfisher board based on r8a77950 (DT)
[   27.373975] Call trace:
[   27.376442]  dump_backtrace+0x0/0x1b4
[   27.380141]  show_stack+0x24/0x30
[   27.383488]  dump_stack_lvl+0x8c/0xb8
[   27.387184]  dump_stack+0x18/0x34
[   27.390528]  __schedule_bug+0x8c/0x9c
[   27.394224]  __schedule+0x790/0x8dc
[   27.397746]  schedule+0x7c/0x110
[   27.401003]  synchronize_irq+0x94/0xd0
[   27.404786]  rcar_dmac_device_synchronize+0x20/0x2c
[   27.409710]  rsnd_dmaen_stop+0x50/0x64
[   27.413495]  rsnd_soc_dai_trigger+0x554/0x7bc
[   27.417890]  snd_soc_pcm_dai_trigger+0xe8/0x264

Cc: <stable@kernel.org>
Fixes: commit d5bb69dc54ec1 ("ASoC: sh: rcar: dma: : use proper DMAENGINE API for termination")
Link: https://lore.kernel.org/r/TY2PR01MB3692889E1A7476C4322CC296D8AE9@TY2PR01MB3692.jpnprd01.prod.outlook.com
Reported-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
Acked-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
---
 sound/soc/sh/rcar/dma.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sound/soc/sh/rcar/dma.c b/sound/soc/sh/rcar/dma.c
index 16c6e0265749..03e0d4eca781 100644
--- a/sound/soc/sh/rcar/dma.c
+++ b/sound/soc/sh/rcar/dma.c
@@ -102,7 +102,7 @@ static int rsnd_dmaen_stop(struct rsnd_mod *mod,
 	struct rsnd_dmaen *dmaen = rsnd_dma_to_dmaen(dma);
 
 	if (dmaen->chan)
-		dmaengine_terminate_sync(dmaen->chan);
+		dmaengine_terminate_async(dmaen->chan);
 
 	return 0;
 }
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] ASoC: rsnd: fixup DMAEngine API
  2021-11-08  4:22 [PATCH] ASoC: rsnd: fixup DMAEngine API Kuninori Morimoto
@ 2021-11-12 21:27 ` Mark Brown
  0 siblings, 0 replies; 2+ messages in thread
From: Mark Brown @ 2021-11-12 21:27 UTC (permalink / raw)
  To: Kuninori Morimoto; +Cc: Wolfram Sang, oshihiro Shimoda, stable, Linux-ALSA

On 08 Nov 2021 13:22:55 +0900, Kuninori Morimoto wrote:
> From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
> 
> commit d5bb69dc54ec1 ("ASoC: sh: rcar: dma: : use proper DMAENGINE
> API for termination") updated DMAEngine API _all() to _sync(),
> but it should be _async().
> _all() and _async() are almost same, the difference is only return
> error code. _sync() will call dmaengine_synchronize() and will be
> kernel panic.
> This patch is needed for v5.15 or later.
> 
> [...]

Applied to

   https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-linus

Thanks!

[1/1] ASoC: rsnd: fixup DMAEngine API
      commit: 2ce1b21cb3326e12af3c72c47e1d294b19d73947

All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent to Linus during
the next merge window (or sooner if it is a bug fix), however if
problems are discovered then the patch may be dropped or reverted.

You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.

If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.

Please add any relevant lists and maintainers to the CCs when replying
to this mail.

Thanks,
Mark

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-11-12 21:28 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-11-08  4:22 [PATCH] ASoC: rsnd: fixup DMAEngine API Kuninori Morimoto
2021-11-12 21:27 ` Mark Brown

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.