alsa-devel.alsa-project.org archive mirror
 help / color / mirror / Atom feed
* [alsa-devel] [PATCH] ALSA: hda: enable regmap internal locking
@ 2020-01-08 18:08 Kai Vehmanen
  2020-01-08 19:12 ` Takashi Iwai
  0 siblings, 1 reply; 2+ messages in thread
From: Kai Vehmanen @ 2020-01-08 18:08 UTC (permalink / raw)
  To: alsa-devel; +Cc: tiwai, kai.vehmanen

This reverts commit 42ec336f1f9d ("ALSA: hda: Disable regmap
internal locking").

Without regmap locking, there is a race between snd_hda_codec_amp_init()
and PM callbacks issuing regcache_sync(). This was caught by
following kernel warning trace:

<4> [358.080081] WARNING: CPU: 2 PID: 4157 at drivers/base/regmap/regcache.c:498 regcache_cache_only+0xf5/0x130
[...]
<4> [358.080148] Call Trace:
<4> [358.080158]  snd_hda_codec_amp_init+0x4e/0x100 [snd_hda_codec]
<4> [358.080169]  snd_hda_codec_amp_init_stereo+0x40/0x80 [snd_hda_codec]

Suggested-by: Takashi Iwai <tiwai@suse.de>
BugLink: https://gitlab.freedesktop.org/drm/intel/issues/592
Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
---
 sound/hda/hdac_regmap.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/sound/hda/hdac_regmap.c b/sound/hda/hdac_regmap.c
index 906b1e20bae0..286361ecd640 100644
--- a/sound/hda/hdac_regmap.c
+++ b/sound/hda/hdac_regmap.c
@@ -363,7 +363,6 @@ static const struct regmap_config hda_regmap_cfg = {
 	.reg_write = hda_reg_write,
 	.use_single_read = true,
 	.use_single_write = true,
-	.disable_locking = true,
 };
 
 /**
-- 
2.17.1

_______________________________________________
Alsa-devel mailing list
Alsa-devel@alsa-project.org
https://mailman.alsa-project.org/mailman/listinfo/alsa-devel

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

* Re: [alsa-devel] [PATCH] ALSA: hda: enable regmap internal locking
  2020-01-08 18:08 [alsa-devel] [PATCH] ALSA: hda: enable regmap internal locking Kai Vehmanen
@ 2020-01-08 19:12 ` Takashi Iwai
  0 siblings, 0 replies; 2+ messages in thread
From: Takashi Iwai @ 2020-01-08 19:12 UTC (permalink / raw)
  To: Kai Vehmanen; +Cc: alsa-devel

On Wed, 08 Jan 2020 19:08:56 +0100,
Kai Vehmanen wrote:
> 
> This reverts commit 42ec336f1f9d ("ALSA: hda: Disable regmap
> internal locking").
> 
> Without regmap locking, there is a race between snd_hda_codec_amp_init()
> and PM callbacks issuing regcache_sync(). This was caught by
> following kernel warning trace:
> 
> <4> [358.080081] WARNING: CPU: 2 PID: 4157 at drivers/base/regmap/regcache.c:498 regcache_cache_only+0xf5/0x130
> [...]
> <4> [358.080148] Call Trace:
> <4> [358.080158]  snd_hda_codec_amp_init+0x4e/0x100 [snd_hda_codec]
> <4> [358.080169]  snd_hda_codec_amp_init_stereo+0x40/0x80 [snd_hda_codec]
> 
> Suggested-by: Takashi Iwai <tiwai@suse.de>
> BugLink: https://gitlab.freedesktop.org/drm/intel/issues/592
> Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>

Applied now.  Thanks.


Takashi
_______________________________________________
Alsa-devel mailing list
Alsa-devel@alsa-project.org
https://mailman.alsa-project.org/mailman/listinfo/alsa-devel

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

end of thread, other threads:[~2020-01-08 19:13 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-01-08 18:08 [alsa-devel] [PATCH] ALSA: hda: enable regmap internal locking Kai Vehmanen
2020-01-08 19:12 ` Takashi Iwai

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).