From: Mark Brown <broonie@kernel.org>
To: Andrew Bresticker <abrestic@chromium.org>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] regmap: don't use spinlocks with REGCACHE_{RBTREE,COMPRESSED}
Date: Thu, 27 Feb 2014 20:37:48 +0900 [thread overview]
Message-ID: <20140227113748.GY9383@sirena.org.uk> (raw)
In-Reply-To: <1393473057-19919-1-git-send-email-abrestic@chromium.org>
[-- Attachment #1: Type: text/plain, Size: 899 bytes --]
On Wed, Feb 26, 2014 at 07:50:57PM -0800, Andrew Bresticker wrote:
> Both REGCACHE_RBTREE and REGCACHE_COMPRESSED make GFP_KERNEL allocations
> with the regmap lock held. If we're initializing a regmap which would
> normally use a spinlock (e.g. MMIO), fall back to using a mutex if one
> of these caching types is to be used.
Have all the users been audited to verify that they're actually safe
with this? I just took a quick look at the Tegra drivers and they're
doing regmap operations in their trigger operations which is done from
atomic context so they should run into problems trying to take mutexes
anyway.
I think we need to either ensure that all users allocate their caches at
probe time (which is fine and is hopefully what the current users are
doing), provide a mechanism for them to do cache allocations outside of
the spinlock (which sounds hairy) or convert them to flat cache.
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
next prev parent reply other threads:[~2014-02-27 11:37 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-02-27 3:50 Andrew Bresticker
2014-02-27 11:37 ` Mark Brown [this message]
2014-02-28 2:32 ` Andrew Bresticker
2014-02-28 3:39 ` Mark Brown
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=20140227113748.GY9383@sirena.org.uk \
--to=broonie@kernel.org \
--cc=abrestic@chromium.org \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.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
all inboxes | Powered by JetHome®