Re: [PATCH 1/2] clk: imx: do not sleep if IRQ's are still disabled

2016-06-12 Thread Dong Aisheng
On Thu, Jun 09, 2016 at 10:08:01PM +0200, Thomas Gleixner wrote: > On Tue, 7 Jun 2016, Dong Aisheng wrote: > > Then it may need introduce a lot changes and increase many new core APIs. > > Is that a problem? > > No. That's all better than each driver having broken workarounds. It's a > common prob

Re: [PATCH 1/2] clk: imx: do not sleep if IRQ's are still disabled

2016-06-09 Thread Thomas Gleixner
On Thu, 9 Jun 2016, Stefan Agner wrote: > On 2016-06-09 13:08, Thomas Gleixner wrote: > > On Tue, 7 Jun 2016, Dong Aisheng wrote: > >> Then it may need introduce a lot changes and increase many new core APIs. > >> Is that a problem? > > > > No. That's all better than each driver having broken work

Re: [PATCH 1/2] clk: imx: do not sleep if IRQ's are still disabled

2016-06-09 Thread Stefan Agner
On 2016-06-09 13:08, Thomas Gleixner wrote: > On Tue, 7 Jun 2016, Dong Aisheng wrote: >> Then it may need introduce a lot changes and increase many new core APIs. >> Is that a problem? > > No. That's all better than each driver having broken workarounds. It's a > common problem so it wants to be a

Re: [PATCH 1/2] clk: imx: do not sleep if IRQ's are still disabled

2016-06-09 Thread Thomas Gleixner
On Tue, 7 Jun 2016, Dong Aisheng wrote: > Then it may need introduce a lot changes and increase many new core APIs. > Is that a problem? No. That's all better than each driver having broken workarounds. It's a common problem so it wants to be addressed at the core level. There you have a central p

Re: [PATCH 1/2] clk: imx: do not sleep if IRQ's are still disabled

2016-06-07 Thread Dong Aisheng
On Mon, Jun 06, 2016 at 03:20:03PM +0200, Thomas Gleixner wrote: > On Thu, 2 Jun 2016, Dong Aisheng wrote: > > On Wed, Apr 27, 2016 at 12:15:00PM +0200, Thomas Gleixner wrote: > > > Calling a function which might sleep _BEFORE_ kernel_init() is wrong. > > > Don't > > > try to work around such an i

Re: [PATCH 1/2] clk: imx: do not sleep if IRQ's are still disabled

2016-06-06 Thread Thomas Gleixner
On Thu, 2 Jun 2016, Dong Aisheng wrote: > On Wed, Apr 27, 2016 at 12:15:00PM +0200, Thomas Gleixner wrote: > > Calling a function which might sleep _BEFORE_ kernel_init() is wrong. Don't > > try to work around such an issue by doing magic irq_disabled() checks and > > busy > > loops. Fix the call

Re: [PATCH 1/2] clk: imx: do not sleep if IRQ's are still disabled

2016-06-02 Thread Dong Aisheng
Hi Thomas, On Wed, Apr 27, 2016 at 12:15:00PM +0200, Thomas Gleixner wrote: > On Wed, 27 Apr 2016, Dong Aisheng wrote: > > On Wed, Apr 27, 2016 at 9:58 AM, Shawn Guo wrote: > > > On Tue, Apr 26, 2016 at 07:27:03PM +0800, Dong Aisheng wrote: > > >> Shawn, > > >> What's your suggestion? > > > > > >

Re: [PATCH 1/2] clk: imx: do not sleep if IRQ's are still disabled

2016-05-25 Thread Stefan Agner
On 2016-04-27 03:15, Thomas Gleixner wrote: > On Wed, 27 Apr 2016, Dong Aisheng wrote: >> Why Stefan's patch works (checking irqs_disabled()) is because during kernel >> time init, the irq is still not enabled. It fixes the issue indirectly. >> See: >> asmlinkage __visible void __init start_kernel(

Re: [PATCH 1/2] clk: imx: do not sleep if IRQ's are still disabled

