Re: [RFC PATCH] regulator: Fix recursive mutex lockdep warning

2015-08-07 Thread Mark Brown
On Thu, Aug 06, 2015 at 12:49:22PM +0100, Srinivas Kandagatla wrote: > On 06/08/15 12:40, Mark Brown wrote: > >>lock_class per regulator makes more sense, I will try to cookup an RFC > >>patch. > >There's an issue there with all lock classes needing to be statically > >allocated which makes

Re: [RFC PATCH] regulator: Fix recursive mutex lockdep warning

2015-08-07 Thread Mark Brown
On Thu, Aug 06, 2015 at 12:49:22PM +0100, Srinivas Kandagatla wrote: On 06/08/15 12:40, Mark Brown wrote: lock_class per regulator makes more sense, I will try to cookup an RFC patch. There's an issue there with all lock classes needing to be statically allocated which makes things a bit

Re: [RFC PATCH] regulator: Fix recursive mutex lockdep warning

2015-08-06 Thread Srinivas Kandagatla
On 06/08/15 12:40, Mark Brown wrote: On Thu, Aug 06, 2015 at 12:01:29PM +0100, Srinivas Kandagatla wrote: On 06/08/15 10:43, Mark Brown wrote: like what we have for regmaps with a class per regulator or something lock_class per regulator makes more sense, I will try to cookup an RFC

Re: [RFC PATCH] regulator: Fix recursive mutex lockdep warning

2015-08-06 Thread Mark Brown
On Thu, Aug 06, 2015 at 12:01:29PM +0100, Srinivas Kandagatla wrote: > On 06/08/15 10:43, Mark Brown wrote: > >like what we have for regmaps with a class per regulator or something > lock_class per regulator makes more sense, I will try to cookup an RFC > patch. There's an issue there with all

Re: [RFC PATCH] regulator: Fix recursive mutex lockdep warning

2015-08-06 Thread Srinivas Kandagatla
On 06/08/15 10:43, Mark Brown wrote: On Wed, Aug 05, 2015 at 05:02:08PM +0100, Srinivas Kandagatla wrote: A recursive lockdep warning occurs if you call regulator_set_voltage() on a load switches that are modelled as regulators with a parent supply as there is no nesting annotation for the

Re: [RFC PATCH] regulator: Fix recursive mutex lockdep warning

2015-08-06 Thread Mark Brown
On Wed, Aug 05, 2015 at 05:02:08PM +0100, Srinivas Kandagatla wrote: > A recursive lockdep warning occurs if you call regulator_set_voltage() > on a load switches that are modelled as regulators with a parent supply as > there is no nesting annotation for the rdev->mutex. > To avoid this warning,

Re: [RFC PATCH] regulator: Fix recursive mutex lockdep warning

2015-08-06 Thread Krzysztof Kozlowski
2015-08-06 16:35 GMT+09:00 Krzysztof Kozlowski : > On 06.08.2015 16:29, Srinivas Kandagatla wrote: >> Thanks Krzysztof >> >> On 06/08/15 02:39, Krzysztof Kozlowski wrote: --- a/drivers/regulator/core.c >+++ b/drivers/regulator/core.c >@@ -2919,7 +2919,7 @@ static int

Re: [RFC PATCH] regulator: Fix recursive mutex lockdep warning

2015-08-06 Thread Krzysztof Kozlowski
On 06.08.2015 16:29, Srinivas Kandagatla wrote: > Thanks Krzysztof > > On 06/08/15 02:39, Krzysztof Kozlowski wrote: >>> --- a/drivers/regulator/core.c >>> >+++ b/drivers/regulator/core.c >>> >@@ -2919,7 +2919,7 @@ static int _regulator_get_voltage(struct >>> regulator_dev *rdev) >>> > }

Re: [RFC PATCH] regulator: Fix recursive mutex lockdep warning

