linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Re: next/master bisection: baseline.login on sun8i-h2-plus-orangepi-zero
       [not found] <5e4b4889.1c69fb81.bc072.65a9@mx.google.com>
@ 2020-02-18  7:45 ` Guillaume Tucker
  2020-02-19 23:49   ` Stephen Boyd
  0 siblings, 1 reply; 6+ messages in thread
From: Guillaume Tucker @ 2020-02-18  7:45 UTC (permalink / raw)
  To: Stephen Boyd, Jerome Brunet
  Cc: broonie, tomeu.vizoso, Michael Turquette, enric.balletbo,
	khilman, mgalka, linux-clk, linux-kernel

Hi Stephen,

Please see the bisection report below about a boot failure.

Reports aren't automatically sent to the public while we're
trialing new bisection features on kernelci.org but this one
looks valid.

There's nothing in the serial console log, probably because it's
crashing too early during boot.  I'm not sure if other platforms
on kernelci.org were hit by this in the same way, it's tricky to
tell partly because there is no output.  It should possible to
run it again with earlyprintk enabled in BayLibre's test lab
though.

Thanks,
Guillaume


On 18/02/2020 02:14, kernelci.org bot wrote:
> * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
> * This automated bisection report was sent to you on the basis  *
> * that you may be involved with the breaking commit it has      *
> * found.  No manual investigation has been done to verify it,   *
> * and the root cause of the problem may be somewhere else.      *
> *                                                               *
> * If you do send a fix, please include this trailer:            *
> *   Reported-by: "kernelci.org bot" <bot@kernelci.org>          *
> *                                                               *
> * Hope this helps!                                              *
> * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
> 
> next/master bisection: baseline.login on sun8i-h2-plus-orangepi-zero
> 
> Summary:
>   Start:      c25a951c50dc Add linux-next specific files for 20200217
>   Plain log:  https://storage.kernelci.org//next/master/next-20200217/arm/multi_v7_defconfig/gcc-8/lab-baylibre/baseline-sun8i-h2-plus-orangepi-zero.txt
>   HTML log:   https://storage.kernelci.org//next/master/next-20200217/arm/multi_v7_defconfig/gcc-8/lab-baylibre/baseline-sun8i-h2-plus-orangepi-zero.html
>   Result:     2760878662a2 clk: Bail out when calculating phase fails during clk registration
> 
> Checks:
>   revert:     PASS
>   verify:     PASS
> 
> Parameters:
>   Tree:       next
>   URL:        git://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
>   Branch:     master
>   Target:     sun8i-h2-plus-orangepi-zero
>   CPU arch:   arm
>   Lab:        lab-baylibre
>   Compiler:   gcc-8
>   Config:     multi_v7_defconfig
>   Test case:  baseline.login
> 
> Breaking commit found:
> 
> -------------------------------------------------------------------------------
> commit 2760878662a290ac57cff8a5a8d8bda8f4dddc37
> Author: Stephen Boyd <sboyd@kernel.org>
> Date:   Wed Feb 5 15:28:02 2020 -0800
> 
>     clk: Bail out when calculating phase fails during clk registration
>     
>     Bail out of clk registration if we fail to get the phase for a clk that
>     has a clk_ops::get_phase() callback. Print a warning too so that driver
>     authors can easily figure out that some clk is unable to read back phase
>     information at boot.
>     
>     Cc: Douglas Anderson <dianders@chromium.org>
>     Cc: Heiko Stuebner <heiko@sntech.de>
>     Suggested-by: Jerome Brunet <jbrunet@baylibre.com>
>     Signed-off-by: Stephen Boyd <sboyd@kernel.org>
>     Link: https://lkml.kernel.org/r/20200205232802.29184-5-sboyd@kernel.org
>     Acked-by: Jerome Brunet <jbrunet@baylibre.com>
> 
> diff --git a/drivers/clk/clk.c b/drivers/clk/clk.c
> index dc8bdfbd6a0c..ed1797857bae 100644
> --- a/drivers/clk/clk.c
> +++ b/drivers/clk/clk.c
> @@ -3457,7 +3457,12 @@ static int __clk_core_init(struct clk_core *core)
>  	 * Since a phase is by definition relative to its parent, just
>  	 * query the current clock phase, or just assume it's in phase.
>  	 */
> -	clk_core_get_phase(core);
> +	ret = clk_core_get_phase(core);
> +	if (ret < 0) {
> +		pr_warn("%s: Failed to get phase for clk '%s'\n", __func__,
> +			core->name);
> +		goto out;
> +	}
>  
>  	/*
>  	 * Set clk's duty cycle.
> -------------------------------------------------------------------------------
> 
> 
> Git bisection log:
> 
> -------------------------------------------------------------------------------
> git bisect start
> # good: [11a48a5a18c63fd7621bb050228cebf13566e4d8] Linux 5.6-rc2
> git bisect good 11a48a5a18c63fd7621bb050228cebf13566e4d8
> # bad: [c25a951c50dca1da4a449a985a9debd82dc18573] Add linux-next specific files for 20200217
> git bisect bad c25a951c50dca1da4a449a985a9debd82dc18573
> # bad: [5859c179b7ed01050641bd565959a2c4571923da] Merge remote-tracking branch 'swiotlb/linux-next'
> git bisect bad 5859c179b7ed01050641bd565959a2c4571923da
> # bad: [ecf5a6e1ec22ecbe1c9086f40130188f31e37a38] Merge remote-tracking branch 'xtensa/xtensa-for-next'
> git bisect bad ecf5a6e1ec22ecbe1c9086f40130188f31e37a38
> # good: [e475ff54b7d62c550768ce36617e8c8fec72cfc0] Merge remote-tracking branch 'reset/reset/next'
> git bisect good e475ff54b7d62c550768ce36617e8c8fec72cfc0
> # bad: [9e86f8cc2d2f464e27c172127e02641fe77eccea] Merge remote-tracking branch 'sh/sh-next'
> git bisect bad 9e86f8cc2d2f464e27c172127e02641fe77eccea
> # good: [1752d66d86600e9cb508612ded6984774b72321d] Merge remote-tracking branch 'tegra/for-next'
> git bisect good 1752d66d86600e9cb508612ded6984774b72321d
> # bad: [0ecb83df935b058a2c3727716a7fab539dbaba88] Merge remote-tracking branch 'csky/linux-next'
> git bisect bad 0ecb83df935b058a2c3727716a7fab539dbaba88
> # bad: [898fe3af935a45236cbfd053e79ae01506ae7aa2] Merge branch 'clk-formatting' into clk-next
> git bisect bad 898fe3af935a45236cbfd053e79ae01506ae7aa2
> # bad: [0d426990beac93127a4ee37cc056fce928466f7d] Merge branch 'clk-phase-errors' into clk-next
> git bisect bad 0d426990beac93127a4ee37cc056fce928466f7d
> # good: [6e37add6b938941f755928159ede3c9855307066] Merge branch 'clk-qcom' into clk-next
> git bisect good 6e37add6b938941f755928159ede3c9855307066
> # good: [5d98429bbebc5dc683ea6919d9b9e6e83e8c8867] Merge branch 'clk-fixes' into clk-next
> git bisect good 5d98429bbebc5dc683ea6919d9b9e6e83e8c8867
> # good: [768a5d4f63c29d3bed5abb3c187312fcf623fa05] clk: Use 'parent' to shorten lines in __clk_core_init()
> git bisect good 768a5d4f63c29d3bed5abb3c187312fcf623fa05
> # bad: [2760878662a290ac57cff8a5a8d8bda8f4dddc37] clk: Bail out when calculating phase fails during clk registration
> git bisect bad 2760878662a290ac57cff8a5a8d8bda8f4dddc37
> # good: [0daa376d832f4ce585f153efee4233b52fa3fe58] clk: Move rate and accuracy recalc to mostly consumer APIs
> git bisect good 0daa376d832f4ce585f153efee4233b52fa3fe58
> # first bad commit: [2760878662a290ac57cff8a5a8d8bda8f4dddc37] clk: Bail out when calculating phase fails during clk registration
> -------------------------------------------------------------------------------
> 


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: next/master bisection: baseline.login on sun8i-h2-plus-orangepi-zero
  2020-02-18  7:45 ` next/master bisection: baseline.login on sun8i-h2-plus-orangepi-zero Guillaume Tucker
@ 2020-02-19 23:49   ` Stephen Boyd
  2020-02-25 12:25     ` Guillaume Tucker
  2020-02-25 13:38     ` Maxime Ripard
  0 siblings, 2 replies; 6+ messages in thread
From: Stephen Boyd @ 2020-02-19 23:49 UTC (permalink / raw)
  To: Guillaume Tucker, Jerome Brunet, Maxime Ripard, Chen-Yu Tsai
  Cc: broonie, tomeu.vizoso, Michael Turquette, enric.balletbo,
	khilman, mgalka, linux-clk, linux-kernel

Adding some Allwinner folks. Presumably there is some sort of clk that
is failing to calculate a phase when it gets registered. Maybe that's
because the parent isn't registered yet?

Quoting Guillaume Tucker (2020-02-17 23:45:41)
> Hi Stephen,
> 
> Please see the bisection report below about a boot failure.
> 
> Reports aren't automatically sent to the public while we're
> trialing new bisection features on kernelci.org but this one
> looks valid.
> 
> There's nothing in the serial console log, probably because it's
> crashing too early during boot.  I'm not sure if other platforms
> on kernelci.org were hit by this in the same way, it's tricky to
> tell partly because there is no output.  It should possible to
> run it again with earlyprintk enabled in BayLibre's test lab
> though.
> 
> Thanks,
> Guillaume
> 
> 
> On 18/02/2020 02:14, kernelci.org bot wrote:
> > * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
> > * This automated bisection report was sent to you on the basis  *
> > * that you may be involved with the breaking commit it has      *
> > * found.  No manual investigation has been done to verify it,   *
> > * and the root cause of the problem may be somewhere else.      *
> > *                                                               *
> > * If you do send a fix, please include this trailer:            *
> > *   Reported-by: "kernelci.org bot" <bot@kernelci.org>          *
> > *                                                               *
> > * Hope this helps!                                              *
> > * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
> > 
> > next/master bisection: baseline.login on sun8i-h2-plus-orangepi-zero
> > 
> > Summary:
> >   Start:      c25a951c50dc Add linux-next specific files for 20200217
> >   Plain log:  https://storage.kernelci.org//next/master/next-20200217/arm/multi_v7_defconfig/gcc-8/lab-baylibre/baseline-sun8i-h2-plus-orangepi-zero.txt
> >   HTML log:   https://storage.kernelci.org//next/master/next-20200217/arm/multi_v7_defconfig/gcc-8/lab-baylibre/baseline-sun8i-h2-plus-orangepi-zero.html
> >   Result:     2760878662a2 clk: Bail out when calculating phase fails during clk registration
> > 
> > Checks:
> >   revert:     PASS
> >   verify:     PASS
> > 
> > Parameters:
> >   Tree:       next
> >   URL:        git://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
> >   Branch:     master
> >   Target:     sun8i-h2-plus-orangepi-zero
> >   CPU arch:   arm
> >   Lab:        lab-baylibre
> >   Compiler:   gcc-8
> >   Config:     multi_v7_defconfig
> >   Test case:  baseline.login
> > 
> > Breaking commit found:
> > 
> > -------------------------------------------------------------------------------
> > commit 2760878662a290ac57cff8a5a8d8bda8f4dddc37
> > Author: Stephen Boyd <sboyd@kernel.org>
> > Date:   Wed Feb 5 15:28:02 2020 -0800
> > 
> >     clk: Bail out when calculating phase fails during clk registration
> >     
> >     Bail out of clk registration if we fail to get the phase for a clk that
> >     has a clk_ops::get_phase() callback. Print a warning too so that driver
> >     authors can easily figure out that some clk is unable to read back phase
> >     information at boot.
> >     
> >     Cc: Douglas Anderson <dianders@chromium.org>
> >     Cc: Heiko Stuebner <heiko@sntech.de>
> >     Suggested-by: Jerome Brunet <jbrunet@baylibre.com>
> >     Signed-off-by: Stephen Boyd <sboyd@kernel.org>
> >     Link: https://lkml.kernel.org/r/20200205232802.29184-5-sboyd@kernel.org
> >     Acked-by: Jerome Brunet <jbrunet@baylibre.com>
> > 
> > diff --git a/drivers/clk/clk.c b/drivers/clk/clk.c
> > index dc8bdfbd6a0c..ed1797857bae 100644
> > --- a/drivers/clk/clk.c
> > +++ b/drivers/clk/clk.c
> > @@ -3457,7 +3457,12 @@ static int __clk_core_init(struct clk_core *core)
> >        * Since a phase is by definition relative to its parent, just
> >        * query the current clock phase, or just assume it's in phase.
> >        */
> > -     clk_core_get_phase(core);
> > +     ret = clk_core_get_phase(core);
> > +     if (ret < 0) {
> > +             pr_warn("%s: Failed to get phase for clk '%s'\n", __func__,
> > +                     core->name);
> > +             goto out;
> > +     }
> >  
> >       /*
> >        * Set clk's duty cycle.
> > -------------------------------------------------------------------------------
> > 
> > 
> > Git bisection log:
> > 
> > -------------------------------------------------------------------------------
> > git bisect start
> > # good: [11a48a5a18c63fd7621bb050228cebf13566e4d8] Linux 5.6-rc2
> > git bisect good 11a48a5a18c63fd7621bb050228cebf13566e4d8
> > # bad: [c25a951c50dca1da4a449a985a9debd82dc18573] Add linux-next specific files for 20200217
> > git bisect bad c25a951c50dca1da4a449a985a9debd82dc18573
> > # bad: [5859c179b7ed01050641bd565959a2c4571923da] Merge remote-tracking branch 'swiotlb/linux-next'
> > git bisect bad 5859c179b7ed01050641bd565959a2c4571923da
> > # bad: [ecf5a6e1ec22ecbe1c9086f40130188f31e37a38] Merge remote-tracking branch 'xtensa/xtensa-for-next'
> > git bisect bad ecf5a6e1ec22ecbe1c9086f40130188f31e37a38
> > # good: [e475ff54b7d62c550768ce36617e8c8fec72cfc0] Merge remote-tracking branch 'reset/reset/next'
> > git bisect good e475ff54b7d62c550768ce36617e8c8fec72cfc0
> > # bad: [9e86f8cc2d2f464e27c172127e02641fe77eccea] Merge remote-tracking branch 'sh/sh-next'
> > git bisect bad 9e86f8cc2d2f464e27c172127e02641fe77eccea
> > # good: [1752d66d86600e9cb508612ded6984774b72321d] Merge remote-tracking branch 'tegra/for-next'
> > git bisect good 1752d66d86600e9cb508612ded6984774b72321d
> > # bad: [0ecb83df935b058a2c3727716a7fab539dbaba88] Merge remote-tracking branch 'csky/linux-next'
> > git bisect bad 0ecb83df935b058a2c3727716a7fab539dbaba88
> > # bad: [898fe3af935a45236cbfd053e79ae01506ae7aa2] Merge branch 'clk-formatting' into clk-next
> > git bisect bad 898fe3af935a45236cbfd053e79ae01506ae7aa2
> > # bad: [0d426990beac93127a4ee37cc056fce928466f7d] Merge branch 'clk-phase-errors' into clk-next
> > git bisect bad 0d426990beac93127a4ee37cc056fce928466f7d
> > # good: [6e37add6b938941f755928159ede3c9855307066] Merge branch 'clk-qcom' into clk-next
> > git bisect good 6e37add6b938941f755928159ede3c9855307066
> > # good: [5d98429bbebc5dc683ea6919d9b9e6e83e8c8867] Merge branch 'clk-fixes' into clk-next
> > git bisect good 5d98429bbebc5dc683ea6919d9b9e6e83e8c8867
> > # good: [768a5d4f63c29d3bed5abb3c187312fcf623fa05] clk: Use 'parent' to shorten lines in __clk_core_init()
> > git bisect good 768a5d4f63c29d3bed5abb3c187312fcf623fa05
> > # bad: [2760878662a290ac57cff8a5a8d8bda8f4dddc37] clk: Bail out when calculating phase fails during clk registration
> > git bisect bad 2760878662a290ac57cff8a5a8d8bda8f4dddc37
> > # good: [0daa376d832f4ce585f153efee4233b52fa3fe58] clk: Move rate and accuracy recalc to mostly consumer APIs
> > git bisect good 0daa376d832f4ce585f153efee4233b52fa3fe58
> > # first bad commit: [2760878662a290ac57cff8a5a8d8bda8f4dddc37] clk: Bail out when calculating phase fails during clk registration
> > -------------------------------------------------------------------------------
> > 
>

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: next/master bisection: baseline.login on sun8i-h2-plus-orangepi-zero
  2020-02-19 23:49   ` Stephen Boyd
@ 2020-02-25 12:25     ` Guillaume Tucker
  2020-02-25 13:38     ` Maxime Ripard
  1 sibling, 0 replies; 6+ messages in thread
From: Guillaume Tucker @ 2020-02-25 12:25 UTC (permalink / raw)
  To: Stephen Boyd, Jerome Brunet, Maxime Ripard, Chen-Yu Tsai
  Cc: broonie, tomeu.vizoso, Michael Turquette, enric.balletbo,
	khilman, mgalka, linux-clk, linux-kernel

On 19/02/2020 23:49, Stephen Boyd wrote:
> Adding some Allwinner folks. Presumably there is some sort of clk that
> is failing to calculate a phase when it gets registered. Maybe that's
> because the parent isn't registered yet?

FYI this is still happening on several Allwinner boards:

On 25/02/2020 11:57, kernelci.org bot wrote:
> next/master bisection: baseline.login on sun7i-a20-cubieboard2
> 
> Summary:
>   Start:      c99b17ac03994 Add linux-next specific files for 20200225
>   Plain log:  https://storage.kernelci.org//next/master/next-20200225/arm/multi_v7_defconfig/gcc-8/lab-baylibre/baseline-sun7i-a20-cubieboard2.txt
>   HTML log:   https://storage.kernelci.org//next/master/next-20200225/arm/multi_v7_defconfig/gcc-8/lab-baylibre/baseline-sun7i-a20-cubieboard2.html
>   Result:     2760878662a29 clk: Bail out when calculating phase fails during clk registration
> 
> Checks:
>   revert:     PASS
>   verify:     PASS
> 
> Parameters:
>   Tree:       next
>   URL:        git://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
>   Branch:     master
>   Target:     sun7i-a20-cubieboard2
>   CPU arch:   arm
>   Lab:        lab-baylibre
>   Compiler:   gcc-8
>   Config:     multi_v7_defconfig
>   Test case:  baseline.login

Guillaume

> Quoting Guillaume Tucker (2020-02-17 23:45:41)
>> Hi Stephen,
>>
>> Please see the bisection report below about a boot failure.
>>
>> Reports aren't automatically sent to the public while we're
>> trialing new bisection features on kernelci.org but this one
>> looks valid.
>>
>> There's nothing in the serial console log, probably because it's
>> crashing too early during boot.  I'm not sure if other platforms
>> on kernelci.org were hit by this in the same way, it's tricky to
>> tell partly because there is no output.  It should possible to
>> run it again with earlyprintk enabled in BayLibre's test lab
>> though.
>>
>> Thanks,
>> Guillaume
>>
>>
>> On 18/02/2020 02:14, kernelci.org bot wrote:
>>> * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
>>> * This automated bisection report was sent to you on the basis  *
>>> * that you may be involved with the breaking commit it has      *
>>> * found.  No manual investigation has been done to verify it,   *
>>> * and the root cause of the problem may be somewhere else.      *
>>> *                                                               *
>>> * If you do send a fix, please include this trailer:            *
>>> *   Reported-by: "kernelci.org bot" <bot@kernelci.org>          *
>>> *                                                               *
>>> * Hope this helps!                                              *
>>> * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
>>>
>>> next/master bisection: baseline.login on sun8i-h2-plus-orangepi-zero
>>>
>>> Summary:
>>>   Start:      c25a951c50dc Add linux-next specific files for 20200217
>>>   Plain log:  https://storage.kernelci.org//next/master/next-20200217/arm/multi_v7_defconfig/gcc-8/lab-baylibre/baseline-sun8i-h2-plus-orangepi-zero.txt
>>>   HTML log:   https://storage.kernelci.org//next/master/next-20200217/arm/multi_v7_defconfig/gcc-8/lab-baylibre/baseline-sun8i-h2-plus-orangepi-zero.html
>>>   Result:     2760878662a2 clk: Bail out when calculating phase fails during clk registration
>>>
>>> Checks:
>>>   revert:     PASS
>>>   verify:     PASS
>>>
>>> Parameters:
>>>   Tree:       next
>>>   URL:        git://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
>>>   Branch:     master
>>>   Target:     sun8i-h2-plus-orangepi-zero
>>>   CPU arch:   arm
>>>   Lab:        lab-baylibre
>>>   Compiler:   gcc-8
>>>   Config:     multi_v7_defconfig
>>>   Test case:  baseline.login
>>>
>>> Breaking commit found:
>>>
>>> -------------------------------------------------------------------------------
>>> commit 2760878662a290ac57cff8a5a8d8bda8f4dddc37
>>> Author: Stephen Boyd <sboyd@kernel.org>
>>> Date:   Wed Feb 5 15:28:02 2020 -0800
>>>
>>>     clk: Bail out when calculating phase fails during clk registration
>>>     
>>>     Bail out of clk registration if we fail to get the phase for a clk that
>>>     has a clk_ops::get_phase() callback. Print a warning too so that driver
>>>     authors can easily figure out that some clk is unable to read back phase
>>>     information at boot.
>>>     
>>>     Cc: Douglas Anderson <dianders@chromium.org>
>>>     Cc: Heiko Stuebner <heiko@sntech.de>
>>>     Suggested-by: Jerome Brunet <jbrunet@baylibre.com>
>>>     Signed-off-by: Stephen Boyd <sboyd@kernel.org>
>>>     Link: https://lkml.kernel.org/r/20200205232802.29184-5-sboyd@kernel.org
>>>     Acked-by: Jerome Brunet <jbrunet@baylibre.com>
>>>
>>> diff --git a/drivers/clk/clk.c b/drivers/clk/clk.c
>>> index dc8bdfbd6a0c..ed1797857bae 100644
>>> --- a/drivers/clk/clk.c
>>> +++ b/drivers/clk/clk.c
>>> @@ -3457,7 +3457,12 @@ static int __clk_core_init(struct clk_core *core)
>>>        * Since a phase is by definition relative to its parent, just
>>>        * query the current clock phase, or just assume it's in phase.
>>>        */
>>> -     clk_core_get_phase(core);
>>> +     ret = clk_core_get_phase(core);
>>> +     if (ret < 0) {
>>> +             pr_warn("%s: Failed to get phase for clk '%s'\n", __func__,
>>> +                     core->name);
>>> +             goto out;
>>> +     }
>>>  
>>>       /*
>>>        * Set clk's duty cycle.
>>> -------------------------------------------------------------------------------
>>>
>>>
>>> Git bisection log:
>>>
>>> -------------------------------------------------------------------------------
>>> git bisect start
>>> # good: [11a48a5a18c63fd7621bb050228cebf13566e4d8] Linux 5.6-rc2
>>> git bisect good 11a48a5a18c63fd7621bb050228cebf13566e4d8
>>> # bad: [c25a951c50dca1da4a449a985a9debd82dc18573] Add linux-next specific files for 20200217
>>> git bisect bad c25a951c50dca1da4a449a985a9debd82dc18573
>>> # bad: [5859c179b7ed01050641bd565959a2c4571923da] Merge remote-tracking branch 'swiotlb/linux-next'
>>> git bisect bad 5859c179b7ed01050641bd565959a2c4571923da
>>> # bad: [ecf5a6e1ec22ecbe1c9086f40130188f31e37a38] Merge remote-tracking branch 'xtensa/xtensa-for-next'
>>> git bisect bad ecf5a6e1ec22ecbe1c9086f40130188f31e37a38
>>> # good: [e475ff54b7d62c550768ce36617e8c8fec72cfc0] Merge remote-tracking branch 'reset/reset/next'
>>> git bisect good e475ff54b7d62c550768ce36617e8c8fec72cfc0
>>> # bad: [9e86f8cc2d2f464e27c172127e02641fe77eccea] Merge remote-tracking branch 'sh/sh-next'
>>> git bisect bad 9e86f8cc2d2f464e27c172127e02641fe77eccea
>>> # good: [1752d66d86600e9cb508612ded6984774b72321d] Merge remote-tracking branch 'tegra/for-next'
>>> git bisect good 1752d66d86600e9cb508612ded6984774b72321d
>>> # bad: [0ecb83df935b058a2c3727716a7fab539dbaba88] Merge remote-tracking branch 'csky/linux-next'
>>> git bisect bad 0ecb83df935b058a2c3727716a7fab539dbaba88
>>> # bad: [898fe3af935a45236cbfd053e79ae01506ae7aa2] Merge branch 'clk-formatting' into clk-next
>>> git bisect bad 898fe3af935a45236cbfd053e79ae01506ae7aa2
>>> # bad: [0d426990beac93127a4ee37cc056fce928466f7d] Merge branch 'clk-phase-errors' into clk-next
>>> git bisect bad 0d426990beac93127a4ee37cc056fce928466f7d
>>> # good: [6e37add6b938941f755928159ede3c9855307066] Merge branch 'clk-qcom' into clk-next
>>> git bisect good 6e37add6b938941f755928159ede3c9855307066
>>> # good: [5d98429bbebc5dc683ea6919d9b9e6e83e8c8867] Merge branch 'clk-fixes' into clk-next
>>> git bisect good 5d98429bbebc5dc683ea6919d9b9e6e83e8c8867
>>> # good: [768a5d4f63c29d3bed5abb3c187312fcf623fa05] clk: Use 'parent' to shorten lines in __clk_core_init()
>>> git bisect good 768a5d4f63c29d3bed5abb3c187312fcf623fa05
>>> # bad: [2760878662a290ac57cff8a5a8d8bda8f4dddc37] clk: Bail out when calculating phase fails during clk registration
>>> git bisect bad 2760878662a290ac57cff8a5a8d8bda8f4dddc37
>>> # good: [0daa376d832f4ce585f153efee4233b52fa3fe58] clk: Move rate and accuracy recalc to mostly consumer APIs
>>> git bisect good 0daa376d832f4ce585f153efee4233b52fa3fe58
>>> # first bad commit: [2760878662a290ac57cff8a5a8d8bda8f4dddc37] clk: Bail out when calculating phase fails during clk registration
>>> -------------------------------------------------------------------------------
>>>
>>


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: next/master bisection: baseline.login on sun8i-h2-plus-orangepi-zero
  2020-02-19 23:49   ` Stephen Boyd
  2020-02-25 12:25     ` Guillaume Tucker
@ 2020-02-25 13:38     ` Maxime Ripard
  2020-02-26 17:15       ` Enric Balletbo Serra
  1 sibling, 1 reply; 6+ messages in thread
From: Maxime Ripard @ 2020-02-25 13:38 UTC (permalink / raw)
  To: Stephen Boyd
  Cc: Guillaume Tucker, Jerome Brunet, Chen-Yu Tsai, broonie,
	tomeu.vizoso, Michael Turquette, enric.balletbo, khilman, mgalka,
	linux-clk, linux-kernel

[-- Attachment #1: Type: text/plain, Size: 5129 bytes --]

On Wed, Feb 19, 2020 at 03:49:47PM -0800, Stephen Boyd wrote:
> Adding some Allwinner folks. Presumably there is some sort of clk that
> is failing to calculate a phase when it gets registered. Maybe that's
> because the parent isn't registered yet?

It's simpler than that :)

> Quoting Guillaume Tucker (2020-02-17 23:45:41)
> > Hi Stephen,
> >
> > Please see the bisection report below about a boot failure.
> >
> > Reports aren't automatically sent to the public while we're
> > trialing new bisection features on kernelci.org but this one
> > looks valid.
> >
> > There's nothing in the serial console log, probably because it's
> > crashing too early during boot.  I'm not sure if other platforms
> > on kernelci.org were hit by this in the same way, it's tricky to
> > tell partly because there is no output.  It should possible to
> > run it again with earlyprintk enabled in BayLibre's test lab
> > though.
> >
> > Thanks,
> > Guillaume
> >
> >
> > On 18/02/2020 02:14, kernelci.org bot wrote:
> > > * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
> > > * This automated bisection report was sent to you on the basis  *
> > > * that you may be involved with the breaking commit it has      *
> > > * found.  No manual investigation has been done to verify it,   *
> > > * and the root cause of the problem may be somewhere else.      *
> > > *                                                               *
> > > * If you do send a fix, please include this trailer:            *
> > > *   Reported-by: "kernelci.org bot" <bot@kernelci.org>          *
> > > *                                                               *
> > > * Hope this helps!                                              *
> > > * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
> > >
> > > next/master bisection: baseline.login on sun8i-h2-plus-orangepi-zero
> > >
> > > Summary:
> > >   Start:      c25a951c50dc Add linux-next specific files for 20200217
> > >   Plain log:  https://storage.kernelci.org//next/master/next-20200217/arm/multi_v7_defconfig/gcc-8/lab-baylibre/baseline-sun8i-h2-plus-orangepi-zero.txt
> > >   HTML log:   https://storage.kernelci.org//next/master/next-20200217/arm/multi_v7_defconfig/gcc-8/lab-baylibre/baseline-sun8i-h2-plus-orangepi-zero.html
> > >   Result:     2760878662a2 clk: Bail out when calculating phase fails during clk registration
> > >
> > > Checks:
> > >   revert:     PASS
> > >   verify:     PASS
> > >
> > > Parameters:
> > >   Tree:       next
> > >   URL:        git://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
> > >   Branch:     master
> > >   Target:     sun8i-h2-plus-orangepi-zero
> > >   CPU arch:   arm
> > >   Lab:        lab-baylibre
> > >   Compiler:   gcc-8
> > >   Config:     multi_v7_defconfig
> > >   Test case:  baseline.login
> > >
> > > Breaking commit found:
> > >
> > > -------------------------------------------------------------------------------
> > > commit 2760878662a290ac57cff8a5a8d8bda8f4dddc37
> > > Author: Stephen Boyd <sboyd@kernel.org>
> > > Date:   Wed Feb 5 15:28:02 2020 -0800
> > >
> > >     clk: Bail out when calculating phase fails during clk registration
> > >
> > >     Bail out of clk registration if we fail to get the phase for a clk that
> > >     has a clk_ops::get_phase() callback. Print a warning too so that driver
> > >     authors can easily figure out that some clk is unable to read back phase
> > >     information at boot.
> > >
> > >     Cc: Douglas Anderson <dianders@chromium.org>
> > >     Cc: Heiko Stuebner <heiko@sntech.de>
> > >     Suggested-by: Jerome Brunet <jbrunet@baylibre.com>
> > >     Signed-off-by: Stephen Boyd <sboyd@kernel.org>
> > >     Link: https://lkml.kernel.org/r/20200205232802.29184-5-sboyd@kernel.org
> > >     Acked-by: Jerome Brunet <jbrunet@baylibre.com>
> > >
> > > diff --git a/drivers/clk/clk.c b/drivers/clk/clk.c
> > > index dc8bdfbd6a0c..ed1797857bae 100644
> > > --- a/drivers/clk/clk.c
> > > +++ b/drivers/clk/clk.c
> > > @@ -3457,7 +3457,12 @@ static int __clk_core_init(struct clk_core *core)
> > >        * Since a phase is by definition relative to its parent, just
> > >        * query the current clock phase, or just assume it's in phase.
> > >        */
> > > -     clk_core_get_phase(core);
> > > +     ret = clk_core_get_phase(core);
> > > +     if (ret < 0) {
> > > +             pr_warn("%s: Failed to get phase for clk '%s'\n", __func__,
> > > +                     core->name);
> > > +             goto out;
> > > +     }

