mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Mark Brown <broonie@kernel.org>
To: Takashi Iwai <tiwai@suse.de>
Cc: Koro Chen <koro.chen@mediatek.com>,
	lgirdwood@gmail.com, alsa-devel@alsa-project.org,
	srv_heupstream@mediatek.com, s.hauer@pengutronix.de,
	linux-kernel@vger.kernel.org, linux-mediatek@lists.infradead.org,
	linux-arm-kernel@lists.infradead.org
Subject: Re: [alsa-devel] [PATCH] ASoC: mediatek: Use current HW pointer for pointer callback
Date: Thu, 3 Dec 2015 14:56:12 +0000	[thread overview]
Message-ID: <20151203145612.GF5727@sirena.org.uk> (raw)
In-Reply-To: <s5hfuzjn635.wl-tiwai@suse.de>

[-- Attachment #1: Type: text/plain, Size: 893 bytes --]

On Thu, Dec 03, 2015 at 12:07:26PM +0100, Takashi Iwai wrote:
> 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().

I know that's what you meant - that should be done by preallocating the
cache (which can be done with defaults) and providing your own lock
if there's a spinlock already held (since we use _irqsave() which IIRC
isn't nestable).  We can also use GFP_ATOMIC for some of the allocations
in reasonable use cases but it's not in general supported.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 473 bytes --]

  parent reply	other threads:[~2015-12-03 14:56 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-12-03  7:53 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
2015-12-03 14:56       ` Mark Brown [this message]
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=20151203145612.GF5727@sirena.org.uk \
    --to=broonie@kernel.org \
    --cc=alsa-devel@alsa-project.org \
    --cc=koro.chen@mediatek.com \
    --cc=lgirdwood@gmail.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mediatek@lists.infradead.org \
    --cc=s.hauer@pengutronix.de \
    --cc=srv_heupstream@mediatek.com \
    --cc=tiwai@suse.de \
    /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

all inboxes | Powered by JetHome®