2016-04-27 Thread Thomas Gleixner
On Wed, 27 Apr 2016, Dong Aisheng wrote: > On Wed, Apr 27, 2016 at 9:58 AM, Shawn Guo wrote: > > On Tue, Apr 26, 2016 at 07:27:03PM +0800, Dong Aisheng wrote: > >> Shawn, > >> What's your suggestion? > > > > I think this needs more discussion, and I just dropped Stefan's patch > > from my tree. >

Re: [PATCH 1/2] clk: imx: do not sleep if IRQ's are still disabled

2016-04-27 Thread Dong Aisheng
On Wed, Apr 27, 2016 at 3:34 PM, Stefan Agner wrote: > On 2016-04-26 19:57, Dong Aisheng wrote: >> On Wed, Apr 27, 2016 at 9:58 AM, Shawn Guo wrote: >>> On Tue, Apr 26, 2016 at 07:27:03PM +0800, Dong Aisheng wrote: Shawn, What's your suggestion? >>> >>> I think this needs more discussio

Re: [PATCH 1/2] clk: imx: do not sleep if IRQ's are still disabled

2016-04-27 Thread Dong Aisheng
On Wed, Apr 27, 2016 at 3:28 PM, Stefan Agner wrote: > On 2016-04-26 19:56, Fabio Estevam wrote: >> On Tue, Apr 26, 2016 at 11:45 PM, Dong Aisheng wrote: >> We need to firstly understand why this is happening. The .prepare hook is defined to be non-atomic context, and so that we call s

Re: [PATCH 1/2] clk: imx: do not sleep if IRQ's are still disabled

2016-04-27 Thread Dong Aisheng
On Wed, Apr 27, 2016 at 3:24 PM, Shawn Guo wrote: > On Wed, Apr 27, 2016 at 10:57:21AM +0800, Dong Aisheng wrote: >> On Wed, Apr 27, 2016 at 9:58 AM, Shawn Guo wrote: >> > On Tue, Apr 26, 2016 at 07:27:03PM +0800, Dong Aisheng wrote: >> >> Shawn, >> >> What's your suggestion? >> > >> > I think th

Re: [PATCH 1/2] clk: imx: do not sleep if IRQ's are still disabled

2016-04-27 Thread Stefan Agner
On 2016-04-26 19:57, Dong Aisheng wrote: > On Wed, Apr 27, 2016 at 9:58 AM, Shawn Guo wrote: >> On Tue, Apr 26, 2016 at 07:27:03PM +0800, Dong Aisheng wrote: >>> Shawn, >>> What's your suggestion? >> >> I think this needs more discussion, and I just dropped Stefan's patch >> from my tree. >> >> We

Re: [PATCH 1/2] clk: imx: do not sleep if IRQ's are still disabled

2016-04-27 Thread Stefan Agner
On 2016-04-26 19:56, Fabio Estevam wrote: > On Tue, Apr 26, 2016 at 11:45 PM, Dong Aisheng wrote: > >>> We need to firstly understand why this is happening. The .prepare hook >>> is defined to be non-atomic context, and so that we call sleep function >>> in there. We did everything right. Why

Re: [PATCH 1/2] clk: imx: do not sleep if IRQ's are still disabled

2016-04-27 Thread Stefan Agner
On 2016-04-27 00:24, Shawn Guo wrote: > On Wed, Apr 27, 2016 at 10:57:21AM +0800, Dong Aisheng wrote: >> On Wed, Apr 27, 2016 at 9:58 AM, Shawn Guo wrote: >> > On Tue, Apr 26, 2016 at 07:27:03PM +0800, Dong Aisheng wrote: >> >> Shawn, >> >> What's your suggestion? >> > >> > I think this needs more

Re: [PATCH 1/2] clk: imx: do not sleep if IRQ's are still disabled

2016-04-27 Thread Shawn Guo
On Wed, Apr 27, 2016 at 10:57:21AM +0800, Dong Aisheng wrote: > On Wed, Apr 27, 2016 at 9:58 AM, Shawn Guo wrote: > > On Tue, Apr 26, 2016 at 07:27:03PM +0800, Dong Aisheng wrote: > >> Shawn, > >> What's your suggestion? > > > > I think this needs more discussion, and I just dropped Stefan's patch

