linux-hardened/drivers/cpufreq
Viresh Kumar 9c0ebcf78f cpufreq: Implement light weight ->target_index() routine
Currently, the prototype of cpufreq_drivers target routines is:

int target(struct cpufreq_policy *policy, unsigned int target_freq,
		unsigned int relation);

And most of the drivers call cpufreq_frequency_table_target() to get a valid
index of their frequency table which is closest to the target_freq. And they
don't use target_freq and relation after that.

So, it makes sense to just do this work in cpufreq core before calling
cpufreq_frequency_table_target() and simply pass index instead. But this can be
done only with drivers which expose their frequency table with cpufreq core. For
others we need to stick with the old prototype of target() until those drivers
are converted to expose frequency tables.

This patch implements the new light weight prototype for target_index() routine.
It looks like this:

int target_index(struct cpufreq_policy *policy, unsigned int index);

CPUFreq core will call cpufreq_frequency_table_target() before calling this
routine and pass index to it. Because CPUFreq core now requires to call routines
present in freq_table.c CONFIG_CPU_FREQ_TABLE must be enabled all the time.

This also marks target() interface as deprecated. So, that new drivers avoid
using it. And Documentation is updated accordingly.

It also converts existing .target() to newly defined light weight
.target_index() routine for many driver.

Acked-by: Hans-Christian Egtvedt <egtvedt@samfundet.no>
Acked-by: Jesper Nilsson <jesper.nilsson@axis.com>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
Acked-by: Russell King <linux@arm.linux.org.uk>
Acked-by: David S. Miller <davem@davemloft.net>
Tested-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Rafael J. Wysocki <rjw@rjwysocki.net>
2013-10-25 22:42:24 +02:00
..
acpi-cpufreq.c cpufreq: Implement light weight ->target_index() routine 2013-10-25 22:42:24 +02:00
amd_freq_sensitivity.c cpufreq: AMD "frequency sensitivity feedback" powersave bias for ondemand governor 2013-04-10 13:19:26 +02:00
arm_big_little.c cpufreq: Implement light weight ->target_index() routine 2013-10-25 22:42:24 +02:00
arm_big_little.h cpufreq: ARM big LITTLE: Move cpu_to_cluster() to arm_big_little.h 2013-05-12 14:04:15 +02:00
arm_big_little_dt.c PM / OPP: rename header to linux/pm_opp.h 2013-10-25 22:33:23 +02:00
at32ap-cpufreq.c cpufreq: Implement light weight ->target_index() routine 2013-10-25 22:42:24 +02:00
blackfin-cpufreq.c cpufreq: Implement light weight ->target_index() routine 2013-10-25 22:42:24 +02:00
cpufreq-cpu0.c cpufreq: Implement light weight ->target_index() routine 2013-10-25 22:42:24 +02:00
cpufreq-nforce2.c cpufreq: nforce2: don't initialize part of policy set by core 2013-10-16 00:50:29 +02:00
cpufreq.c cpufreq: Implement light weight ->target_index() routine 2013-10-25 22:42:24 +02:00
cpufreq_conservative.c cpufreq: governors: Remove duplicate check of target freq in supported range 2013-08-28 22:03:02 +02:00
cpufreq_governor.c cpufreq: Don't use smp_processor_id() in preemptible context 2013-08-29 22:19:23 +02:00
cpufreq_governor.h cpufreq: use cpufreq_driver->flags to mark CPUFREQ_HAVE_GOVERNOR_PER_POLICY 2013-10-16 00:50:23 +02:00
cpufreq_ondemand.c cpufreq: governors: Remove duplicate check of target freq in supported range 2013-08-28 22:03:02 +02:00
cpufreq_performance.c cpufreq: Clean up header files included in the core 2013-08-07 23:34:09 +02:00
cpufreq_powersave.c cpufreq: Clean up header files included in the core 2013-08-07 23:34:09 +02:00
cpufreq_stats.c cpufreq: Fix wrong time unit conversion 2013-09-10 02:49:46 +02:00
cpufreq_userspace.c cpufreq / governor: Remove fossil comment 2013-10-17 23:00:20 +02:00
cris-artpec3-cpufreq.c cpufreq: Implement light weight ->target_index() routine 2013-10-25 22:42:24 +02:00
cris-etraxfs-cpufreq.c cpufreq: Implement light weight ->target_index() routine 2013-10-25 22:42:24 +02:00
davinci-cpufreq.c cpufreq: Implement light weight ->target_index() routine 2013-10-25 22:42:24 +02:00
dbx500-cpufreq.c cpufreq: Implement light weight ->target_index() routine 2013-10-25 22:42:24 +02:00
e_powersaver.c cpufreq: Implement light weight ->target_index() routine 2013-10-25 22:42:24 +02:00
elanfreq.c cpufreq: Implement light weight ->target_index() routine 2013-10-25 22:42:24 +02:00
exynos-cpufreq.c cpufreq: Implement light weight ->target_index() routine 2013-10-25 22:42:24 +02:00
exynos-cpufreq.h cpufreq: fix EXYNOS drivers selection 2013-08-12 12:00:21 +05:30
exynos4x12-cpufreq.c cpufreq: exynos4x12: Use the common clock framework to set APLL clock rate 2013-10-17 13:52:48 +02:00
exynos4210-cpufreq.c cpufreq: exynos4210: Use the common clock framework to set APLL clock rate 2013-10-17 13:52:49 +02:00
exynos5250-cpufreq.c arm-soc: cleanups 2013-02-21 14:58:40 -08:00
exynos5440-cpufreq.c cpufreq: Implement light weight ->target_index() routine 2013-10-25 22:42:24 +02:00
freq_table.c cpufreq: define generic .attr, .exit() and .verify() routines 2013-10-16 00:50:23 +02:00
gx-suspmod.c cpufreq: gx: don't initialize part of policy set by core 2013-10-16 00:50:30 +02:00
highbank-cpufreq.c cpufreq: highbank-cpufreq: Enable Midway/ECX-2000 2013-10-17 00:53:08 +02:00
ia64-acpi-cpufreq.c cpufreq: Implement light weight ->target_index() routine 2013-10-25 22:42:24 +02:00
imx6q-cpufreq.c cpufreq: Implement light weight ->target_index() routine 2013-10-25 22:42:24 +02:00
integrator-cpufreq.c cpufreq: integrator: don't initialize part of policy set by core 2013-10-16 00:50:30 +02:00
intel_pstate.c Merge back earlier 'pm-cpufreq' material. 2013-10-25 22:36:40 +02:00
Kconfig cpufreq: remove CONFIG_CPU_FREQ_TABLE 2013-10-16 00:50:33 +02:00
Kconfig.arm cpufreq: remove CONFIG_CPU_FREQ_TABLE 2013-10-16 00:50:33 +02:00
Kconfig.powerpc cpufreq: remove CONFIG_CPU_FREQ_TABLE 2013-10-16 00:50:33 +02:00
Kconfig.x86 cpufreq: remove CONFIG_CPU_FREQ_TABLE 2013-10-16 00:50:33 +02:00
kirkwood-cpufreq.c cpufreq: Implement light weight ->target_index() routine 2013-10-25 22:42:24 +02:00
longhaul.c cpufreq: Implement light weight ->target_index() routine 2013-10-25 22:42:24 +02:00
longhaul.h cpufreq: delete __cpuinit usage from all cpufreq files 2013-07-14 19:36:57 -04:00
longrun.c cpufreq: add new routine cpufreq_verify_within_cpu_limits() 2013-10-16 00:50:23 +02:00
loongson2_cpufreq.c cpufreq: Implement light weight ->target_index() routine 2013-10-25 22:42:24 +02:00
Makefile cpufreq: remove CONFIG_CPU_FREQ_TABLE 2013-10-16 00:50:33 +02:00
maple-cpufreq.c cpufreq: Implement light weight ->target_index() routine 2013-10-25 22:42:24 +02:00
omap-cpufreq.c cpufreq: Implement light weight ->target_index() routine 2013-10-25 22:42:24 +02:00
p4-clockmod.c cpufreq: Implement light weight ->target_index() routine 2013-10-25 22:42:24 +02:00
pasemi-cpufreq.c cpufreq: Implement light weight ->target_index() routine 2013-10-25 22:42:24 +02:00
pcc-cpufreq.c cpufreq: pcc: don't initialize part of policy set by core 2013-10-16 00:50:31 +02:00
pmac32-cpufreq.c cpufreq: Implement light weight ->target_index() routine 2013-10-25 22:42:24 +02:00
pmac64-cpufreq.c cpufreq: Implement light weight ->target_index() routine 2013-10-25 22:42:24 +02:00
powernow-k6.c cpufreq: Implement light weight ->target_index() routine 2013-10-25 22:42:24 +02:00
powernow-k7.c cpufreq: Implement light weight ->target_index() routine 2013-10-25 22:42:24 +02:00
powernow-k7.h [CPUFREQ] Move x86 drivers to drivers/cpufreq/ 2011-05-19 18:51:07 -04:00
powernow-k8.c cpufreq: Implement light weight ->target_index() routine 2013-10-25 22:42:24 +02:00
powernow-k8.h cpufreq: Remove support for hardware P-state chips from powernow-k8 2012-09-09 22:05:30 +02:00
ppc-corenet-cpufreq.c cpufreq: Implement light weight ->target_index() routine 2013-10-25 22:42:24 +02:00
ppc_cbe_cpufreq.c cpufreq: Implement light weight ->target_index() routine 2013-10-25 22:42:24 +02:00
ppc_cbe_cpufreq.h cpufreq: powerpc/platforms/cell: move cpufreq driver to drivers/cpufreq 2013-04-10 13:19:26 +02:00
ppc_cbe_cpufreq_pervasive.c cpufreq: powerpc/platforms/cell: move cpufreq driver to drivers/cpufreq 2013-04-10 13:19:26 +02:00
ppc_cbe_cpufreq_pmi.c cpufreq: powerpc/platforms/cell: move cpufreq driver to drivers/cpufreq 2013-04-10 13:19:26 +02:00
pxa2xx-cpufreq.c cpufreq: Implement light weight ->target_index() routine 2013-10-25 22:42:24 +02:00
pxa3xx-cpufreq.c cpufreq: Implement light weight ->target_index() routine 2013-10-25 22:42:24 +02:00
s3c24xx-cpufreq-debugfs.c cpufreq: s3c24xx: move cpufreq driver to drivers/cpufreq 2013-05-20 23:04:28 +09:00
s3c24xx-cpufreq.c cpufreq: s3c: use cpufreq_generic_init() 2013-10-16 00:50:35 +02:00
s3c64xx-cpufreq.c cpufreq: Implement light weight ->target_index() routine 2013-10-25 22:42:24 +02:00
s3c2410-cpufreq.c cpufreq: s3c24xx: move cpufreq driver to drivers/cpufreq 2013-05-20 23:04:28 +09:00
s3c2412-cpufreq.c cpufreq: s3c24xx: move cpufreq driver to drivers/cpufreq 2013-05-20 23:04:28 +09:00
s3c2416-cpufreq.c cpufreq: Implement light weight ->target_index() routine 2013-10-25 22:42:24 +02:00
s3c2440-cpufreq.c cpufreq: s3c24xx: move cpufreq driver to drivers/cpufreq 2013-05-20 23:04:28 +09:00
s5pv210-cpufreq.c cpufreq: Implement light weight ->target_index() routine 2013-10-25 22:42:24 +02:00
sa1100-cpufreq.c cpufreq: Implement light weight ->target_index() routine 2013-10-25 22:42:24 +02:00
sa1110-cpufreq.c cpufreq: Implement light weight ->target_index() routine 2013-10-25 22:42:24 +02:00
sc520_freq.c cpufreq: Implement light weight ->target_index() routine 2013-10-25 22:42:24 +02:00
sh-cpufreq.c cpufreq: sh: don't initialize part of policy set by core 2013-10-16 00:50:32 +02:00
sparc-us2e-cpufreq.c cpufreq: Implement light weight ->target_index() routine 2013-10-25 22:42:24 +02:00
sparc-us3-cpufreq.c cpufreq: Implement light weight ->target_index() routine 2013-10-25 22:42:24 +02:00
spear-cpufreq.c cpufreq: Implement light weight ->target_index() routine 2013-10-25 22:42:24 +02:00
speedstep-centrino.c cpufreq: Implement light weight ->target_index() routine 2013-10-25 22:42:24 +02:00
speedstep-ich.c cpufreq: Implement light weight ->target_index() routine 2013-10-25 22:42:24 +02:00
speedstep-lib.c cpufreq: Add support for x86 cpuinfo auto loading v4 2012-01-26 16:49:06 -08:00
speedstep-lib.h [CPUFREQ] Move x86 drivers to drivers/cpufreq/ 2011-05-19 18:51:07 -04:00
speedstep-smi.c cpufreq: Implement light weight ->target_index() routine 2013-10-25 22:42:24 +02:00
tegra-cpufreq.c cpufreq: Implement light weight ->target_index() routine 2013-10-25 22:42:24 +02:00
unicore2-cpufreq.c cpufreq: unicore2: don't initialize part of policy set by core 2013-10-16 00:50:32 +02:00