* [PATCH] ASoC: rsnd: use fast_io for bus
@ 2014-03-28 11:20 Ben Dooks
2014-03-29 10:03 ` Mark Brown
0 siblings, 1 reply; 2+ messages in thread
From: Ben Dooks @ 2014-03-28 11:20 UTC (permalink / raw)
To: alsa-devel
Cc: kuninori.morimoto.gx, broonie, lgirdwood, linux-sh, magnus.damm,
Ben Dooks
The rcar sound driver uses regmap to access registers in various parts
of the block and uses regmap to manage mappings. The regmap is created
without fast_io set, which means it locks with a mutex rather than a
lighter-spinlock.
The use of the mutex lock causes issues when the IRQ handler is entered
as the code needs to read/write register values and thus with lock
debugging enabled the system outputs a number of warnings such as:
BUG: sleeping function called from invalid context at rnel/locking/mutex.c:616
The rcar registers are all connected via APB bus and thus not that slow
to access. The fix is to set the fast_io in the code so that regmap creates
the regmap structures using the faster spinlock functions.
Signed-off-by: Ben Dooks <ben.dooks@codethink.co.uk>
---
sound/soc/sh/rcar/gen.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/sound/soc/sh/rcar/gen.c b/sound/soc/sh/rcar/gen.c
index 9094970..6468962 100644
--- a/sound/soc/sh/rcar/gen.c
+++ b/sound/soc/sh/rcar/gen.c
@@ -66,6 +66,7 @@ static int rsnd_regmap_read32(void *context,
}
static struct regmap_bus rsnd_regmap_bus = {
+ .fast_io = true,
.write = rsnd_regmap_write32,
.read = rsnd_regmap_read32,
.reg_format_endian_default = REGMAP_ENDIAN_NATIVE,
--
1.9.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] ASoC: rsnd: use fast_io for bus
2014-03-28 11:20 [PATCH] ASoC: rsnd: use fast_io for bus Ben Dooks
@ 2014-03-29 10:03 ` Mark Brown
0 siblings, 0 replies; 2+ messages in thread
From: Mark Brown @ 2014-03-29 10:03 UTC (permalink / raw)
To: Ben Dooks
Cc: alsa-devel, kuninori.morimoto.gx, lgirdwood, linux-sh, magnus.damm
[-- Attachment #1: Type: text/plain, Size: 314 bytes --]
On Fri, Mar 28, 2014 at 11:20:59AM +0000, Ben Dooks wrote:
> The rcar sound driver uses regmap to access registers in various parts
> of the block and uses regmap to manage mappings. The regmap is created
> without fast_io set, which means it locks with a mutex rather than a
> lighter-spinlock.
Applied, thanks.
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2014-03-29 10:03 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-03-28 11:20 [PATCH] ASoC: rsnd: use fast_io for bus Ben Dooks
2014-03-29 10:03 ` 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.