devfreq: tegra20: add COMMON_CLK dependency
PATCH 1/1 devfreq: tegra20: add COMMON_CLK dependency
Compile-testing the new driver on platforms without CONFIG_COMMON_CLK leads to a link error:
drivers/devfreq/tegra20-devfreq.o: In function `tegra_devfreq_target':
tegra20-devfreq.c:(.text+0x288): undefined reference to `clk_set_min_rate'
Add a dependency on COMMON_CLK to avoid this.
--- drivers/devfreq/Kconfig | 1 + 1 file changed, 1 insertion(+)
drivers/devfreq/Kconfig +1 -0
@@ -107,6 +107,7 @@ config ARM_TEGRA_DEVFREQ config ARM_TEGRA20_DEVFREQ tristate "NVIDIA Tegra20 DEVFREQ Driver" depends on (TEGRA_MC && TEGRA20_EMC) || COMPILE_TEST + depends on COMMON_CLK select DEVFREQ_GOV_SIMPLE_ONDEMAND select PM_OPP help
Signature · 1 line
2.20.0
28.06.2019 13:32, Arnd Bergmann пишет:
Quoted 20 lines
Compile-testing the new driver on platforms without
CONFIG_COMMON_CLKleads to a link error:
drivers/devfreq/tegra20-devfreq.o: In function `tegra_devfreq_target':
tegra20-devfreq.c:(.text+0x288): undefined reference to `clk_set_min_rate'Add a dependency on
COMMON_CLKto avoid this.Fixes 1d39ee8dad6d ("PM / devfreq: Introduce driver for NVIDIA Tegra20")Signed-off-by Arnd Bergmann <[email protected]>--- drivers/devfreq/Kconfig | 1 + 1 file changed, 1 insertion(+)drivers/devfreq/Kconfig +0
-0
drivers/devfreq/Kconfig config ARM_TEGRA_DEVFREQ · line 113
Quoted 7 lines
drivers/devfreq/Kconfig +1
-0@@ -107,6 +107,7 @@ config ARM_TEGRA_DEVFREQ config ARM_TEGRA20_DEVFREQ tristate "NVIDIA Tegra20 DEVFREQ Driver" depends on (TEGRA_MC && TEGRA20_EMC) || COMPILE_TEST + depends on COMMON_CLK select DEVFREQ_GOV_SIMPLE_ONDEMAND select PM_OPP help
How is it possible to happen? There is a stub for clk_set_min_rate() when COMMON_CLK is disabled .. Could you please show the kernel's config that causes the problem?
Moreover that was me who added the missing stub for clk_set_min_rate() in [1] to fix [2].
[2] https://lists.01.org/pipermail/kbuild-all/2019-April/060292.html
So this patch looks wrong to me because apparently it fixes a non-existent problem.
28.06.2019 14:00, Dmitry Osipenko пишет:
Quoted 32 lines
28.06.2019 13:32, Arnd Bergmann пишет:
Quoted 20 lines
Compile-testing the new driver on platforms without
CONFIG_COMMON_CLKleads to a link error:
drivers/devfreq/tegra20-devfreq.o: In function `tegra_devfreq_target':
tegra20-devfreq.c:(.text+0x288): undefined reference to `clk_set_min_rate'Add a dependency on
COMMON_CLKto avoid this.Fixes 1d39ee8dad6d ("PM / devfreq: Introduce driver for NVIDIA Tegra20")Signed-off-by Arnd Bergmann <[email protected]>--- drivers/devfreq/Kconfig | 1 + 1 file changed, 1 insertion(+)drivers/devfreq/Kconfig +0
-0drivers/devfreq/Kconfig config ARM_TEGRA_DEVFREQ · line 113
Quoted 7 lines
drivers/devfreq/Kconfig +1
-0@@ -107,6 +107,7 @@ config ARM_TEGRA_DEVFREQ config ARM_TEGRA20_DEVFREQ tristate "NVIDIA Tegra20 DEVFREQ Driver" depends on (TEGRA_MC && TEGRA20_EMC) || COMPILE_TEST + depends on COMMON_CLK select DEVFREQ_GOV_SIMPLE_ONDEMAND select PM_OPP helpHow is it possible to happen? There is a stub for
clk_set_min_rate()whenCOMMON_CLKis disabled .. Could you please show the kernel's config that causes the problem?
Quoted 9 lines
Moreover that was me who added the missing stub for
clk_set_min_rate()in [1] to fix [2].[2] https://lists.01.org/pipermail/kbuild-all/2019-April/060292.html
So this patch looks wrong to me because apparently it fixes a non-existent problem.
Oh, wait. That was "implicit declaration" and this one is "undefined reference"! Still looks like something else need to be fixed..
Quoted 11 lines · Dmitry Osipenko
28.06.2019 14:00, Dmitry Osipenko пишет:
Quoted 9 lines
How is it possible to happen? There is a stub for
clk_set_min_rate()whenCOMMON_CLKis disabled .. Could you please show the kernel's config that causes the problem?Moreover that was me who added the missing stub for
clk_set_min_rate()in [1] to fix [2].
Quoted 7 lines
Quoted 4 lines
[2] https://lists.01.org/pipermail/kbuild-all/2019-April/060292.html
So this patch looks wrong to me because apparently it fixes a non-existent problem.
Oh, wait. That was "implicit declaration" and this one is "undefined reference"! Still looks like something else need to be fixed..
The stub takes care of the case where there is no CLK support at all, i.e. CONFIG_HAVE_CLK is disabled. However, some older ARM platforms still have a custom implementation of the API and lack clk_set_min_rate().
$ git grep -l 'EXPORT_SYMBOL.*\<clk_set_rate\>' | xargs grep -L clk_set_min_rate arch/arm/mach-ep93xx/clock.c arch/arm/mach-mmp/clock.c arch/arm/mach-omap1/clock.c arch/arm/mach-sa1100/clock.c arch/arm/mach-w90x900/clock.c arch/c6x/platforms/pll.c arch/m68k/coldfire/clk.c arch/mips/ar7/clock.c arch/mips/bcm63xx/clk.c arch/mips/lantiq/clk.c arch/mips/loongson64/lemote-2f/clock.c arch/mips/ralink/clk.c arch/unicore32/kernel/clock.c drivers/sh/clk/core.c
We could in theory convert all of those to COMMON_CLK, or simply add a dummy clk_set_min_rate() for each one, but since there is only one user, my fix was simpler.
Arnd
Dmitry Osipenko
Reviewed-by28.06.2019 15:27, Arnd Bergmann пишет:
Quoted 41 lines · Dmitry Osipenko
Quoted 11 lines
28.06.2019 14:00, Dmitry Osipenko пишет:
Quoted 9 lines
How is it possible to happen? There is a stub for
clk_set_min_rate()whenCOMMON_CLKis disabled .. Could you please show the kernel's config that causes the problem?Moreover that was me who added the missing stub for
clk_set_min_rate()in [1] to fix [2].Quoted 7 lines
Quoted 4 lines
[2] https://lists.01.org/pipermail/kbuild-all/2019-April/060292.html
So this patch looks wrong to me because apparently it fixes a non-existent problem.
Oh, wait. That was "implicit declaration" and this one is "undefined reference"! Still looks like something else need to be fixed..
The stub takes care of the case where there is no CLK support at all, i.e.
CONFIG_HAVE_CLKis disabled. However, some older ARM platforms still have a custom implementation of the API and lackclk_set_min_rate().$ git grep -l 'EXPORT_SYMBOL.*\<clk_set_rate\>' | xargs grep -L clk_set_min_rate arch/arm/mach-ep93xx/clock.c arch/arm/mach-mmp/clock.c arch/arm/mach-omap1/clock.c arch/arm/mach-sa1100/clock.c arch/arm/mach-w90x900/clock.c arch/c6x/platforms/pll.c arch/m68k/coldfire/clk.c arch/mips/ar7/clock.c arch/mips/bcm63xx/clk.c arch/mips/lantiq/clk.c arch/mips/loongson64/lemote-2f/clock.c arch/mips/ralink/clk.c arch/unicore32/kernel/clock.c drivers/sh/clk/core.c
Quoted 3 lines
We could in theory convert all of those to
COMMON_CLK, or simply add a dummyclk_set_min_rate()for each one, but since there is only one user, my fix was simpler.
Okay, thank you for the clarification. Looks like "Tegra30 DEVFREQ" should cause the same trouble for you as well then.
Hi Arnd,
Thanks for fixup.
Hi Myungjoo,
This patch have to be merged for linux 5.3 before sending pull-request because it fixed the build error of merged patch[1] on devfreq.git.
Best Regards,
Chanwoo Choi
Quoted 27 lines · Arnd Bergmann
Compile-testing the new driver on platforms without
CONFIG_COMMON_CLKleads to a link error:
drivers/devfreq/tegra20-devfreq.o: In function `tegra_devfreq_target':
tegra20-devfreq.c:(.text+0x288): undefined reference to `clk_set_min_rate'Add a dependency on
COMMON_CLKto avoid this.Fixes 1d39ee8dad6d ("PM / devfreq: Introduce driver for NVIDIA Tegra20")Signed-off-by Arnd Bergmann <[email protected]>--- drivers/devfreq/Kconfig | 1 + 1 file changed, 1 insertion(+)drivers/devfreq/Kconfig +1
-0@@ -107,6 +107,7 @@ config ARM_TEGRA_DEVFREQ config ARM_TEGRA20_DEVFREQ tristate "NVIDIA Tegra20 DEVFREQ Driver" depends on (TEGRA_MC && TEGRA20_EMC) || COMPILE_TEST + depends on COMMON_CLK select DEVFREQ_GOV_SIMPLE_ONDEMAND select PM_OPP help
Quoted 20 lines · Arnd Bergmann
Compile-testing the new driver on platforms without
CONFIG_COMMON_CLKleads to a link error:
drivers/devfreq/tegra20-devfreq.o: In function `tegra_devfreq_target':
tegra20-devfreq.c:(.text+0x288): undefined reference to `clk_set_min_rate'Add a dependency on
COMMON_CLKto avoid this.Fixes 1d39ee8dad6d ("PM / devfreq: Introduce driver for NVIDIA Tegra20")Signed-off-by Arnd Bergmann <[email protected]>--- drivers/devfreq/Kconfig | 1 + 1 file changed, 1 insertion(+)drivers/devfreq/Kconfig +0
-0
drivers/devfreq/Kconfig config ARM_TEGRA_DEVFREQ · line 113
Quoted 7 lines
drivers/devfreq/Kconfig +1
-0@@ -107,6 +107,7 @@ config ARM_TEGRA_DEVFREQ config ARM_TEGRA20_DEVFREQ tristate "NVIDIA Tegra20 DEVFREQ Driver" depends on (TEGRA_MC && TEGRA20_EMC) || COMPILE_TEST + depends on COMMON_CLK select DEVFREQ_GOV_SIMPLE_ONDEMAND select PM_OPP help
Thanks!
Cheers,
MyungJoo.