From: koro.chen@mediatek.com (Koro Chen)
To: linux-arm-kernel@lists.infradead.org
Subject: [alsa-devel] [PATCH] ASoC: mediatek: Use current HW pointer for pointer callback
Date: Thu, 3 Dec 2015 19:39:34 +0800 [thread overview]
Message-ID: <1449142774.17544.8.camel@mtksdaap41> (raw)
In-Reply-To: <s5hfuzjn635.wl-tiwai@suse.de>
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 at alsa-project.org
> http://mailman.alsa-project.org/mailman/listinfo/alsa-devel
next prev parent reply other threads:[~2015-12-03 11:39 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-12-03 7:53 [PATCH] ASoC: mediatek: Use current HW pointer for pointer callback Koro Chen
2015-12-03 9:41 ` [alsa-devel] " Takashi Iwai
2015-12-03 11:01 ` Mark Brown
2015-12-03 11:07 ` Takashi Iwai
2015-12-03 11:39 ` Koro Chen [this message]
2015-12-03 14:56 ` Mark Brown
2015-12-03 15:33 ` Takashi Iwai
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1449142774.17544.8.camel@mtksdaap41 \
--to=koro.chen@mediatek.com \
--cc=linux-arm-kernel@lists.infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).