Re: clk: Per controller locks (prepare & enable)

2016-07-07 Thread Charles Keepax
On Thu, Jul 07, 2016 at 02:42:17PM +0200, Krzysztof Kozlowski wrote: > On 07/07/2016 02:06 PM, Charles Keepax wrote: > > On Tue, Jul 05, 2016 at 09:48:34AM -0400, Javier Martinez Canillas wrote: > >> Hello Krzysztof, > >> > >> On 07/05/2016 02:33 AM, Krzysztof Kozlowski wrote: > >>> On 07/04/2016

Re: clk: Per controller locks (prepare & enable)

2016-07-07 Thread Charles Keepax
On Thu, Jul 07, 2016 at 02:42:17PM +0200, Krzysztof Kozlowski wrote: > On 07/07/2016 02:06 PM, Charles Keepax wrote: > > On Tue, Jul 05, 2016 at 09:48:34AM -0400, Javier Martinez Canillas wrote: > >> Hello Krzysztof, > >> > >> On 07/05/2016 02:33 AM, Krzysztof Kozlowski wrote: > >>> On 07/04/2016

Re: clk: Per controller locks (prepare & enable)

2016-07-07 Thread Krzysztof Kozlowski
On 07/07/2016 02:06 PM, Charles Keepax wrote: > On Tue, Jul 05, 2016 at 09:48:34AM -0400, Javier Martinez Canillas wrote: >> Hello Krzysztof, >> >> On 07/05/2016 02:33 AM, Krzysztof Kozlowski wrote: >>> On 07/04/2016 05:15 PM, Javier Martinez Canillas wrote: >> >> [snip] > > I have also been have

Re: clk: Per controller locks (prepare & enable)

2016-07-07 Thread Krzysztof Kozlowski
On 07/07/2016 02:06 PM, Charles Keepax wrote: > On Tue, Jul 05, 2016 at 09:48:34AM -0400, Javier Martinez Canillas wrote: >> Hello Krzysztof, >> >> On 07/05/2016 02:33 AM, Krzysztof Kozlowski wrote: >>> On 07/04/2016 05:15 PM, Javier Martinez Canillas wrote: >> >> [snip] > > I have also been have

Re: clk: Per controller locks (prepare & enable)

2016-07-07 Thread Charles Keepax
On Tue, Jul 05, 2016 at 09:48:34AM -0400, Javier Martinez Canillas wrote: > Hello Krzysztof, > > On 07/05/2016 02:33 AM, Krzysztof Kozlowski wrote: > > On 07/04/2016 05:15 PM, Javier Martinez Canillas wrote: > > [snip] I have also been have a brief look at this as we have been encountering

Re: clk: Per controller locks (prepare & enable)

2016-07-07 Thread Charles Keepax
On Tue, Jul 05, 2016 at 09:48:34AM -0400, Javier Martinez Canillas wrote: > Hello Krzysztof, > > On 07/05/2016 02:33 AM, Krzysztof Kozlowski wrote: > > On 07/04/2016 05:15 PM, Javier Martinez Canillas wrote: > > [snip] I have also been have a brief look at this as we have been encountering

Re: clk: Per controller locks (prepare & enable)

2016-07-05 Thread Javier Martinez Canillas
Hello Krzysztof, On 07/05/2016 02:33 AM, Krzysztof Kozlowski wrote: > On 07/04/2016 05:15 PM, Javier Martinez Canillas wrote: [snip] >> >> Yes, splitting the lock per controller will fix the possible deadlock in >> this case but I think we need an approach that is safe for all possible >>

Re: clk: Per controller locks (prepare & enable)

2016-07-05 Thread Javier Martinez Canillas
Hello Krzysztof, On 07/05/2016 02:33 AM, Krzysztof Kozlowski wrote: > On 07/04/2016 05:15 PM, Javier Martinez Canillas wrote: [snip] >> >> Yes, splitting the lock per controller will fix the possible deadlock in >> this case but I think we need an approach that is safe for all possible >>

Re: clk: Per controller locks (prepare & enable)

2016-07-05 Thread Krzysztof Kozlowski
On 07/04/2016 05:15 PM, Javier Martinez Canillas wrote: > Hello Krzysztof, > > On 07/04/2016 04:24 AM, Krzysztof Kozlowski wrote: >> On 06/30/2016 06:22 PM, Javier Martinez Canillas wrote: Question: What do you think about it? I know that talk is cheap and code looks better but

Re: clk: Per controller locks (prepare & enable)