2015-08-06 Thread Srinivas Kandagatla
Thanks Krzysztof On 06/08/15 02:39, Krzysztof Kozlowski wrote: --- a/drivers/regulator/core.c >+++ b/drivers/regulator/core.c >@@ -2919,7 +2919,7 @@ static int _regulator_get_voltage(struct regulator_dev *rdev) > } else if (rdev->desc->fixed_uV && (rdev->desc->n_voltages == 1)) { >

Re: [RFC PATCH] regulator: Fix recursive mutex lockdep warning

2015-08-06 Thread Mark Brown
On Wed, Aug 05, 2015 at 05:02:08PM +0100, Srinivas Kandagatla wrote: A recursive lockdep warning occurs if you call regulator_set_voltage() on a load switches that are modelled as regulators with a parent supply as there is no nesting annotation for the rdev-mutex. To avoid this warning, use

Re: [RFC PATCH] regulator: Fix recursive mutex lockdep warning

2015-08-06 Thread Srinivas Kandagatla
On 06/08/15 12:40, Mark Brown wrote: On Thu, Aug 06, 2015 at 12:01:29PM +0100, Srinivas Kandagatla wrote: On 06/08/15 10:43, Mark Brown wrote: like what we have for regmaps with a class per regulator or something lock_class per regulator makes more sense, I will try to cookup an RFC

Re: [RFC PATCH] regulator: Fix recursive mutex lockdep warning

2015-08-06 Thread Srinivas Kandagatla
On 06/08/15 10:43, Mark Brown wrote: On Wed, Aug 05, 2015 at 05:02:08PM +0100, Srinivas Kandagatla wrote: A recursive lockdep warning occurs if you call regulator_set_voltage() on a load switches that are modelled as regulators with a parent supply as there is no nesting annotation for the

Re: [RFC PATCH] regulator: Fix recursive mutex lockdep warning

2015-08-06 Thread Mark Brown
On Thu, Aug 06, 2015 at 12:01:29PM +0100, Srinivas Kandagatla wrote: On 06/08/15 10:43, Mark Brown wrote: like what we have for regmaps with a class per regulator or something lock_class per regulator makes more sense, I will try to cookup an RFC patch. There's an issue there with all lock

Re: [RFC PATCH] regulator: Fix recursive mutex lockdep warning

2015-08-06 Thread Srinivas Kandagatla
Thanks Krzysztof On 06/08/15 02:39, Krzysztof Kozlowski wrote: --- a/drivers/regulator/core.c +++ b/drivers/regulator/core.c @@ -2919,7 +2919,7 @@ static int _regulator_get_voltage(struct regulator_dev *rdev) } else if (rdev-desc-fixed_uV (rdev-desc-n_voltages == 1)) {

Re: [RFC PATCH] regulator: Fix recursive mutex lockdep warning

2015-08-06 Thread Krzysztof Kozlowski
2015-08-06 16:35 GMT+09:00 Krzysztof Kozlowski k.kozlow...@samsung.com: On 06.08.2015 16:29, Srinivas Kandagatla wrote: Thanks Krzysztof On 06/08/15 02:39, Krzysztof Kozlowski wrote: --- a/drivers/regulator/core.c +++ b/drivers/regulator/core.c @@ -2919,7 +2919,7 @@ static int

Re: [RFC PATCH] regulator: Fix recursive mutex lockdep warning

2015-08-06 Thread Krzysztof Kozlowski
On 06.08.2015 16:29, Srinivas Kandagatla wrote: Thanks Krzysztof On 06/08/15 02:39, Krzysztof Kozlowski wrote: --- a/drivers/regulator/core.c +++ b/drivers/regulator/core.c @@ -2919,7 +2919,7 @@ static int _regulator_get_voltage(struct regulator_dev *rdev) } else if

Re: [RFC PATCH] regulator: Fix recursive mutex lockdep warning

2015-08-05 Thread Krzysztof Kozlowski
2015-08-06 1:02 GMT+09:00 Srinivas Kandagatla : > A recursive lockdep warning occurs if you call regulator_set_voltage() > on a load switches that are modelled as regulators with a parent supply as > there is no nesting annotation for the rdev->mutex. > To avoid this warning, use the unlocked

[RFC PATCH] regulator: Fix recursive mutex lockdep warning

2015-08-05 Thread Srinivas Kandagatla
A recursive lockdep warning occurs if you call regulator_set_voltage() on a load switches that are modelled as regulators with a parent supply as there is no nesting annotation for the rdev->mutex. To avoid this warning, use the unlocked version of the get_voltage(). wiithout this patch kernel

[RFC PATCH] regulator: Fix recursive mutex lockdep warning

2015-08-05 Thread Srinivas Kandagatla
A recursive lockdep warning occurs if you call regulator_set_voltage() on a load switches that are modelled as regulators with a parent supply as there is no nesting annotation for the rdev-mutex. To avoid this warning, use the unlocked version of the get_voltage(). wiithout this patch kernel

Re: [RFC PATCH] regulator: Fix recursive mutex lockdep warning

2015-08-05 Thread Krzysztof Kozlowski
2015-08-06 1:02 GMT+09:00 Srinivas Kandagatla srinivas.kandaga...@linaro.org: A recursive lockdep warning occurs if you call regulator_set_voltage() on a load switches that are modelled as regulators with a parent supply as there is no nesting annotation for the rdev-mutex. To avoid this