Re: clk/clk-next boot bisection: v5.3-rc1-79-g31f58d2f58cb on sun8i-h3-libretech-all-h3-cc

2019-08-15 Thread Stephen Boyd
Quoting Mark Brown (2019-08-15 04:26:14)
> On Wed, Aug 14, 2019 at 09:02:20PM -0700, Stephen Boyd wrote:
> > Quoting kernelci.org bot (2019-08-14 20:35:25)
> 
> > > clk/clk-next boot bisection: v5.3-rc1-79-g31f58d2f58cb on 
> > > sun8i-h3-libretech-all-h3-cc
> 
> > If this is the only board that failed, great! Must be something in a
> > sun8i driver that uses the init structure after registration.
> 
> The infrastructure suppresses duplicate-seeming bisections so I'd not
> count on it, check the reports on the web site.

And there's something wrong with the OMAP4 panda board and tegra nyan.
Maybe Tony has seen it.



Re: clk/clk-next boot bisection: v5.3-rc1-79-g31f58d2f58cb on sun8i-h3-libretech-all-h3-cc

2019-08-15 Thread Stephen Boyd
Quoting Stephen Boyd (2019-08-15 08:16:15)
> Quoting Mark Brown (2019-08-15 04:26:14)
> > On Wed, Aug 14, 2019 at 09:02:20PM -0700, Stephen Boyd wrote:
> > > Quoting kernelci.org bot (2019-08-14 20:35:25)
> > 
> > > > clk/clk-next boot bisection: v5.3-rc1-79-g31f58d2f58cb on 
> > > > sun8i-h3-libretech-all-h3-cc
> > 
> > > If this is the only board that failed, great! Must be something in a
> > > sun8i driver that uses the init structure after registration.
> > 
> > The infrastructure suppresses duplicate-seeming bisections so I'd not
> > count on it, check the reports on the web site.
> 
> Hmm ok. I can remove the change from -next, but I'd still like to figure
> out what is using the init pointer after registration. Is there a way to
> get earlycon logs?

Ok I sent a patch series which may solve the problem for Allwinner.



Re: clk/clk-next boot bisection: v5.3-rc1-79-g31f58d2f58cb on sun8i-h3-libretech-all-h3-cc

2019-08-15 Thread Stephen Boyd
Quoting Mark Brown (2019-08-15 04:26:14)
> On Wed, Aug 14, 2019 at 09:02:20PM -0700, Stephen Boyd wrote:
> > Quoting kernelci.org bot (2019-08-14 20:35:25)
> 
> > > clk/clk-next boot bisection: v5.3-rc1-79-g31f58d2f58cb on 
> > > sun8i-h3-libretech-all-h3-cc
> 
> > If this is the only board that failed, great! Must be something in a
> > sun8i driver that uses the init structure after registration.
> 
> The infrastructure suppresses duplicate-seeming bisections so I'd not
> count on it, check the reports on the web site.

Hmm ok. I can remove the change from -next, but I'd still like to figure
out what is using the init pointer after registration. Is there a way to
get earlycon logs?


Re: clk/clk-next boot bisection: v5.3-rc1-79-g31f58d2f58cb on sun8i-h3-libretech-all-h3-cc

2019-08-15 Thread Mark Brown
On Wed, Aug 14, 2019 at 09:02:20PM -0700, Stephen Boyd wrote:
> Quoting kernelci.org bot (2019-08-14 20:35:25)

> > clk/clk-next boot bisection: v5.3-rc1-79-g31f58d2f58cb on 
> > sun8i-h3-libretech-all-h3-cc

> If this is the only board that failed, great! Must be something in a
> sun8i driver that uses the init structure after registration.

The infrastructure suppresses duplicate-seeming bisections so I'd not
count on it, check the reports on the web site.


signature.asc
Description: PGP signature


Re: clk/clk-next boot bisection: v5.3-rc1-79-g31f58d2f58cb on sun8i-h3-libretech-all-h3-cc

2019-08-14 Thread Stephen Boyd
Quoting kernelci.org bot (2019-08-14 20:35:25)
> * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
> * 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"   *
> *   *
> * Hope this helps!  *
> * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
> 
> clk/clk-next boot bisection: v5.3-rc1-79-g31f58d2f58cb on 
> sun8i-h3-libretech-all-h3-cc

If this is the only board that failed, great! Must be something in a
sun8i driver that uses the init structure after registration.