The thing is, clk_core_get_phase actually returns the phase on success :)

So, when you actually have a phase returned, and not an error, you end
up with a positive, non-zero, value for ret.

And since it's the latest assignment of that value, and that we return
ret all the time, even on success, we end up returning that positive,
non-zero value to __clk_register, which in turn tests whether it's
non-zero for success (it's not), and then proceeds to garbage collect
everything.

I guess we're just the odd ones actually returning non-zero phases at
init time and in kernelci.

I'll send a patch

Maxime

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: next/master bisection: baseline.login on sun8i-h2-plus-orangepi-zero
  2020-02-25 13:38     ` Maxime Ripard
@ 2020-02-26 17:15       ` Enric Balletbo Serra
  2020-03-04  9:27         ` Enric Balletbo Serra
  0 siblings, 1 reply; 6+ messages in thread
From: Enric Balletbo Serra @ 2020-02-26 17:15 UTC (permalink / raw)
  To: Maxime Ripard
  Cc: Stephen Boyd, Guillaume Tucker, Jerome Brunet, Chen-Yu Tsai,
	Mark Brown, Tomeu Vizoso, Michael Turquette,
	Enric Balletbo i Serra, Kevin Hilman, mgalka, linux-clk,
	linux-kernel

Hi all,

Missatge de Maxime Ripard <maxime@cerno.tech> del dia dt., 25 de febr.
2020 a les 15:34:
>
> On Wed, Feb 19, 2020 at 03:49:47PM -0800, Stephen Boyd wrote:
> > Adding some Allwinner folks. Presumably there is some sort of clk that
> > is failing to calculate a phase when it gets registered. Maybe that's
> > because the parent isn't registered yet?
>
> It's simpler than that :)
>
> > Quoting Guillaume Tucker (2020-02-17 23:45:41)
> > > Hi Stephen,
> > >
> > > Please see the bisection report below about a boot failure.
> > >
> > > Reports aren't automatically sent to the public while we're
> > > trialing new bisection features on kernelci.org but this one
> > > looks valid.
> > >
> > > There's nothing in the serial console log, probably because it's
> > > crashing too early during boot.  I'm not sure if other platforms
> > > on kernelci.org were hit by this in the same way, it's tricky to
> > > tell partly because there is no output.  It should possible to
> > > run it again with earlyprintk enabled in BayLibre's test lab
> > > though.
> > >
> > > Thanks,
> > > Guillaume
> > >
> > >
> > > On 18/02/2020 02:14, kernelci.org bot wrote:
> > > > * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
> > > > * This automated bisection report was sent to you on the basis  *
> > > > * that you may be involved with the breaking commit it has      *
> > > > * found.  No manual investigation has been done to verify it,   *
> > > > * and the root cause of the problem may be somewhere else.      *
> > > > *                                                               *
> > > > * If you do send a fix, please include this trailer:            *
> > > > *   Reported-by: "kernelci.org bot" <bot@kernelci.org>          *
> > > > *                                                               *
> > > > * Hope this helps!                                              *
> > > > * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
> > > >
> > > > next/master bisection: baseline.login on sun8i-h2-plus-orangepi-zero
> > > >
> > > > Summary:
> > > >   Start:      c25a951c50dc Add linux-next specific files for 20200217
> > > >   Plain log:  https://storage.kernelci.org//next/master/next-20200217/arm/multi_v7_defconfig/gcc-8/lab-baylibre/baseline-sun8i-h2-plus-orangepi-zero.txt
> > > >   HTML log:   https://storage.kernelci.org//next/master/next-20200217/arm/multi_v7_defconfig/gcc-8/lab-baylibre/baseline-sun8i-h2-plus-orangepi-zero.html
> > > >   Result:     2760878662a2 clk: Bail out when calculating phase fails during clk registration
> > > >
> > > > Checks:
> > > >   revert:     PASS
> > > >   verify:     PASS
> > > >
> > > > Parameters:
> > > >   Tree:       next
> > > >   URL:        git://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
> > > >   Branch:     master
> > > >   Target:     sun8i-h2-plus-orangepi-zero
> > > >   CPU arch:   arm
> > > >   Lab:        lab-baylibre
> > > >   Compiler:   gcc-8
> > > >   Config:     multi_v7_defconfig
> > > >   Test case:  baseline.login
> > > >
> > > > Breaking commit found:
> > > >
> > > > -------------------------------------------------------------------------------
> > > > commit 2760878662a290ac57cff8a5a8d8bda8f4dddc37
> > > > Author: Stephen Boyd <sboyd@kernel.org>
> > > > Date:   Wed Feb 5 15:28:02 2020 -0800
> > > >
> > > >     clk: Bail out when calculating phase fails during clk registration
> > > >
> > > >     Bail out of clk registration if we fail to get the phase for a clk that
> > > >     has a clk_ops::get_phase() callback. Print a warning too so that driver
> > > >     authors can easily figure out that some clk is unable to read back phase
> > > >     information at boot.
> > > >
> > > >     Cc: Douglas Anderson <dianders@chromium.org>
> > > >     Cc: Heiko Stuebner <heiko@sntech.de>
> > > >     Suggested-by: Jerome Brunet <jbrunet@baylibre.com>
> > > >     Signed-off-by: Stephen Boyd <sboyd@kernel.org>
> > > >     Link: https://lkml.kernel.org/r/20200205232802.29184-5-sboyd@kernel.org
> > > >     Acked-by: Jerome Brunet <jbrunet@baylibre.com>
> > > >
> > > > diff --git a/drivers/clk/clk.c b/drivers/clk/clk.c
> > > > index dc8bdfbd6a0c..ed1797857bae 100644
> > > > --- a/drivers/clk/clk.c
> > > > +++ b/drivers/clk/clk.c
> > > > @@ -3457,7 +3457,12 @@ static int __clk_core_init(struct clk_core *core)
> > > >        * Since a phase is by definition relative to its parent, just
> > > >        * query the current clock phase, or just assume it's in phase.
> > > >        */
> > > > -     clk_core_get_phase(core);
> > > > +     ret = clk_core_get_phase(core);
> > > > +     if (ret < 0) {
> > > > +             pr_warn("%s: Failed to get phase for clk '%s'\n", __func__,
> > > > +                     core->name);
> > > > +             goto out;
> > > > +     }
>
> The thing is, clk_core_get_phase actually returns the phase on success :)
>
> So, when you actually have a phase returned, and not an error, you end
> up with a positive, non-zero, value for ret.
>
> And since it's the latest assignment of that value, and that we return
> ret all the time, even on success, we end up returning that positive,
> non-zero value to __clk_register, which in turn tests whether it's
> non-zero for success (it's not), and then proceeds to garbage collect
> everything.
>
> I guess we're just the odd ones actually returning non-zero phases at
> init time and in kernelci.
>

Just to note that not only Allwiner is affected, Rockchip is also
affected by this issue. Reverting the patch fixes the issue for me,
but the patch proposed by Maxime [1] does _NOT_ fixes the issue for
Rockchip, there is something else, I'll take a look. I can't answer
that patch because didn't reach my inbox.

Regards,
 Enric

[1] https://patchwork.kernel.org/patch/11403837/


> I'll send a patch
>
> Maxime

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: next/master bisection: baseline.login on sun8i-h2-plus-orangepi-zero
  2020-02-26 17:15       ` Enric Balletbo Serra
@ 2020-03-04  9:27         ` Enric Balletbo Serra
  0 siblings, 0 replies; 6+ messages in thread
From: Enric Balletbo Serra @ 2020-03-04  9:27 UTC (permalink / raw)
  To: Maxime Ripard
  Cc: Stephen Boyd, Guillaume Tucker, Jerome Brunet, Chen-Yu Tsai,
	Mark Brown, Tomeu Vizoso, Michael Turquette,
	Enric Balletbo i Serra, Kevin Hilman, mgalka, linux-clk,
	linux-kernel

Hi all,

Missatge de Enric Balletbo Serra <eballetbo@gmail.com> del dia dc., 26
de febr. 2020 a les 18:15:
>
> Hi all,
>
> Missatge de Maxime Ripard <maxime@cerno.tech> del dia dt., 25 de febr.
> 2020 a les 15:34:
> >
> > On Wed, Feb 19, 2020 at 03:49:47PM -0800, Stephen Boyd wrote:
> > > Adding some Allwinner folks. Presumably there is some sort of clk that
> > > is failing to calculate a phase when it gets registered. Maybe that's
> > > because the parent isn't registered yet?
> >
> > It's simpler than that :)
> >
> > > Quoting Guillaume Tucker (2020-02-17 23:45:41)
> > > > Hi Stephen,
> > > >
> > > > Please see the bisection report below about a boot failure.
> > > >
> > > > Reports aren't automatically sent to the public while we're
> > > > trialing new bisection features on kernelci.org but this one
> > > > looks valid.
> > > >
> > > > There's nothing in the serial console log, probably because it's
> > > > crashing too early during boot.  I'm not sure if other platforms
> > > > on kernelci.org were hit by this in the same way, it's tricky to
> > > > tell partly because there is no output.  It should possible to
> > > > run it again with earlyprintk enabled in BayLibre's test lab
> > > > though.
> > > >
> > > > Thanks,
> > > > Guillaume
> > > >
> > > >
> > > > On 18/02/2020 02:14, kernelci.org bot wrote:
> > > > > * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
> > > > > * This automated bisection report was sent to you on the basis  *
> > > > > * that you may be involved with the breaking commit it has      *
> > > > > * found.  No manual investigation has been done to verify it,   *
> > > > > * and the root cause of the problem may be somewhere else.      *
> > > > > *                                                               *
> > > > > * If you do send a fix, please include this trailer:            *
> > > > > *   Reported-by: "kernelci.org bot" <bot@kernelci.org>          *
> > > > > *                                                               *
> > > > > * Hope this helps!                                              *
> > > > > * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
> > > > >
> > > > > next/master bisection: baseline.login on sun8i-h2-plus-orangepi-zero
> > > > >
> > > > > Summary:
> > > > >   Start:      c25a951c50dc Add linux-next specific files for 20200217
> > > > >   Plain log:  https://storage.kernelci.org//next/master/next-20200217/arm/multi_v7_defconfig/gcc-8/lab-baylibre/baseline-sun8i-h2-plus-orangepi-zero.txt
> > > > >   HTML log:   https://storage.kernelci.org//next/master/next-20200217/arm/multi_v7_defconfig/gcc-8/lab-baylibre/baseline-sun8i-h2-plus-orangepi-zero.html
> > > > >   Result:     2760878662a2 clk: Bail out when calculating phase fails during clk registration
> > > > >
> > > > > Checks:
> > > > >   revert:     PASS
> > > > >   verify:     PASS
> > > > >
> > > > > Parameters:
> > > > >   Tree:       next
> > > > >   URL:        git://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
> > > > >   Branch:     master
> > > > >   Target:     sun8i-h2-plus-orangepi-zero
> > > > >   CPU arch:   arm
> > > > >   Lab:        lab-baylibre
> > > > >   Compiler:   gcc-8
> > > > >   Config:     multi_v7_defconfig
> > > > >   Test case:  baseline.login
> > > > >
> > > > > Breaking commit found:
> > > > >
> > > > > -------------------------------------------------------------------------------
> > > > > commit 2760878662a290ac57cff8a5a8d8bda8f4dddc37
> > > > > Author: Stephen Boyd <sboyd@kernel.org>
> > > > > Date:   Wed Feb 5 15:28:02 2020 -0800
> > > > >
> > > > >     clk: Bail out when calculating phase fails during clk registration
> > > > >
> > > > >     Bail out of clk registration if we fail to get the phase for a clk that
> > > > >     has a clk_ops::get_phase() callback. Print a warning too so that driver
> > > > >     authors can easily figure out that some clk is unable to read back phase
> > > > >     information at boot.
> > > > >
> > > > >     Cc: Douglas Anderson <dianders@chromium.org>
> > > > >     Cc: Heiko Stuebner <heiko@sntech.de>
> > > > >     Suggested-by: Jerome Brunet <jbrunet@baylibre.com>
> > > > >     Signed-off-by: Stephen Boyd <sboyd@kernel.org>
> > > > >     Link: https://lkml.kernel.org/r/20200205232802.29184-5-sboyd@kernel.org
> > > > >     Acked-by: Jerome Brunet <jbrunet@baylibre.com>
> > > > >
> > > > > diff --git a/drivers/clk/clk.c b/drivers/clk/clk.c
> > > > > index dc8bdfbd6a0c..ed1797857bae 100644
> > > > > --- a/drivers/clk/clk.c
> > > > > +++ b/drivers/clk/clk.c
> > > > > @@ -3457,7 +3457,12 @@ static int __clk_core_init(struct clk_core *core)
> > > > >        * Since a phase is by definition relative to its parent, just
> > > > >        * query the current clock phase, or just assume it's in phase.
> > > > >        */
> > > > > -     clk_core_get_phase(core);
> > > > > +     ret = clk_core_get_phase(core);
> > > > > +     if (ret < 0) {
> > > > > +             pr_warn("%s: Failed to get phase for clk '%s'\n", __func__,
> > > > > +                     core->name);
> > > > > +             goto out;
> > > > > +     }
> >
> > The thing is, clk_core_get_phase actually returns the phase on success :)
> >
> > So, when you actually have a phase returned, and not an error, you end
> > up with a positive, non-zero, value for ret.
> >
> > And since it's the latest assignment of that value, and that we return
> > ret all the time, even on success, we end up returning that positive,
> > non-zero value to __clk_register, which in turn tests whether it's
> > non-zero for success (it's not), and then proceeds to garbage collect
> > everything.
> >
> > I guess we're just the odd ones actually returning non-zero phases at
> > init time and in kernelci.
> >
>
> Just to note that not only Allwiner is affected, Rockchip is also
> affected by this issue. Reverting the patch fixes the issue for me,
> but the patch proposed by Maxime [1] does _NOT_ fixes the issue for
> Rockchip, there is something else, I'll take a look. I can't answer
> that patch because didn't reach my inbox.
>
> Regards,
>  Enric
>
> [1] https://patchwork.kernel.org/patch/11403837/
>

For the record, the patch that fixes the issue on Rockchip is this:

* https://lkml.org/lkml/2020/3/3/1353

Thanks,
  Enric

>
> > I'll send a patch
> >
> > Maxime

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2020-03-04  9:28 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <5e4b4889.1c69fb81.bc072.65a9@mx.google.com>
2020-02-18  7:45 ` next/master bisection: baseline.login on sun8i-h2-plus-orangepi-zero Guillaume Tucker
2020-02-19 23:49   ` Stephen Boyd
2020-02-25 12:25     ` Guillaume Tucker
2020-02-25 13:38     ` Maxime Ripard
2020-02-26 17:15       ` Enric Balletbo Serra
2020-03-04  9:27         ` Enric Balletbo Serra

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).