[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20140228033935.GF9383@sirena.org.uk>
Date: Fri, 28 Feb 2014 12:39:35 +0900
From: Mark Brown <broonie@...nel.org>
To: Andrew Bresticker <abrestic@...omium.org>
Cc: Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] regmap: don't use spinlocks with
REGCACHE_{RBTREE,COMPRESSED}
On Thu, Feb 27, 2014 at 06:32:53PM -0800, Andrew Bresticker wrote:
> On Thu, Feb 27, 2014 at 3:37 AM, Mark Brown <broonie@...nel.org> wrote:
> > 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.
> Oops, you're right, I didn't look through all the regmap operations
> carefully enough. It is in fact the Tegra drivers I've ran into this
> issue with.
Yeah, I suspected it might be :)
> > 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.
> Allocations are made in the write path for rbtree and in both the read
> and write paths for lzo. I suppose we can pre-allocate everything at
> init time, but I haven't looked too much at that. For at least the
> Tegra drivers, the best option for now appears to be to convert to a
> flat cache.
OK, that's certainly simple to implement. Currently to allocate at
startup the standard thing is to supply the hardware defaults as data,
though going through and reading everything should also do the trick.
Download attachment "signature.asc" of type "application/pgp-signature" (837 bytes)
Powered by blists - more mailing lists