Re: [PATCH 2/2] regmap: Make regmap-mmio usable from differentcontexts

From: Mark Brown
Date: Thu May 23 2013 - 12:11:35 EST


On Thu, May 23, 2013 at 05:50:15PM +0200, Lars-Peter Clausen wrote:
> On 05/23/2013 05:42 PM, Stephen Warren wrote:

> > I guess the core of the issue is that you want to replace spin_lock()
> > with spin_lock_irqsave(). I'd like to see that explicitly described in
> > the commit description, if that is the core aspect of this change.

> Hm, it does.

> regmap-mmio uses a spinlock with spin_lock() and spin_unlock() for
> locking.
> ...
> This patch updates the adds a flags parameter to the regmap lock
> and unlock callbacks and uses spin_lock_irqsave() and
> spin_unlock_restore() ...

That's pretty buried in the changelog though - really all the first
paragraph needs to say is that we want to use the irqsave versions to
allow interaction with interrupt context.

Attachment: signature.asc
Description: Digital signature