Re: [PATCH 1/2] clk: imx: do not sleep if IRQ's are still disabled

2016-04-26 Thread Dong Aisheng
On Wed, Apr 27, 2016 at 9:58 AM, Shawn Guo wrote: > On Tue, Apr 26, 2016 at 07:27:03PM +0800, Dong Aisheng wrote: >> Shawn, >> What's your suggestion? > > I think this needs more discussion, and I just dropped Stefan's patch > from my tree. > > We need to firstly understand why this is happening.

Re: [PATCH 1/2] clk: imx: do not sleep if IRQ's are still disabled

2016-04-26 Thread Fabio Estevam
On Tue, Apr 26, 2016 at 11:45 PM, Dong Aisheng wrote: >> We need to firstly understand why this is happening. The .prepare hook >> is defined to be non-atomic context, and so that we call sleep function >> in there. We did everything right. Why are we getting the warning? If >> I'm correct, t

Re: [PATCH 1/2] clk: imx: do not sleep if IRQ's are still disabled

2016-04-26 Thread Dong Aisheng
On Wed, Apr 27, 2016 at 9:58 AM, Shawn Guo wrote: > On Tue, Apr 26, 2016 at 07:27:03PM +0800, Dong Aisheng wrote: >> Shawn, >> What's your suggestion? > > I think this needs more discussion, and I just dropped Stefan's patch > from my tree. > > We need to firstly understand why this is happening.

Re: [PATCH 1/2] clk: imx: do not sleep if IRQ's are still disabled

2016-04-26 Thread Shawn Guo
On Tue, Apr 26, 2016 at 07:27:03PM +0800, Dong Aisheng wrote: > Shawn, > What's your suggestion? I think this needs more discussion, and I just dropped Stefan's patch from my tree. We need to firstly understand why this is happening. The .prepare hook is defined to be non-atomic context, and so

Re: [PATCH 1/2] clk: imx: do not sleep if IRQ's are still disabled

2016-04-26 Thread Stefan Agner
On 2016-01-29 17:16, Stephen Boyd wrote: > On 01/29, Stefan Agner wrote: >> If a clock gets enabled early during boot time, it can lead to a PLL >> startup. The wait_lock function makes sure that the PLL is really >> stareted up before it gets used. However, the function sleeps which >> leads to sc

Re: [PATCH 1/2] clk: imx: do not sleep if IRQ's are still disabled

2016-04-26 Thread Dong Aisheng
On Tue, Apr 26, 2016 at 7:16 PM, Dong Aisheng wrote: > On Tue, Apr 26, 2016 at 5:31 PM, Lucas Stach wrote: >> Am Dienstag, den 26.04.2016, 13:51 +0800 schrieb Dong Aisheng: >>> Hi Shawn, >>> >>> On Tue, Apr 26, 2016 at 9:23 AM, Shawn Guo wrote: >>> > On Thu, Apr 21, 2016 at 11:45:20AM +0800, Don

Re: [PATCH 1/2] clk: imx: do not sleep if IRQ's are still disabled

2016-04-26 Thread Dong Aisheng
On Tue, Apr 26, 2016 at 5:31 PM, Lucas Stach wrote: > Am Dienstag, den 26.04.2016, 13:51 +0800 schrieb Dong Aisheng: >> Hi Shawn, >> >> On Tue, Apr 26, 2016 at 9:23 AM, Shawn Guo wrote: >> > On Thu, Apr 21, 2016 at 11:45:20AM +0800, Dong Aisheng wrote: >> >> On Fri, Jan 29, 2016 at 02:49:23PM -08

Re: [PATCH 1/2] clk: imx: do not sleep if IRQ's are still disabled

2016-04-26 Thread Lucas Stach
Am Dienstag, den 26.04.2016, 13:51 +0800 schrieb Dong Aisheng: > Hi Shawn, > > On Tue, Apr 26, 2016 at 9:23 AM, Shawn Guo wrote: > > On Thu, Apr 21, 2016 at 11:45:20AM +0800, Dong Aisheng wrote: > >> On Fri, Jan 29, 2016 at 02:49:23PM -0800, Stefan Agner wrote: > >> > If a clock gets enabled earl

