Re: [PATCHv2 1/2] regmap: add configurable lock class key for lockdep

2015-02-03 Thread Mark Brown
On Mon, Feb 02, 2015 at 12:31:38PM -0200, Mauro Carvalho Chehab wrote: Antti/Mark, Any news with regards to this? Please don't top post or send content free nags. I can't really remember what this is about but I don't think my review comments were ever addressed. signature.asc Description:

Re: [PATCHv2 1/2] regmap: add configurable lock class key for lockdep

2015-02-02 Thread Mauro Carvalho Chehab
Antti/Mark, Any news with regards to this? Regards, Mauro Em Mon, 22 Dec 2014 15:05:15 + Mark Brown broo...@kernel.org escreveu: On Mon, Dec 22, 2014 at 03:53:10PM +0200, Antti Palosaari wrote: On 12/22/2014 03:31 PM, Mark Brown wrote: Why is this configurable, how would a device

Re: [PATCHv2 1/2] regmap: add configurable lock class key for lockdep

2014-12-22 Thread Mark Brown
On Sun, Dec 21, 2014 at 12:34:51AM +0200, Antti Palosaari wrote: Lockdep validator complains recursive locking and deadlock when two different regmap instances are called in a nested order, as regmap groups locks by default. That happens easily for example when both I don't know what regmap

Re: [PATCHv2 1/2] regmap: add configurable lock class key for lockdep

2014-12-22 Thread Antti Palosaari
On 12/22/2014 02:44 PM, Mark Brown wrote: On Sun, Dec 21, 2014 at 12:34:51AM +0200, Antti Palosaari wrote: Lockdep validator complains recursive locking and deadlock when two different regmap instances are called in a nested order, as regmap groups locks by default. That happens easily for

Re: [PATCHv2 1/2] regmap: add configurable lock class key for lockdep

2014-12-22 Thread Mark Brown
On Mon, Dec 22, 2014 at 02:55:23PM +0200, Antti Palosaari wrote: On 12/22/2014 02:44 PM, Mark Brown wrote: On Sun, Dec 21, 2014 at 12:34:51AM +0200, Antti Palosaari wrote: I2C client and I2C adapter are using regmap. As a solution, add configuration option to pass custom lock class key for

Re: [PATCHv2 1/2] regmap: add configurable lock class key for lockdep

2014-12-22 Thread Antti Palosaari
On 12/22/2014 03:31 PM, Mark Brown wrote: On Mon, Dec 22, 2014 at 02:55:23PM +0200, Antti Palosaari wrote: On 12/22/2014 02:44 PM, Mark Brown wrote: On Sun, Dec 21, 2014 at 12:34:51AM +0200, Antti Palosaari wrote: I2C client and I2C adapter are using regmap. As a solution, add configuration

Re: [PATCHv2 1/2] regmap: add configurable lock class key for lockdep

2014-12-22 Thread Mauro Carvalho Chehab
Em Mon, 22 Dec 2014 13:31:42 + Mark Brown broo...@kernel.org escreveu: On Mon, Dec 22, 2014 at 02:55:23PM +0200, Antti Palosaari wrote: On 12/22/2014 02:44 PM, Mark Brown wrote: On Sun, Dec 21, 2014 at 12:34:51AM +0200, Antti Palosaari wrote: I2C client and I2C adapter are using

Re: [PATCHv2 1/2] regmap: add configurable lock class key for lockdep

2014-12-22 Thread Mark Brown
On Mon, Dec 22, 2014 at 03:53:10PM +0200, Antti Palosaari wrote: On 12/22/2014 03:31 PM, Mark Brown wrote: Why is this configurable, how would a device know if the system it is in needs a custom locking class and can safely use one? If RegMap instance is bus master, eg. I2C adapter, then you

Re: [PATCHv2 1/2] regmap: add configurable lock class key for lockdep

2014-12-22 Thread Mark Brown
On Mon, Dec 22, 2014 at 12:23:19PM -0200, Mauro Carvalho Chehab wrote: What this patch does is to offer a way for drivers B and C to define different mutex groups (e. g. different mutex IDs) that will teach the lockdep code to threat regmap mutex on drivers B and C as different mutexes. I

Re: [PATCHv2 1/2] regmap: add configurable lock class key for lockdep

2014-12-22 Thread Mark Brown
On Sun, Dec 21, 2014 at 12:34:51AM +0200, Antti Palosaari wrote: + * @lock_class_key: Custom lock class key for lockdep validator. Use that when + *regmap in question is used for bus master IO in order to avoid + *false lockdep nested locking warning. Valid

[PATCHv2 1/2] regmap: add configurable lock class key for lockdep

2014-12-20 Thread Antti Palosaari
Lockdep validator complains recursive locking and deadlock when two different regmap instances are called in a nested order, as regmap groups locks by default. That happens easily for example when both I2C client and I2C adapter are using regmap. As a solution, add configuration option to pass