Hi Rafael,
Recently Arnd sent few fixes where drivers were using APIs from freq_table.c but haven't selected CPU_FREQ_TABLE. Based on that, I just crossed checked all the places where it should be selected and where it shouldn't be. These are fixes around that.
I have applied these in my cpufreq-kconfig-fixes branch. Will send you a pull request separately once I get some Acks (will wait for few days).
Viresh Kumar (11): cpufreq: blackfin: enable driver for CONFIG_BFIN_CPU_FREQ cpufreq: cris: select CPU_FREQ_TABLE cpufreq: davinci: select CPU_FREQ_TABLE cpufreq: exynos: select CPU_FREQ_TABLE cpufreq: highbank: remove select CPU_FREQ_TABLE cpufreq: imx: select CPU_FREQ_TABLE cpufreq: powerpc: CBE_RAS: select CPU_FREQ_TABLE cpufreq: pxa: select CPU_FREQ_TABLE cpufreq: S3C2416/S3C64XX: select CPU_FREQ_TABLE cpufreq: tegra: select CPU_FREQ_TABLE for ARCH_TEGRA cpufreq: X86_AMD_FREQ_SENSITIVITY: select CPU_FREQ_TABLE
arch/arm/mach-davinci/Kconfig | 1 + arch/arm/mach-pxa/Kconfig | 3 +++ arch/arm/mach-tegra/Kconfig | 4 +--- arch/cris/Kconfig | 2 ++ drivers/cpufreq/Kconfig.arm | 6 +++++- drivers/cpufreq/Kconfig.powerpc | 1 + drivers/cpufreq/Kconfig.x86 | 1 + drivers/cpufreq/Makefile | 2 +- 8 files changed, 15 insertions(+), 5 deletions(-)
By mistake blackfin's cpufreq driver is enabled when CONFIG_BLACKFIN was present, whereas it should have been enabled only when CONFIG_BFIN_CPU_FREQ is present.
Fix it.
Cc: Steven Miao realmz6@gmail.com Cc: uclinux-dist-devel@blackfin.uclinux.org Signed-off-by: Viresh Kumar viresh.kumar@linaro.org --- drivers/cpufreq/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/cpufreq/Makefile b/drivers/cpufreq/Makefile index 315b923..13c3f83 100644 --- a/drivers/cpufreq/Makefile +++ b/drivers/cpufreq/Makefile @@ -83,7 +83,7 @@ obj-$(CONFIG_CPU_FREQ_MAPLE) += maple-cpufreq.o ################################################################################## # Other platform drivers obj-$(CONFIG_AVR32_AT32AP_CPUFREQ) += at32ap-cpufreq.o -obj-$(CONFIG_BLACKFIN) += blackfin-cpufreq.o +obj-$(CONFIG_BFIN_CPU_FREQ) += blackfin-cpufreq.o obj-$(CONFIG_CRIS_MACH_ARTPEC3) += cris-artpec3-cpufreq.o obj-$(CONFIG_ETRAXFS) += cris-etraxfs-cpufreq.o obj-$(CONFIG_IA64_ACPI_CPUFREQ) += ia64-acpi-cpufreq.o
On Wednesday 12 June 2013 04:15:08 Viresh Kumar wrote:
By mistake blackfin's cpufreq driver is enabled when CONFIG_BLACKFIN was present, whereas it should have been enabled only when CONFIG_BFIN_CPU_FREQ is present.
Acked-by: Mike Frysinger vapier@gentoo.org -mike
CPUFreq driver of this platform uses APIs from freq_table.c and so must select CPU_FREQ_TABLE.
Cc: linux-cris-kernel@axis.com Signed-off-by: Viresh Kumar viresh.kumar@linaro.org --- arch/cris/Kconfig | 2 ++ 1 file changed, 2 insertions(+)
diff --git a/arch/cris/Kconfig b/arch/cris/Kconfig index 8769a90..5f7530c 100644 --- a/arch/cris/Kconfig +++ b/arch/cris/Kconfig @@ -134,11 +134,13 @@ config SVINTO_SIM
config ETRAXFS bool "ETRAX-FS-V32" + select CPU_FREQ_TABLE if CPU_FREQ help Support CRIS V32.
config CRIS_MACH_ARTPEC3 bool "ARTPEC-3" + select CPU_FREQ_TABLE if CPU_FREQ help Support Axis ARTPEC-3.
CPUFreq driver of this platform uses APIs from freq_table.c and so must select CPU_FREQ_TABLE.
Cc: Sekhar Nori nsekhar@ti.com Signed-off-by: Viresh Kumar viresh.kumar@linaro.org --- arch/arm/mach-davinci/Kconfig | 1 + 1 file changed, 1 insertion(+)
diff --git a/arch/arm/mach-davinci/Kconfig b/arch/arm/mach-davinci/Kconfig index a075b3e..e026b19 100644 --- a/arch/arm/mach-davinci/Kconfig +++ b/arch/arm/mach-davinci/Kconfig @@ -40,6 +40,7 @@ config ARCH_DAVINCI_DA850 bool "DA850/OMAP-L138/AM18x based system" select ARCH_DAVINCI_DA8XX select ARCH_HAS_CPUFREQ + select CPU_FREQ_TABLE select CP_INTC
config ARCH_DAVINCI_DA8XX
CPUFreq driver of this platform uses APIs from freq_table.c and so must select CPU_FREQ_TABLE.
Cc: Kukjin Kim kgene.kim@samsung.com Signed-off-by: Viresh Kumar viresh.kumar@linaro.org --- drivers/cpufreq/Kconfig.arm | 2 ++ 1 file changed, 2 insertions(+)
diff --git a/drivers/cpufreq/Kconfig.arm b/drivers/cpufreq/Kconfig.arm index 6e57543..9d7e209 100644 --- a/drivers/cpufreq/Kconfig.arm +++ b/drivers/cpufreq/Kconfig.arm @@ -18,6 +18,7 @@ config ARM_DT_BL_CPUFREQ config ARM_EXYNOS_CPUFREQ bool "SAMSUNG EXYNOS SoCs" depends on ARCH_EXYNOS + select CPU_FREQ_TABLE default y help This adds the CPUFreq driver common part for Samsung @@ -46,6 +47,7 @@ config ARM_EXYNOS5250_CPUFREQ config ARM_EXYNOS5440_CPUFREQ def_bool SOC_EXYNOS5440 depends on HAVE_CLK && PM_OPP && OF + select CPU_FREQ_TABLE help This adds the CPUFreq driver for Samsung EXYNOS5440 SoC. The nature of exynos5440 clock controller is
Highbank cpufreq driver doesn't use any APIs from freq_table.c and so must not select CPU_FREQ_TABLE.
Cc: Mark Langsdorf mark.langsdorf@calxeda.com Signed-off-by: Viresh Kumar viresh.kumar@linaro.org --- drivers/cpufreq/Kconfig.arm | 1 - 1 file changed, 1 deletion(-)
diff --git a/drivers/cpufreq/Kconfig.arm b/drivers/cpufreq/Kconfig.arm index 9d7e209..891dd1c 100644 --- a/drivers/cpufreq/Kconfig.arm +++ b/drivers/cpufreq/Kconfig.arm @@ -57,7 +57,6 @@ config ARM_EXYNOS5440_CPUFREQ config ARM_HIGHBANK_CPUFREQ tristate "Calxeda Highbank-based" depends on ARCH_HIGHBANK - select CPU_FREQ_TABLE select GENERIC_CPUFREQ_CPU0 select PM_OPP select REGULATOR
On 06/12/2013 03:15 AM, Viresh Kumar wrote:
Highbank cpufreq driver doesn't use any APIs from freq_table.c and so must not select CPU_FREQ_TABLE.
Cc: Mark Langsdorf mark.langsdorf@calxeda.com Signed-off-by: Viresh Kumar viresh.kumar@linaro.org
Thanks for catching this.
Acked-by: Mark Langsdorf mark.langsdorf@calxeda.com
drivers/cpufreq/Kconfig.arm | 1 - 1 file changed, 1 deletion(-)
diff --git a/drivers/cpufreq/Kconfig.arm b/drivers/cpufreq/Kconfig.arm index 9d7e209..891dd1c 100644 --- a/drivers/cpufreq/Kconfig.arm +++ b/drivers/cpufreq/Kconfig.arm @@ -57,7 +57,6 @@ config ARM_EXYNOS5440_CPUFREQ config ARM_HIGHBANK_CPUFREQ tristate "Calxeda Highbank-based" depends on ARCH_HIGHBANK
- select CPU_FREQ_TABLE select GENERIC_CPUFREQ_CPU0 select PM_OPP select REGULATOR
CPUFreq driver of this platform uses APIs from freq_table.c and so must select CPU_FREQ_TABLE.
Cc: Shawn Guo shawn.guo@linaro.org Signed-off-by: Viresh Kumar viresh.kumar@linaro.org --- drivers/cpufreq/Kconfig.arm | 1 + 1 file changed, 1 insertion(+)
diff --git a/drivers/cpufreq/Kconfig.arm b/drivers/cpufreq/Kconfig.arm index 891dd1c..dc26303 100644 --- a/drivers/cpufreq/Kconfig.arm +++ b/drivers/cpufreq/Kconfig.arm @@ -72,6 +72,7 @@ config ARM_IMX6Q_CPUFREQ tristate "Freescale i.MX6Q cpufreq support" depends on SOC_IMX6Q depends on REGULATOR_ANATOP + select CPU_FREQ_TABLE help This adds cpufreq driver support for Freescale i.MX6Q SOC.
On Wed, Jun 12, 2013 at 01:45:13PM +0530, Viresh Kumar wrote:
CPUFreq driver of this platform uses APIs from freq_table.c and so must select CPU_FREQ_TABLE.
Cc: Shawn Guo shawn.guo@linaro.org Signed-off-by: Viresh Kumar viresh.kumar@linaro.org
Acked-by: Shawn Guo shawn.guo@linaro.org
drivers/cpufreq/Kconfig.arm | 1 + 1 file changed, 1 insertion(+)
diff --git a/drivers/cpufreq/Kconfig.arm b/drivers/cpufreq/Kconfig.arm index 891dd1c..dc26303 100644 --- a/drivers/cpufreq/Kconfig.arm +++ b/drivers/cpufreq/Kconfig.arm @@ -72,6 +72,7 @@ config ARM_IMX6Q_CPUFREQ tristate "Freescale i.MX6Q cpufreq support" depends on SOC_IMX6Q depends on REGULATOR_ANATOP
- select CPU_FREQ_TABLE help This adds cpufreq driver support for Freescale i.MX6Q SOC.
1.7.12.rc2.18.g61b472e
CPUFreq driver of this platform uses APIs from freq_table.c and so must select CPU_FREQ_TABLE.
Cc: linuxppc-dev@lists.ozlabs.org Signed-off-by: Viresh Kumar viresh.kumar@linaro.org --- drivers/cpufreq/Kconfig.powerpc | 1 + 1 file changed, 1 insertion(+)
diff --git a/drivers/cpufreq/Kconfig.powerpc b/drivers/cpufreq/Kconfig.powerpc index 9c926ca..68c1abc 100644 --- a/drivers/cpufreq/Kconfig.powerpc +++ b/drivers/cpufreq/Kconfig.powerpc @@ -1,6 +1,7 @@ config CPU_FREQ_CBE tristate "CBE frequency scaling" depends on CBE_RAS && PPC_CELL + select CPU_FREQ_TABLE default m help This adds the cpufreq driver for Cell BE processors.
CPUFreq driver of this platform uses APIs from freq_table.c and so must select CPU_FREQ_TABLE.
Cc: Eric Miao eric.y.miao@gmail.com Signed-off-by: Viresh Kumar viresh.kumar@linaro.org --- arch/arm/mach-pxa/Kconfig | 3 +++ 1 file changed, 3 insertions(+)
diff --git a/arch/arm/mach-pxa/Kconfig b/arch/arm/mach-pxa/Kconfig index 96100db..a842711 100644 --- a/arch/arm/mach-pxa/Kconfig +++ b/arch/arm/mach-pxa/Kconfig @@ -615,12 +615,14 @@ endmenu config PXA25x bool select CPU_XSCALE + select CPU_FREQ_TABLE if CPU_FREQ help Select code specific to PXA21x/25x/26x variants
config PXA27x bool select CPU_XSCALE + select CPU_FREQ_TABLE if CPU_FREQ help Select code specific to PXA27x variants
@@ -633,6 +635,7 @@ config CPU_PXA26x config PXA3xx bool select CPU_XSC3 + select CPU_FREQ_TABLE if CPU_FREQ help Select code specific to PXA3xx variants
CPUFreq driver of this platform uses APIs from freq_table.c and so must select CPU_FREQ_TABLE.
Cc: Heiko Stuebner heiko@sntech.de Signed-off-by: Viresh Kumar viresh.kumar@linaro.org --- drivers/cpufreq/Kconfig.arm | 2 ++ 1 file changed, 2 insertions(+)
diff --git a/drivers/cpufreq/Kconfig.arm b/drivers/cpufreq/Kconfig.arm index dc26303..d52261b 100644 --- a/drivers/cpufreq/Kconfig.arm +++ b/drivers/cpufreq/Kconfig.arm @@ -101,6 +101,7 @@ config ARM_OMAP2PLUS_CPUFREQ config ARM_S3C2416_CPUFREQ bool "S3C2416 CPU Frequency scaling support" depends on CPU_S3C2416 + select CPU_FREQ_TABLE help This adds the CPUFreq driver for the Samsung S3C2416 and S3C2450 SoC. The S3C2416 supports changing the rate of the @@ -123,6 +124,7 @@ config ARM_S3C2416_CPUFREQ_VCORESCALE config ARM_S3C64XX_CPUFREQ bool "Samsung S3C64XX" depends on CPU_S3C6410 + select CPU_FREQ_TABLE default y help This adds the CPUFreq driver for Samsung S3C6410 SoC.
Am Mittwoch, 12. Juni 2013, 10:15:16 schrieb Viresh Kumar:
CPUFreq driver of this platform uses APIs from freq_table.c and so must select CPU_FREQ_TABLE.
Cc: Heiko Stuebner heiko@sntech.de
For the s3c2416-part Acked-by: Heiko Stuebner heiko@sntech.de
Signed-off-by: Viresh Kumar viresh.kumar@linaro.org
drivers/cpufreq/Kconfig.arm | 2 ++ 1 file changed, 2 insertions(+)
diff --git a/drivers/cpufreq/Kconfig.arm b/drivers/cpufreq/Kconfig.arm index dc26303..d52261b 100644 --- a/drivers/cpufreq/Kconfig.arm +++ b/drivers/cpufreq/Kconfig.arm @@ -101,6 +101,7 @@ config ARM_OMAP2PLUS_CPUFREQ config ARM_S3C2416_CPUFREQ bool "S3C2416 CPU Frequency scaling support" depends on CPU_S3C2416
- select CPU_FREQ_TABLE help This adds the CPUFreq driver for the Samsung S3C2416 and S3C2450 SoC. The S3C2416 supports changing the rate of the
@@ -123,6 +124,7 @@ config ARM_S3C2416_CPUFREQ_VCORESCALE config ARM_S3C64XX_CPUFREQ bool "Samsung S3C64XX" depends on CPU_S3C6410
- select CPU_FREQ_TABLE default y help This adds the CPUFreq driver for Samsung S3C6410 SoC.
ARCH_TEGRA selects ARCH_HAS_CPUFREQ, so CPUFREQ will be enabled for all variants of TEGRA. CPUFreq driver for tegra is enabled if ARCH_TEGRA is selected. Driver uses APIs from freq_table.c and so we must select CPU_FREQ_TABLE for ARCH_TEGRA.
This also removes select CPU_FREQ_TABLE from individual tegra variants.
Cc: Stephen Warren swarren@nvidia.com Signed-off-by: Viresh Kumar viresh.kumar@linaro.org --- arch/arm/mach-tegra/Kconfig | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/arch/arm/mach-tegra/Kconfig b/arch/arm/mach-tegra/Kconfig index 84d72fc..3636b6c 100644 --- a/arch/arm/mach-tegra/Kconfig +++ b/arch/arm/mach-tegra/Kconfig @@ -6,6 +6,7 @@ config ARCH_TEGRA select CLKSRC_MMIO select CLKSRC_OF select COMMON_CLK + select CPU_FREQ_TABLE select GENERIC_CLOCKEVENTS select HAVE_ARM_SCU if SMP select HAVE_ARM_TWD if LOCAL_TIMERS @@ -28,7 +29,6 @@ config ARCH_TEGRA_2x_SOC select ARM_ERRATA_754327 if SMP select ARM_ERRATA_764369 if SMP select ARM_GIC - select CPU_FREQ_TABLE if CPU_FREQ select CPU_V7 select PINCTRL select PINCTRL_TEGRA20 @@ -46,7 +46,6 @@ config ARCH_TEGRA_3x_SOC select ARM_ERRATA_754322 select ARM_ERRATA_764369 if SMP select ARM_GIC - select CPU_FREQ_TABLE if CPU_FREQ select CPU_V7 select PINCTRL select PINCTRL_TEGRA30 @@ -63,7 +62,6 @@ config ARCH_TEGRA_114_SOC select ARM_ARCH_TIMER select ARM_GIC select ARM_L1_CACHE_SHIFT_6 - select CPU_FREQ_TABLE if CPU_FREQ select CPU_V7 select PINCTRL select PINCTRL_TEGRA114
On 06/12/2013 02:15 AM, Viresh Kumar wrote:
ARCH_TEGRA selects ARCH_HAS_CPUFREQ, so CPUFREQ will be enabled for all variants of TEGRA. CPUFreq driver for tegra is enabled if ARCH_TEGRA is selected. Driver uses APIs from freq_table.c and so we must select CPU_FREQ_TABLE for ARCH_TEGRA.
This also removes select CPU_FREQ_TABLE from individual tegra variants.
I guess the real issue here is that drivers/cpufreq/tegra-cpufreq.c gets built based on ARCH_TEGRA, which doesn't depend on nor select CPU_FREQ itself, so:
select CPU_FREQ_TABLE if CPU_FREQ
... isn't guaranteed to fire.
The correct solution seems to be:
* Add CONFIG_ARM_TEGRA_CPUFREQ to drivers/cpufreq/Kconfig.arm. * Make that Kconfig option selct CPU_FREQ_TABLE. * Make that Kconfig option be def_bool ARCH_TEGRA. * Modify drivers/cpufreq/Makefile to build tegra-cpufreq.c based on that. * Remove all the cpufreq-related stuff from arch/arm/mach-tegra/Kconfig.
That way, tegra-cpufreq.c can't be built if !CPU_FREQ, and Tegra's cpufreq works the same way as all the other cpufreq drivers.
On 12 June 2013 21:20, Stephen Warren swarren@wwwdotorg.org wrote:
On 06/12/2013 02:15 AM, Viresh Kumar wrote:
ARCH_TEGRA selects ARCH_HAS_CPUFREQ, so CPUFREQ will be enabled for all variants of TEGRA. CPUFreq driver for tegra is enabled if ARCH_TEGRA is selected. Driver uses APIs from freq_table.c and so we must select CPU_FREQ_TABLE for ARCH_TEGRA.
This also removes select CPU_FREQ_TABLE from individual tegra variants.
I guess the real issue here is that drivers/cpufreq/tegra-cpufreq.c gets built based on ARCH_TEGRA, which doesn't depend on nor select CPU_FREQ itself, so:
select CPU_FREQ_TABLE if CPU_FREQ
... isn't guaranteed to fire.
The correct solution seems to be:
- Add CONFIG_ARM_TEGRA_CPUFREQ to drivers/cpufreq/Kconfig.arm.
- Make that Kconfig option selct CPU_FREQ_TABLE.
- Make that Kconfig option be def_bool ARCH_TEGRA.
- Modify drivers/cpufreq/Makefile to build tegra-cpufreq.c based on that.
- Remove all the cpufreq-related stuff from arch/arm/mach-tegra/Kconfig.
That way, tegra-cpufreq.c can't be built if !CPU_FREQ, and Tegra's cpufreq works the same way as all the other cpufreq drivers.
Hmmm. check this out (attached too for you to test):
----------x---------------x------------
From: Viresh Kumar viresh.kumar@linaro.org Date: Wed, 12 Jun 2013 12:05:48 +0530 Subject: [PATCH] cpufreq: tegra: create CONFIG_ARM_TEGRA_CPUFREQ
currently Tegra cpufreq driver gets built based on ARCH_TEGRA, which doesn't depend on nor select CPU_FREQ itself, so:
select CPU_FREQ_TABLE if CPU_FREQ
... isn't guaranteed to fire.
The correct solution seems to be:
* Add CONFIG_ARM_TEGRA_CPUFREQ to drivers/cpufreq/Kconfig.arm. * Make that Kconfig option selct CPU_FREQ_TABLE. * Make that Kconfig option be def_bool ARCH_TEGRA. * Modify drivers/cpufreq/Makefile to build tegra-cpufreq.c based on that. * Remove all the cpufreq-related stuff from arch/arm/mach-tegra/Kconfig.
That way, tegra-cpufreq.c can't be built if !CPU_FREQ, and Tegra's cpufreq works the same way as all the other cpufreq drivers.
This patch does it.
Suggested-by: Stephen Warren swarren@nvidia.com Acked-by: Arnd Bergmann arnd@arndb.de Signed-off-by: Viresh Kumar viresh.kumar@linaro.org --- arch/arm/mach-tegra/Kconfig | 3 --- drivers/cpufreq/Kconfig.arm | 8 ++++++++ drivers/cpufreq/Makefile | 2 +- 3 files changed, 9 insertions(+), 4 deletions(-)
diff --git a/arch/arm/mach-tegra/Kconfig b/arch/arm/mach-tegra/Kconfig index 84d72fc..5c0db06 100644 --- a/arch/arm/mach-tegra/Kconfig +++ b/arch/arm/mach-tegra/Kconfig @@ -28,7 +28,6 @@ config ARCH_TEGRA_2x_SOC select ARM_ERRATA_754327 if SMP select ARM_ERRATA_764369 if SMP select ARM_GIC - select CPU_FREQ_TABLE if CPU_FREQ select CPU_V7 select PINCTRL select PINCTRL_TEGRA20 @@ -46,7 +45,6 @@ config ARCH_TEGRA_3x_SOC select ARM_ERRATA_754322 select ARM_ERRATA_764369 if SMP select ARM_GIC - select CPU_FREQ_TABLE if CPU_FREQ select CPU_V7 select PINCTRL select PINCTRL_TEGRA30 @@ -63,7 +61,6 @@ config ARCH_TEGRA_114_SOC select ARM_ARCH_TIMER select ARM_GIC select ARM_L1_CACHE_SHIFT_6 - select CPU_FREQ_TABLE if CPU_FREQ select CPU_V7 select PINCTRL select PINCTRL_TEGRA114 diff --git a/drivers/cpufreq/Kconfig.arm b/drivers/cpufreq/Kconfig.arm index d52261b..5085427 100644 --- a/drivers/cpufreq/Kconfig.arm +++ b/drivers/cpufreq/Kconfig.arm @@ -154,3 +154,11 @@ config ARM_SPEAR_CPUFREQ default y help This adds the CPUFreq driver support for SPEAr SOCs. + +config ARM_TEGRA_CPUFREQ + bool "TEGRA CPUFreq support" + depends on ARCH_TEGRA + select CPU_FREQ_TABLE + default y + help + This adds the CPUFreq driver support for TEGRA SOCs. diff --git a/drivers/cpufreq/Makefile b/drivers/cpufreq/Makefile index 13c3f83..9c873e7 100644 --- a/drivers/cpufreq/Makefile +++ b/drivers/cpufreq/Makefile @@ -71,7 +71,7 @@ obj-$(CONFIG_ARM_S5PV210_CPUFREQ) += s5pv210-cpufreq.o obj-$(CONFIG_ARM_SA1100_CPUFREQ) += sa1100-cpufreq.o obj-$(CONFIG_ARM_SA1110_CPUFREQ) += sa1110-cpufreq.o obj-$(CONFIG_ARM_SPEAR_CPUFREQ) += spear-cpufreq.o -obj-$(CONFIG_ARCH_TEGRA) += tegra-cpufreq.o +obj-$(CONFIG_ARM_TEGRA_CPUFREQ) += tegra-cpufreq.o
################################################################################## # PowerPC platform drivers
On 06/12/2013 10:24 PM, Viresh Kumar wrote:
On 12 June 2013 21:20, Stephen Warren swarren@wwwdotorg.org wrote:
On 06/12/2013 02:15 AM, Viresh Kumar wrote:
ARCH_TEGRA selects ARCH_HAS_CPUFREQ, so CPUFREQ will be enabled for all variants of TEGRA. CPUFreq driver for tegra is enabled if ARCH_TEGRA is selected. Driver uses APIs from freq_table.c and so we must select CPU_FREQ_TABLE for ARCH_TEGRA.
This also removes select CPU_FREQ_TABLE from individual tegra variants.
I guess the real issue here is that drivers/cpufreq/tegra-cpufreq.c gets built based on ARCH_TEGRA, which doesn't depend on nor select CPU_FREQ itself, so:
select CPU_FREQ_TABLE if CPU_FREQ
... isn't guaranteed to fire.
The correct solution seems to be:
- Add CONFIG_ARM_TEGRA_CPUFREQ to drivers/cpufreq/Kconfig.arm.
- Make that Kconfig option selct CPU_FREQ_TABLE.
- Make that Kconfig option be def_bool ARCH_TEGRA.
- Modify drivers/cpufreq/Makefile to build tegra-cpufreq.c based on that.
- Remove all the cpufreq-related stuff from arch/arm/mach-tegra/Kconfig.
That way, tegra-cpufreq.c can't be built if !CPU_FREQ, and Tegra's cpufreq works the same way as all the other cpufreq drivers.
Hmmm. check this out (attached too for you to test):
This certainly generates the correct .config when I "make tegra_defconfig" after applying it, and a build after disabling CPU_FREQ links OK, so,
Tested-by: Stephen Warren swarren@nvidia.com Acked-by: Stephen Warren swarren@nvidia.com
(I assume this patch would go through the cpufreq tree?)
On 13 June 2013 21:13, Stephen Warren swarren@wwwdotorg.org wrote:
On 06/12/2013 10:24 PM, Viresh Kumar wrote:
On 12 June 2013 21:20, Stephen Warren swarren@wwwdotorg.org wrote:
On 06/12/2013 02:15 AM, Viresh Kumar wrote:
ARCH_TEGRA selects ARCH_HAS_CPUFREQ, so CPUFREQ will be enabled for all variants of TEGRA. CPUFreq driver for tegra is enabled if ARCH_TEGRA is selected. Driver uses APIs from freq_table.c and so we must select CPU_FREQ_TABLE for ARCH_TEGRA.
This also removes select CPU_FREQ_TABLE from individual tegra variants.
I guess the real issue here is that drivers/cpufreq/tegra-cpufreq.c gets built based on ARCH_TEGRA, which doesn't depend on nor select CPU_FREQ itself, so:
select CPU_FREQ_TABLE if CPU_FREQ
... isn't guaranteed to fire.
The correct solution seems to be:
- Add CONFIG_ARM_TEGRA_CPUFREQ to drivers/cpufreq/Kconfig.arm.
- Make that Kconfig option selct CPU_FREQ_TABLE.
- Make that Kconfig option be def_bool ARCH_TEGRA.
- Modify drivers/cpufreq/Makefile to build tegra-cpufreq.c based on that.
- Remove all the cpufreq-related stuff from arch/arm/mach-tegra/Kconfig.
That way, tegra-cpufreq.c can't be built if !CPU_FREQ, and Tegra's cpufreq works the same way as all the other cpufreq drivers.
Hmmm. check this out (attached too for you to test):
This certainly generates the correct .config when I "make tegra_defconfig" after applying it, and a build after disabling CPU_FREQ links OK, so,
Yeah, I also compile tested it.
Tested-by: Stephen Warren swarren@nvidia.com Acked-by: Stephen Warren swarren@nvidia.com
(I assume this patch would go through the cpufreq tree?)
Yes. Via my ARM cpufreq tree.
This CPUFreq driver uses APIs from freq_table.c and so must select CPU_FREQ_TABLE.
Cc: Jacob Shin jacob.shin@amd.com Signed-off-by: Viresh Kumar viresh.kumar@linaro.org --- drivers/cpufreq/Kconfig.x86 | 1 + 1 file changed, 1 insertion(+)
diff --git a/drivers/cpufreq/Kconfig.x86 b/drivers/cpufreq/Kconfig.x86 index 6bd63d6..e2b6eab 100644 --- a/drivers/cpufreq/Kconfig.x86 +++ b/drivers/cpufreq/Kconfig.x86 @@ -132,6 +132,7 @@ config X86_POWERNOW_K8 config X86_AMD_FREQ_SENSITIVITY tristate "AMD frequency sensitivity feedback powersave bias" depends on CPU_FREQ_GOV_ONDEMAND && X86_ACPI_CPUFREQ && CPU_SUP_AMD + select CPU_FREQ_TABLE help This adds AMD-specific powersave bias function to the ondemand governor, which allows it to make more power-conscious frequency
On Wed, Jun 12, 2013 at 01:45:18PM +0530, Viresh Kumar wrote:
This CPUFreq driver uses APIs from freq_table.c and so must select CPU_FREQ_TABLE.
Ah, thanks for cathcing this!
Cc: Jacob Shin jacob.shin@amd.com Signed-off-by: Viresh Kumar viresh.kumar@linaro.org
Acked-by: Jacob Shin jacob.shin@amd.com
drivers/cpufreq/Kconfig.x86 | 1 + 1 file changed, 1 insertion(+)
diff --git a/drivers/cpufreq/Kconfig.x86 b/drivers/cpufreq/Kconfig.x86 index 6bd63d6..e2b6eab 100644 --- a/drivers/cpufreq/Kconfig.x86 +++ b/drivers/cpufreq/Kconfig.x86 @@ -132,6 +132,7 @@ config X86_POWERNOW_K8 config X86_AMD_FREQ_SENSITIVITY tristate "AMD frequency sensitivity feedback powersave bias" depends on CPU_FREQ_GOV_ONDEMAND && X86_ACPI_CPUFREQ && CPU_SUP_AMD
- select CPU_FREQ_TABLE help This adds AMD-specific powersave bias function to the ondemand governor, which allows it to make more power-conscious frequency
-- 1.7.12.rc2.18.g61b472e
On Wednesday 12 June 2013, Viresh Kumar wrote:
Recently Arnd sent few fixes where drivers were using APIs from freq_table.c but haven't selected CPU_FREQ_TABLE. Based on that, I just crossed checked all the places where it should be selected and where it shouldn't be. These are fixes around that.
I have applied these in my cpufreq-kconfig-fixes branch. Will send you a pull request separately once I get some Acks (will wait for few days).
Acked-by: Arnd Bergmann arnd@arndb.de
I don't see a patch for big.LITTLE in either linux-next or this series. Did you miss that or has it just not made into linux-next yet?
Arnd
On 12 June 2013 18:16, Arnd Bergmann arnd@arndb.de wrote:
On Wednesday 12 June 2013, Viresh Kumar wrote:
Recently Arnd sent few fixes where drivers were using APIs from freq_table.c but haven't selected CPU_FREQ_TABLE. Based on that, I just crossed checked all the places where it should be selected and where it shouldn't be. These are fixes around that.
I have applied these in my cpufreq-kconfig-fixes branch. Will send you a pull request separately once I get some Acks (will wait for few days).
Acked-by: Arnd Bergmann arnd@arndb.de
I don't see a patch for big.LITTLE in either linux-next or this series. Did you miss that or has it just not made into linux-next yet?
My ARM branch was pulled in by Rafael, 2 days back. Don't know why didn't you saw that.
On Wednesday 12 June 2013, Viresh Kumar wrote:
On 12 June 2013 18:16, Arnd Bergmann arnd@arndb.de wrote:
On Wednesday 12 June 2013, Viresh Kumar wrote:
Recently Arnd sent few fixes where drivers were using APIs from freq_table.c but haven't selected CPU_FREQ_TABLE. Based on that, I just crossed checked all the places where it should be selected and where it shouldn't be. These are fixes around that.
I have applied these in my cpufreq-kconfig-fixes branch. Will send you a pull request separately once I get some Acks (will wait for few days).
Acked-by: Arnd Bergmann arnd@arndb.de
I don't see a patch for big.LITTLE in either linux-next or this series. Did you miss that or has it just not made into linux-next yet?
My ARM branch was pulled in by Rafael, 2 days back. Don't know why didn't you saw that.
Ah, it seems we haven't had a new linux-next since friday.
Arnd
On Wednesday, June 12, 2013 04:49:41 PM Arnd Bergmann wrote:
On Wednesday 12 June 2013, Viresh Kumar wrote:
On 12 June 2013 18:16, Arnd Bergmann arnd@arndb.de wrote:
On Wednesday 12 June 2013, Viresh Kumar wrote:
Recently Arnd sent few fixes where drivers were using APIs from freq_table.c but haven't selected CPU_FREQ_TABLE. Based on that, I just crossed checked all the places where it should be selected and where it shouldn't be. These are fixes around that.
I have applied these in my cpufreq-kconfig-fixes branch. Will send you a pull request separately once I get some Acks (will wait for few days).
Acked-by: Arnd Bergmann arnd@arndb.de
I don't see a patch for big.LITTLE in either linux-next or this series. Did you miss that or has it just not made into linux-next yet?
My ARM branch was pulled in by Rafael, 2 days back. Don't know why didn't you saw that.
Ah, it seems we haven't had a new linux-next since friday.
Yup, no linux-next this week.
Rafael
linaro-kernel@lists.linaro.org