> 
> Summary:
>   Start:  31f58d2f58cb Merge branch 'clk-meson' into clk-next
>   Details:https://kernelci.org/boot/id/5d54b9d159b514324cf1226e
>   Plain log:  
> https://storage.kernelci.org//clk/clk-next/v5.3-rc1-79-g31f58d2f58cb/arm/multi_v7_defconfig+CONFIG_SMP=n/gcc-8/lab-baylibre/boot-sun8i-h3-libretech-all-h3-cc.txt
>   HTML log:   
> https://storage.kernelci.org//clk/clk-next/v5.3-rc1-79-g31f58d2f58cb/arm/multi_v7_defconfig+CONFIG_SMP=n/gcc-8/lab-baylibre/boot-sun8i-h3-libretech-all-h3-cc.html
>   Result: c82987e740d1 clk: Overwrite clk_hw::init with NULL during 
> clk_register()
> 
> Checks:
>   revert: PASS
>   verify: PASS
> 
> Parameters:
>   Tree:   clk
>   URL:https://git.kernel.org/pub/scm/linux/kernel/git/clk/linux.git
>   Branch: clk-next
>   Target: sun8i-h3-libretech-all-h3-cc
>   CPU arch:   arm
>   Lab:lab-baylibre
>   Compiler:   gcc-8
>   Config: multi_v7_defconfig+CONFIG_SMP=n
>   Test suite: boot
> 
> Breaking commit found:
> 
> ---
> commit c82987e740d12be98b8ae8aa9221b8b9e2541271
> Author: Stephen Boyd 
> Date:   Wed Jul 31 12:35:17 2019 -0700
> 
> clk: Overwrite clk_hw::init with NULL during clk_register()
> 
> We don't want clk provider drivers to use the init structure after clk
> registration time, but we leave a dangling reference to it by means of
> clk_hw::init. Let's overwrite the member with NULL during clk_register()
> so that this can't be used anymore after registration time.
> 
> Cc: Bjorn Andersson 
> Cc: Doug Anderson 
> Signed-off-by: Stephen Boyd 
> Link: https://lkml.kernel.org/r/20190731193517.237136-10-sb...@kernel.org
> Reviewed-by: Sylwester Nawrocki 
> 
> diff --git a/drivers/clk/clk.c b/drivers/clk/clk.c
> index c0990703ce54..efac620264a2 100644
> --- a/drivers/clk/clk.c
> +++ b/drivers/clk/clk.c
> @@ -3484,9 +3484,9 @@ static int clk_cpy_name(const char **dst_p, const char 
> *src, bool must_exist)
> return 0;
>  }
>  
> -static int clk_core_populate_parent_map(struct clk_core *core)
> +static int clk_core_populate_parent_map(struct clk_core *core,
> +   const struct clk_init_data *init)
>  {
> -   const struct clk_init_data *init = core->hw->init;
> u8 num_parents = init->num_parents;
> const char * const *parent_names = init->parent_names;
> const struct clk_hw **parent_hws = init->parent_hws;
> @@ -3566,6 +3566,14 @@ __clk_register(struct device *dev, struct device_node 
> *np, struct clk_hw *hw)
>  {
> int ret;
> struct clk_core *core;
> +   const struct clk_init_data *init = hw->init;
> +
> +   /*
> +* The init data is not supposed to be used outside of registration 
> path.
> +* Set it to NULL so that provider drivers can't use it either and so 
> that
> +* we catch use of hw->init early on in the core.
> +*/
> +   hw->init = NULL;
>  
> core = kzalloc(sizeof(*core), GFP_KERNEL);
> if (!core) {
> @@ -3573,17 +3581,17 @@ __clk_register(struct device *dev, struct device_node 
> *np, struct clk_hw *hw)
> goto fail_out;
> }
>  
> -   core->name = kstrdup_const(hw->init->name, GFP_KERNEL);
> +   core->name = kstrdup_const(init->name, GFP_KERNEL);
> if (!core->name) {
> ret = -ENOMEM;
> goto fail_name;
> }
>  
> -   if (WARN_ON(!hw->init->ops)) {
> +   if (WARN_ON(!init->o

clk/clk-next boot bisection: v5.3-rc1-79-g31f58d2f58cb on sun8i-h3-libretech-all-h3-cc

2019-08-14 Thread kernelci.org bot
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* 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"   *
*   *
* Hope this helps!  *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *

clk/clk-next boot bisection: v5.3-rc1-79-g31f58d2f58cb on 
sun8i-h3-libretech-all-h3-cc

Summary:
  Start:  31f58d2f58cb Merge branch 'clk-meson' into clk-next
  Details:https://kernelci.org/boot/id/5d54b9d159b514324cf1226e
  Plain log:  
https://storage.kernelci.org//clk/clk-next/v5.3-rc1-79-g31f58d2f58cb/arm/multi_v7_defconfig+CONFIG_SMP=n/gcc-8/lab-baylibre/boot-sun8i-h3-libretech-all-h3-cc.txt
  HTML log:   
https://storage.kernelci.org//clk/clk-next/v5.3-rc1-79-g31f58d2f58cb/arm/multi_v7_defconfig+CONFIG_SMP=n/gcc-8/lab-baylibre/boot-sun8i-h3-libretech-all-h3-cc.html
  Result: c82987e740d1 clk: Overwrite clk_hw::init with NULL during 
clk_register()

Checks:
  revert: PASS
  verify: PASS

Parameters:
  Tree:   clk
  URL:https://git.kernel.org/pub/scm/linux/kernel/git/clk/linux.git
  Branch: clk-next
  Target: sun8i-h3-libretech-all-h3-cc
  CPU arch:   arm
  Lab:lab-baylibre
  Compiler:   gcc-8
  Config: multi_v7_defconfig+CONFIG_SMP=n
  Test suite: boot

Breaking commit found:

---
commit c82987e740d12be98b8ae8aa9221b8b9e2541271
Author: Stephen Boyd 
Date:   Wed Jul 31 12:35:17 2019 -0700

clk: Overwrite clk_hw::init with NULL during clk_register()

We don't want clk provider drivers to use the init structure after clk
registration time, but we leave a dangling reference to it by means of
clk_hw::init. Let's overwrite the member with NULL during clk_register()
so that this can't be used anymore after registration time.

Cc: Bjorn Andersson 
Cc: Doug Anderson 
Signed-off-by: Stephen Boyd 
Link: https://lkml.kernel.org/r/20190731193517.237136-10-sb...@kernel.org
Reviewed-by: Sylwester Nawrocki 

diff --git a/drivers/clk/clk.c b/drivers/clk/clk.c
index c0990703ce54..efac620264a2 100644
--- a/drivers/clk/clk.c
+++ b/drivers/clk/clk.c
@@ -3484,9 +3484,9 @@ static int clk_cpy_name(const char **dst_p, const char 
*src, bool must_exist)
return 0;
 }
 
-static int clk_core_populate_parent_map(struct clk_core *core)
+static int clk_core_populate_parent_map(struct clk_core *core,
+   const struct clk_init_data *init)
 {
-   const struct clk_init_data *init = core->hw->init;
u8 num_parents = init->num_parents;
const char * const *parent_names = init->parent_names;
const struct clk_hw **parent_hws = init->parent_hws;
@@ -3566,6 +3566,14 @@ __clk_register(struct device *dev, struct device_node 
*np, struct clk_hw *hw)
 {
int ret;
struct clk_core *core;
+   const struct clk_init_data *init = hw->init;
+
+   /*
+* The init data is not supposed to be used outside of registration 
path.
+* Set it to NULL so that provider drivers can't use it either and so 
that
+* we catch use of hw->init early on in the core.
+*/
+   hw->init = NULL;
 
core = kzalloc(sizeof(*core), GFP_KERNEL);
if (!core) {
@@ -3573,17 +3581,17 @@ __clk_register(struct device *dev, struct device_node 
*np, struct clk_hw *hw)
goto fail_out;
}
 
-   core->name = kstrdup_const(hw->init->name, GFP_KERNEL);
+   core->name = kstrdup_const(init->name, GFP_KERNEL);
if (!core->name) {
ret = -ENOMEM;
goto fail_name;
}
 
-   if (WARN_ON(!hw->init->ops)) {
+   if (WARN_ON(!init->ops)) {
ret = -EINVAL;
goto fail_ops;
}
-   core->ops = hw->init->ops;
+   core->ops = init->ops;
 
if (dev && pm_runtime_enabled(dev))
core->rpm_enabled = true;
@@ -3592,13 +3600,13 @@ __clk_register(struct device *dev, struct device_node 
*np, struct clk_hw *hw)
if (dev && dev->driver)
core->owner = dev->driver->owner;
core->hw = hw;
-   core->flags = hw->init->flags;
-   core->num_parents = hw->init->num_parents;
+   core->flags = init->flags;
+   core->num_parents = init->num_parents;
core->min_rate = 0;
core