Skip to contentSkip to conversation

clk: reverse default clk provider initialization order in of_clk_init()

PATCH In review Sylwester Nawrocki 3 participants 5 messages Mar 27, 2014 – Mar 31, 2014 Common clk

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 clk: reverse default clk provider initialization order in of_clk_init()

This restores the default clocks registration order as parsed from devicetree, i.e. as before commit 1771b10d605d26ccee771a7fb4b08718 "clk: respect the clock dependencies in of_clk_init", for when there is no explicit parent clock dependencies between clock providers specified in the device tree.

It prevents regressions (boot failure, division by 0 errors) on imx and exynos platforms.

---
 drivers/clk/clk.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/clk/clk.c +1 -1
index 07cba07..c859adf 100644
@@ -2596,7 +2596,7 @@ void __init of_clk_init(const struct of_device_id *matches)
 
 		parent->clk_init_cb = match->data;
 		parent->np = np;
-		list_add(&parent->node, &clk_provider_list);
+		list_add_tail(&parent->node, &clk_provider_list);
 	}
 
 	while (!list_empty(&clk_provider_list)) {
Signature · 1 line
1.7.9.5
author Tested-by Fabio Estevam on v1 1/1
#1 lore raw
Quoted 10 lines · Sylwester Nawrocki

This restores the default clocks registration order as parsed from devicetree, i.e. as before commit 1771b10d605d26ccee771a7fb4b08718 "clk: respect the clock dependencies in of_clk_init", for when there is no explicit parent clock dependencies between clock providers specified in the device tree.

It prevents regressions (boot failure, division by 0 errors) on imx and exynos platforms.

Oops, I've forgotten to add:

Quoted 17 lines
---
 drivers/clk/clk.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/clk/clk.c +1 -1
index 07cba07..c859adf 100644
@@ -2596,7 +2596,7 @@ void __init of_clk_init(const struct of_device_id *matches)
 
 		parent->clk_init_cb = match->data;
 		parent->np = np;
-		list_add(&parent->node, &clk_provider_list);
+		list_add_tail(&parent->node, &clk_provider_list);
 	}
 
 	while (!list_empty(&clk_provider_list)) {
Signature · 2 lines
Regards,
Sylwester
#2 lore raw

PATCH 1/1 clk: reverse default clk provider initialization order in of_clk_init()

In reply to Sylwester Nawrocki

Quoting Sylwester Nawrocki (2014-03-27 03:43:32)

Quoted 10 lines

This restores the default clocks registration order as parsed from devicetree, i.e. as before commit 1771b10d605d26ccee771a7fb4b08718 "clk: respect the clock dependencies in of_clk_init", for when there is no explicit parent clock dependencies between clock providers specified in the device tree.

It prevents regressions (boot failure, division by 0 errors) on imx and exynos platforms.

I pulled this into clk-next but it didn't seem to get picked up by linux-next in time for today's build. Let's test the next linux-next to insure that the regressions are gone. If not then I'll likely need to drop "clk: respect the clock dependencies in of_clk_init" from clk-next for 3.15.

Regards,
Mike

Quoted 20 lines
---
 drivers/clk/clk.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/clk/clk.c +1 -1
index 07cba07..c859adf 100644
@@ -2596,7 +2596,7 @@ void __init of_clk_init(const struct of_device_id *matches)
 
                parent->clk_init_cb = match->data;
                parent->np = np;
-               list_add(&parent->node, &clk_provider_list);
+               list_add_tail(&parent->node, &clk_provider_list);
        }
 
        while (!list_empty(&clk_provider_list)) {
Signature · 1 line
1.7.9.5
#3 lore raw
Quoted 10 lines · Mike Turquette

Quoting Sylwester Nawrocki (2014-03-27 03:43:32)

Quoted 9 lines

This restores the default clocks registration order as parsed from devicetree, i.e. as before commit 1771b10d605d26ccee771a7fb4b08718 "clk: respect the clock dependencies in of_clk_init", for when there is no explicit parent clock dependencies between clock providers specified in the device tree.

It prevents regressions (boot failure, division by 0 errors) on imx and exynos platforms.

Quoted 7 lines
Quoted 1 line

I pulled this into clk-next but it didn't seem to get picked up by linux-next in time for today's build. Let's test the next linux-next to insure that the regressions are gone. If not then I'll likely need to drop "clk: respect the clock dependencies in of_clk_init" from clk-next for 3.15.

It looks like all the boot failures caused by this problem are gone as of next-20140331[1], so it looks good to me.

Kevin

[1] http://lists.linaro.org/pipermail/kernel-build-reports/2014-March/002988.html

#4 lore raw

PATCH 1/1 clk: reverse default clk provider initialization order in of_clk_init()

Quoting Kevin Hilman (2014-03-31 08:00:18)

Quoted 14 lines
Quoted 12 lines · Mike Turquette

Quoting Sylwester Nawrocki (2014-03-27 03:43:32)

Quoted 10 lines

This restores the default clocks registration order as parsed from devicetree, i.e. as before commit 1771b10d605d26ccee771a7fb4b08718 "clk: respect the clock dependencies in of_clk_init", for when there is no explicit parent clock dependencies between clock providers specified in the device tree.

It prevents regressions (boot failure, division by 0 errors) on imx and exynos platforms.

Quoted 8 lines
Quoted 5 lines

I pulled this into clk-next but it didn't seem to get picked up by linux-next in time for today's build. Let's test the next linux-next to insure that the regressions are gone. If not then I'll likely need to drop "clk: respect the clock dependencies in of_clk_init" from clk-next for 3.15.

It looks like all the boot failures caused by this problem are gone as of next-20140331[1], so it looks good to me.

Great, thanks for testing and letting us know!

Regards,
Mike

Quoted 4 lines

Kevin

[1] http://lists.linaro.org/pipermail/kernel-build-reports/2014-March/002988.html