Re: [PATCH 1/2] clk: imx: do not sleep if IRQ's are still disabled

2016-04-26 Thread Shawn Guo
On Tue, Apr 26, 2016 at 01:51:13PM +0800, Dong Aisheng wrote: > Hi Shawn, > > On Tue, Apr 26, 2016 at 9:23 AM, Shawn Guo wrote: > > On Thu, Apr 21, 2016 at 11:45:20AM +0800, Dong Aisheng wrote: > >> On Fri, Jan 29, 2016 at 02:49:23PM -0800, Stefan Agner wrote: > >> > If a clock gets enabled early

Re: [PATCH 1/2] clk: imx: do not sleep if IRQ's are still disabled

2016-04-25 Thread Dong Aisheng
Hi Shawn, On Tue, Apr 26, 2016 at 9:23 AM, Shawn Guo wrote: > On Thu, Apr 21, 2016 at 11:45:20AM +0800, Dong Aisheng wrote: >> On Fri, Jan 29, 2016 at 02:49:23PM -0800, Stefan Agner wrote: >> > If a clock gets enabled early during boot time, it can lead to a PLL >> > startup. The wait_lock functi

Re: [PATCH 1/2] clk: imx: do not sleep if IRQ's are still disabled

2016-04-25 Thread Shawn Guo
On Thu, Apr 21, 2016 at 11:45:20AM +0800, Dong Aisheng wrote: > On Fri, Jan 29, 2016 at 02:49:23PM -0800, Stefan Agner wrote: > > If a clock gets enabled early during boot time, it can lead to a PLL > > startup. The wait_lock function makes sure that the PLL is really > > stareted up before it gets

Re: [PATCH 1/2] clk: imx: do not sleep if IRQ's are still disabled

2016-04-20 Thread Dong Aisheng
On Fri, Jan 29, 2016 at 02:49:23PM -0800, Stefan Agner wrote: > If a clock gets enabled early during boot time, it can lead to a PLL > startup. The wait_lock function makes sure that the PLL is really > stareted up before it gets used. However, the function sleeps which > leads to scheduling and an

Re: [PATCH 1/2] clk: imx: do not sleep if IRQ's are still disabled

2016-04-17 Thread Shawn Guo
On Fri, Apr 15, 2016 at 06:00:53PM -0700, Stephen Boyd wrote: > On 01/29, Stefan Agner wrote: > > If a clock gets enabled early during boot time, it can lead to a PLL > > startup. The wait_lock function makes sure that the PLL is really > > stareted up before it gets used. However, the function sle

Re: [PATCH 1/2] clk: imx: do not sleep if IRQ's are still disabled

2016-04-15 Thread Stephen Boyd
On 01/29, Stefan Agner wrote: > If a clock gets enabled early during boot time, it can lead to a PLL > startup. The wait_lock function makes sure that the PLL is really > stareted up before it gets used. However, the function sleeps which > leads to scheduling and an error: > bad: scheduling from t

Re: [PATCH 1/2] clk: imx: do not sleep if IRQ's are still disabled

2016-01-29 Thread Stephen Boyd
On 01/29, Stefan Agner wrote: > If a clock gets enabled early during boot time, it can lead to a PLL > startup. The wait_lock function makes sure that the PLL is really > stareted up before it gets used. However, the function sleeps which > leads to scheduling and an error: > bad: scheduling from t

Re: [PATCH 1/2] clk: imx: do not sleep if IRQ's are still disabled

2016-01-29 Thread Joshua Clayton
On Fri, 29 Jan 2016 14:49:23 -0800 Stefan Agner wrote: > If a clock gets enabled early during boot time, it can lead to a PLL > startup. The wait_lock function makes sure that the PLL is really > stareted up before it gets used. However, the function sleeps which s/stareted/started/

[PATCH 1/2] clk: imx: do not sleep if IRQ's are still disabled

2016-01-29 Thread Stefan Agner
If a clock gets enabled early during boot time, it can lead to a PLL startup. The wait_lock function makes sure that the PLL is really stareted up before it gets used. However, the function sleeps which leads to scheduling and an error: bad: scheduling from the idle thread! ... Use udelay in case