lkml.org 
[lkml]   [2011]   [Sep]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 3/7] regmap: Add a mutex to guard the sync operation
On Wed, Sep 28, 2011 at 03:24:06PM +0100, Dimitris Papastamos wrote:
> On Wed, Sep 28, 2011 at 01:52:50PM +0100, Mark Brown wrote:

> > Shouldn't we either be taking the regmap lock when doing the sync or
> > otherwise guarding against something other than a cache sync?

> Em the main issue is that the sync() implementation will use
> regmap_write() which will grab map->lock. To avoid this we could have
> gone and used directly the lockless _regmap_write() but that's
> static. To be honest, it feels cleaner to have only 1 lock to guard
> the map so maybe we should get rid of map->sync_lock.

Making _regmap_write() global seems fine, it's not an externally visible
API but the cache code is part of the infrastructure.


\
 
 \ /
  Last update: 2011-09-28 17:21    [W:0.033 / U:0.472 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site