2016-07-05 Thread Krzysztof Kozlowski
On 07/04/2016 05:15 PM, Javier Martinez Canillas wrote: > Hello Krzysztof, > > On 07/04/2016 04:24 AM, Krzysztof Kozlowski wrote: >> On 06/30/2016 06:22 PM, Javier Martinez Canillas wrote: Question: What do you think about it? I know that talk is cheap and code looks better but

Re: clk: Per controller locks (prepare & enable)

2016-07-04 Thread Javier Martinez Canillas
On 07/04/2016 11:15 AM, Javier Martinez Canillas wrote: > > But I'm very far from being a lock expert so maybe my assumptions are wrong, I meant *clock* here, sorry for the typo. > I'll let Stephen and Mike to comment on this. > Best regards, -- Javier Martinez Canillas Open Source Group

Re: clk: Per controller locks (prepare & enable)

2016-07-04 Thread Javier Martinez Canillas
On 07/04/2016 11:15 AM, Javier Martinez Canillas wrote: > > But I'm very far from being a lock expert so maybe my assumptions are wrong, I meant *clock* here, sorry for the typo. > I'll let Stephen and Mike to comment on this. > Best regards, -- Javier Martinez Canillas Open Source Group

Re: clk: Per controller locks (prepare & enable)

2016-07-04 Thread Javier Martinez Canillas
Hello Krzysztof, On 07/04/2016 04:24 AM, Krzysztof Kozlowski wrote: > On 06/30/2016 06:22 PM, Javier Martinez Canillas wrote: >>> Question: >>> What do you think about it? I know that talk is cheap and code looks >>> better but before starting the work I would like to hear some >>>

Re: clk: Per controller locks (prepare & enable)

2016-07-04 Thread Javier Martinez Canillas
Hello Krzysztof, On 07/04/2016 04:24 AM, Krzysztof Kozlowski wrote: > On 06/30/2016 06:22 PM, Javier Martinez Canillas wrote: >>> Question: >>> What do you think about it? I know that talk is cheap and code looks >>> better but before starting the work I would like to hear some >>>

Re: clk: Per controller locks (prepare & enable)

2016-07-04 Thread Krzysztof Kozlowski
On 06/30/2016 06:22 PM, Javier Martinez Canillas wrote: >> Question: >> What do you think about it? I know that talk is cheap and code looks >> better but before starting the work I would like to hear some >> comments/opinions/ideas. >> > > The problem is that the enable and prepare operations

Re: clk: Per controller locks (prepare & enable)

2016-07-04 Thread Krzysztof Kozlowski
On 06/30/2016 06:22 PM, Javier Martinez Canillas wrote: >> Question: >> What do you think about it? I know that talk is cheap and code looks >> better but before starting the work I would like to hear some >> comments/opinions/ideas. >> > > The problem is that the enable and prepare operations

Re: clk: Per controller locks (prepare & enable)

2016-06-30 Thread Javier Martinez Canillas
Hello Krzysztof, On 06/29/2016 03:23 AM, Krzysztof Kozlowski wrote: > Hi, > > > Problems: > 1. Deadlocks on prepare lock in following scenario: > - prepare_enable(some external clock through i2c) >- i2c transfer > - prepare_enable(i2c lock in SoC) >- deadlock > See [1]. We

Re: clk: Per controller locks (prepare & enable)

2016-06-30 Thread Javier Martinez Canillas
Hello Krzysztof, On 06/29/2016 03:23 AM, Krzysztof Kozlowski wrote: > Hi, > > > Problems: > 1. Deadlocks on prepare lock in following scenario: > - prepare_enable(some external clock through i2c) >- i2c transfer > - prepare_enable(i2c lock in SoC) >- deadlock > See [1]. We

clk: Per controller locks (prepare & enable)

2016-06-29 Thread Krzysztof Kozlowski
Hi, Problems: 1. Deadlocks on prepare lock in following scenario: - prepare_enable(some external clock through i2c) - i2c transfer - prepare_enable(i2c lock in SoC) - deadlock See [1]. We implemented a workaround for this in few places like 10ff4c5239a1 ("i2c: exynos5: Fix

clk: Per controller locks (prepare & enable)

2016-06-29 Thread Krzysztof Kozlowski
Hi, Problems: 1. Deadlocks on prepare lock in following scenario: - prepare_enable(some external clock through i2c) - i2c transfer - prepare_enable(i2c lock in SoC) - deadlock See [1]. We implemented a workaround for this in few places like 10ff4c5239a1 ("i2c: exynos5: Fix