lkml.org 
[lkml]   [2013]   [May]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] regmap: Make regmap-mmio usable from atomic contexts
On 05/24/2013 02:29 AM, Lars-Peter Clausen wrote:
> regmap-mmio uses a spinlock with spin_lock() and spin_unlock() for locking.
> To be able to use the regmap API from different contexts (atomic vs non-atomic),
> without the risk of race conditions, we need to use spin_lock_irqsave() and
> spin_lock_irqrestore() instead. A new field, the spinlock_flags field, is added
> to regmap struct to store the flags between regmap_{,un}lock_spinlock(). The
> spinlock_flags field itself is also protected by the spinlock.

Reviewed-by: Stephen Warren <swarren@nvidia.com>


\
 
 \ /
  Last update: 2013-05-24 18:01    [W:0.091 / U:0.084 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site