lkml.org 
[lkml]   [2015]   [Jun]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [RFC PATCH 1/2] regmap: add configurable lock class key for lockdep
[...]
> diff --git a/include/linux/regmap.h b/include/linux/regmap.h
> index 116655d..09aaaf5 100644
> --- a/include/linux/regmap.h
> +++ b/include/linux/regmap.h
> @@ -135,6 +135,12 @@ typedef void (*regmap_unlock)(void *);
> * @lock_arg: this field is passed as the only argument of lock/unlock
> * functions (ignored in case regular lock/unlock functions
> * are not overridden).
> + * @lock_class_key: Custom lock class key for lockdep validator. Use that to
> + * silence false lockdep nested locking warning, when this
> + * regmap needs to access another regmap during read/write
> + * operations (directly in read/write functions, or
> + * indirectly, e.g. through bus accesses).

The recommendation when to use this is the wrong way around. The presented
criteria is true for all devices since the bus master might be using regmap
to implements its IO. Any regmap instance that might be used from within
another regmap instance needs a custom lock class. This includes bus masters
as well as resource providers like clock chips or regulators.


\
 
 \ /
  Last update: 2015-06-25 18:21    [W:0.079 / U:1.360 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site