Re: [PATCH] ASoC: mediatek: Use current HW pointer for pointer callback

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, 2015-12-03 at 12:07 +0100, Takashi Iwai wrote:
> On Thu, 03 Dec 2015 12:01:58 +0100,
> Mark Brown wrote:
> > 
> > On Thu, Dec 03, 2015 at 10:41:38AM +0100, Takashi Iwai wrote:
> > 
> > > While reading this patch, I wondered how regmap can be used safely in
> > > an irq-disabled context.  Mark, do we have any API for that?
> > 
> > We can use user supplied locks or spin_lock_irqsave().
> 
> I meant how to guarantee to make regmap_read() working in an already
> spin-locked context, typically in an irq handler?  regmap_read()
> involves with the regcache and it may invoke kmalloc().
> 
Yes, we were hit by this before. When using devm_regmap_init_mmio() for
regmap, it uses spin_lock_irqsave() before every read/write, and if
cache type is RBTREE, then kmalloc will occur after spin_lock_irqsave()
and it brings warning. That's why we changed RBTREE to NONE. Setting
cache type to FLAT will also work, but we think our register accessing
is fast enough without need of cache.

 

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


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



[Index of Archives]     [ALSA User]     [Linux Audio Users]     [Kernel Archive]     [Asterisk PBX]     [Photo Sharing]     [Linux Sound]     [Video 4 Linux]     [Gimp]     [Yosemite News]

  Powered by Linux