[PATCH] ASoC: fsl_asrc: Add reg_defaults for regmap to fix kernel dump

Mark Brown broonie at kernel.org
Tue Oct 28 11:19:04 AEDT 2014


On Fri, Oct 24, 2014 at 07:03:57PM -0700, Nicolin Chen wrote:
> Kernel dump (WARN_ON) ocurred during system boot-up inside regmap_write():
> 
> ------------[ cut here ]------------
> WARNING: CPU: 0 PID: 47 at kernel/locking/lockdep.c:2744 lockdep_trace_alloc+0xe8/0x108()

Applied, thanks.  Please edit down or elide backtraces - they take up a
lot of space in the changelog compared to the amount of information they
contain.

> By looking at 2744 line, we can get that it's because regcache_rbtree_write()
> would call kmalloc() with GFP flag if it couldn't find an existing block to
> insert nodes while this kmalloc() call is inside a spin_lock_irq_save pair,
> i.e. IRQs disabled.

> Even though this may be a bug that should be fixed, I still try to send this
> patch as a quick fix (work around) since it does no harm to assign default
> values of every registers when using regcache.

It's not a bug, it's not reasonable to default allocations to atomic and
we can't really tell what context we're in.  Anything used inside a
heavily locked path should either have a default provided or arrange for
a prior write to set up the cache.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 473 bytes
Desc: Digital signature
URL: <http://lists.ozlabs.org/pipermail/linuxppc-dev/attachments/20141028/f382c3c4/attachment.sig>


More information about the Linuxppc-dev mailing list