linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v1] ASoC: meson: axg-fifo: set option to use raw spinlock
@ 2024-07-29 13:16 Arseniy Krasnov
  2024-07-29 14:15 ` Jerome Brunet
  0 siblings, 1 reply; 13+ messages in thread
From: Arseniy Krasnov @ 2024-07-29 13:16 UTC (permalink / raw)
  To: Jerome Brunet, Liam Girdwood, Mark Brown, Jaroslav Kysela,
	Takashi Iwai, Neil Armstrong, Kevin Hilman, Martin Blumenstingl,
	alsa-devel, linux-sound, linux-arm-kernel, linux-amlogic,
	linux-kernel
  Cc: kernel, oxffffaa, avkrasnov

Raw spinlock is needed here, because with enabled PREEMPT_RT,
spinlock_t become preemptible, but this regmap lock could be
acquired in IRQ handler. Found by lockdep:

[ ] =============================
[ ] [ BUG: Invalid wait context ]
[ ] 6.9.9-sdkernel #1 Tainted: G O
[ ] -----------------------------
[ ] aplay/413 is trying to lock:
[ ] ffff000003930018 (axg_fifo:356:(&axg_fifo_regmap_cfg)->lock){....}-{3:3},c
[ ] other info that might help us debug this:
[ ] context-{2:2}
[ ] no locks held by aplay/413.
[ ] stack backtrace:
[ ] CPU: 0 PID: 413 Comm: aplay Tainted: G           O       6.9.9-kernel #1
[ ] Hardware name: SberDevices SberBoom Mini (DT)
[ ] Call trace:
[ ]  dump_backtrace+0x98/0xf0
[ ]  show_stack+0x18/0x24
[ ]  dump_stack_lvl+0x90/0xd0
[ ]  dump_stack+0x18/0x24
[ ]  __lock_acquire+0x9dc/0x1f10
[ ]  lock_acquire.part.0+0xe8/0x228
[ ]  lock_acquire+0x68/0x84
[ ]  _raw_spin_lock_irqsave+0x60/0x88
[ ]  regmap_lock_spinlock+0x18/0x2c
[ ]  regmap_read+0x3c/0x78
[ ]  axg_fifo_pcm_irq_block+0x4c/0xc8
[ ]  __handle_irq_event_percpu+0xa4/0x2f8
[ ]  handle_irq_event+0x4c/0xbc
[ ]  handle_fasteoi_irq+0xa4/0x23c
[ ]  generic_handle_domain_irq+0x2c/0x44
[ ]  gic_handle_irq+0x40/0xc4
[ ]  call_on_irq_stack+0x24/0x4c
[ ]  do_interrupt_handler+0x80/0x84
[ ]  el0_interrupt+0x5c/0x124
[ ]  __el0_irq_handler_common+0x18/0x24
[ ]  el0t_32_irq_handler+0x10/0x1c
[ ]  el0t_32_irq+0x194/0x198

Signed-off-by: Arseniy Krasnov <avkrasnov@salutedevices.com>
---
 sound/soc/meson/axg-fifo.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/sound/soc/meson/axg-fifo.c b/sound/soc/meson/axg-fifo.c
index ecb3eb7a9723d..a22298f74b35a 100644
--- a/sound/soc/meson/axg-fifo.c
+++ b/sound/soc/meson/axg-fifo.c
@@ -328,6 +328,7 @@ static const struct regmap_config axg_fifo_regmap_cfg = {
 	.val_bits	= 32,
 	.reg_stride	= 4,
 	.max_register	= FIFO_CTRL2,
+	.use_raw_spinlock = true,
 };
 
 int axg_fifo_probe(struct platform_device *pdev)
-- 
2.30.1



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

end of thread, other threads:[~2024-08-06 10:03 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-07-29 13:16 [PATCH v1] ASoC: meson: axg-fifo: set option to use raw spinlock Arseniy Krasnov
2024-07-29 14:15 ` Jerome Brunet
2024-07-29 14:44   ` Mark Brown
2024-07-29 15:06     ` Jerome Brunet
2024-07-29 15:28       ` Mark Brown
2024-07-29 15:57         ` Jerome Brunet
2024-08-05 15:33           ` Sebastian Andrzej Siewior
2024-08-05 16:07             ` Jerome Brunet
2024-08-06  6:50               ` Sebastian Andrzej Siewior
2024-08-06  9:21                 ` Jerome Brunet
2024-08-06 10:03                   ` Sebastian Andrzej Siewior
2024-08-05 16:56             ` Mark Brown
2024-08-06  6:57               ` Sebastian Andrzej Siewior

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).