Introduce new cpufreq helper macros
v2 cover Introduce new cpufreq helper macros
Hi all,
This patch set introduces two freq_table helper macros which can be used for iteration over cpufreq_frequency_table and makes the necessary changes to cpufreq core and drivers that use such an iteration procedure.
The motivation was a usage of common procedure to iterate over cpufreq_frequency_table across all drivers and cpufreq core.
This was tested on a x86_64 platform.
Most files compiled successfully but unfortunately I was not able to compile sh_sir.c pasemi_cpufreq.c and ppc_cbe_cpufreq.c due to lack of cross compiler.
Changes v1 -> v2
- Rearrange patches
- Remove redundant braces
- Fix a newly introduced bug in exynos5440
- Use cpufreq_for_each_valid_entry instead ofcpufreq_for_each_entry in cpufreq_frequency_table_get_index()
- Drop redundant double ! operator in longhaul and change
the pos loop cursor variable to freq_pos.
- Declare pos variable on a separate line
Stratos Karafotis (8):
cpufreq: Introduce macros for cpufreq_frequency_table iteration
cpufreq: Use cpufreq_for_each_* macros for frequency table iteration
davinci: da850: Use cpufreq_for_each_entry macro for iteration
mips: lemote 2f: se cpufreq_for_each_entry macro for iteration
mfd: db8500-prcmu: Use cpufreq_for_each_entry macro for iteration
thermal: cpu_cooling: Use cpufreq_for_each_valid_entry macro for
iteration
irda: sh_sir: Use cpufreq_for_each_valid_entry macro for iteration
sh: clk: Use cpufreq_for_each_valid_entry macro for iteration
Documentation/cpu-freq/cpu-drivers.txt | 16 ++++++++++ arch/arm/mach-davinci/da850.c | 9 +++--- arch/mips/loongson/lemote-2f/clock.c | 16 +++------- drivers/cpufreq/acpi-cpufreq.c | 9 +++--- drivers/cpufreq/arm_big_little.c | 16 +++++----- drivers/cpufreq/cpufreq.c | 11 +++++++ drivers/cpufreq/cpufreq_stats.c | 24 +++++---------- drivers/cpufreq/dbx500-cpufreq.c | 8 ++--- drivers/cpufreq/elanfreq.c | 9 +++--- drivers/cpufreq/exynos-cpufreq.c | 11 +++---- drivers/cpufreq/exynos5440-cpufreq.c | 30 +++++++++--------- drivers/cpufreq/freq_table.c | 56 +++++++++++++++------------------- drivers/cpufreq/longhaul.c | 13 ++++---- drivers/cpufreq/pasemi-cpufreq.c | 10 +++--- drivers/cpufreq/powernow-k6.c | 14 ++++----- drivers/cpufreq/ppc_cbe_cpufreq.c | 9 +++--- drivers/cpufreq/s3c2416-cpufreq.c | 40 +++++++++++------------- drivers/cpufreq/s3c64xx-cpufreq.c | 15 +++------ drivers/mfd/db8500-prcmu.c | 19 +++++------- drivers/net/irda/sh_sir.c | 14 +++------ drivers/sh/clk/core.c | 20 +++--------- drivers/thermal/cpu_cooling.c | 33 ++++++++------------ include/linux/cpufreq.h | 21 +++++++++++++ 23 files changed, 206 insertions(+), 217 deletions(-)
Signature · 1 line
1.9.0
Quoted 15 lines · Stratos Karafotis
Hi all,
This patch set introduces two
freq_tablehelper macros which can be used for iteration overcpufreq_frequency_tableand makes the necessary changes to cpufreq core and drivers that use such an iteration procedure.The motivation was a usage of common procedure to iterate over
cpufreq_frequency_tableacross all drivers and cpufreq core.This was tested on a
x86_64platform.
Most files compiled successfully but unfortunately I was not able to compilesh_sir.cpasemi_cpufreq.candppc_cbe_cpufreq.cdue to lack of cross compiler.
Quoted 7 lines
Changes v1 -> v2
- Rearrange patches
- Remove redundant braces
- Fix a newly introduced bug in exynos5440
- Usecpufreq_for_each_valid_entryinstead ofcpufreq_for_each_entryincpufreq_frequency_table_get_index()
- Drop redundant double ! operator in longhaul and change
You dropped this !! in thermal stuff and not longhaul :)
Quoted 13 lines
the pos loop cursor variable to
freq_pos.
- Declare pos variable on a separate lineStratos Karafotis (8):
cpufreq: Introduce macros forcpufreq_frequency_tableiteration
cpufreq: Use cpufreq_for_each_* macros for frequency table iteration
davinci: da850: Usecpufreq_for_each_entrymacro for iteration
mips: lemote 2f: secpufreq_for_each_entrymacro for iteration
mfd: db8500-prcmu: Usecpufreq_for_each_entrymacro for iteration
thermal:cpu_cooling: Usecpufreq_for_each_valid_entrymacro for
iteration
irda:sh_sir: Usecpufreq_for_each_valid_entrymacro for iteration
sh: clk: Usecpufreq_for_each_valid_entrymacro for iteration
Quoted 40 lines · Viresh Kumar
Quoted 15 lines · Stratos Karafotis
Hi all,
This patch set introduces two
freq_tablehelper macros which can be used for iteration overcpufreq_frequency_tableand makes the necessary changes to cpufreq core and drivers that use such an iteration procedure.The motivation was a usage of common procedure to iterate over
cpufreq_frequency_tableacross all drivers and cpufreq core.This was tested on a
x86_64platform.
Most files compiled successfully but unfortunately I was not able to compilesh_sir.cpasemi_cpufreq.candppc_cbe_cpufreq.cdue to lack of cross compiler.Quoted 7 lines
Changes v1 -> v2
- Rearrange patches
- Remove redundant braces
- Fix a newly introduced bug in exynos5440
- Usecpufreq_for_each_valid_entryinstead ofcpufreq_for_each_entryincpufreq_frequency_table_get_index()
- Drop redundant double ! operator in longhaul and changeYou dropped this !! in thermal stuff and not longhaul :)
Quoted 13 lines
the pos loop cursor variable to
freq_pos.
- Declare pos variable on a separate lineStratos Karafotis (8):
cpufreq: Introduce macros forcpufreq_frequency_tableiteration
cpufreq: Use cpufreq_for_each_* macros for frequency table iteration
davinci: da850: Usecpufreq_for_each_entrymacro for iteration
mips: lemote 2f: secpufreq_for_each_entrymacro for iteration
mfd: db8500-prcmu: Usecpufreq_for_each_entrymacro for iteration
thermal:cpu_cooling: Usecpufreq_for_each_valid_entrymacro for
iteration
irda:sh_sir: Usecpufreq_for_each_valid_entrymacro for iteration
sh: clk: Usecpufreq_for_each_valid_entrymacro for iteration
Quoted 2 lines
Acked-by Viresh Kumar <[email protected]>
Thanks!
Stratos