* [PATCH V2 Resend 00/92] CPUFreq Cleanup Series: Part II
@ 2013-10-03 14:57 Viresh Kumar
2013-10-03 14:57 ` [PATCH V2 Resend 01/92] cpufreq: define generic .attr, .exit() and .verify() routines Viresh Kumar
` (90 more replies)
0 siblings, 91 replies; 112+ messages in thread
From: Viresh Kumar @ 2013-10-03 14:57 UTC (permalink / raw)
To: rjw; +Cc: cpufreq, linux-pm, Viresh Kumar
Hi Rafael,
As discussed earlier, Part I is now part of your linux-next branch and so
sending Part II for inclusion in bleeding-edge..
These are mostly oriented towards using generic .attr, .init(), .exit() and
.verify() and are so clubbed together.
These doesn't conflict mostly with the other 11 cpufreq core cleanup patches
that are floating around:
http://www.spinics.net/lists/cpufreq/msg07920.html
Only a minor conflict with following patch of that series for arm_big_little.c
file:
http://www.spinics.net/lists/cpufreq/msg07929.html
You can resolve it easily, pretty straight forward.
These are based of your linux-next branch:
ba93c78 Merge branch 'pm-cpufreq-next' into linux-next
Thanks..
--
Viresh
Viresh Kumar (92):
cpufreq: define generic .attr, .exit() and .verify() routines
cpufreq: acpi: Use generic cpufreq routines
cpufreq: arm_big_little: Use generic cpufreq routines
cpufreq: at32ap: Use generic cpufreq routines
cpufreq: blackfin: Use generic cpufreq routines
cpufreq: cpu0: Use generic cpufreq routines
cpufreq: cris: Use generic cpufreq routines
cpufreq: davinci: Use generic cpufreq routines
cpufreq: dbx500: Use generic cpufreq routines
cpufreq: e_powersaver: Use generic cpufreq routines
cpufreq: elanfreq: Use generic cpufreq routines
cpufreq: exynos: Use generic cpufreq routines
cpufreq: ia64-acpi: Use generic cpufreq routines
cpufreq: imx6q: Use generic cpufreq routines
cpufreq: kirkwood: Use generic cpufreq routines
cpufreq: longhaul: Use generic cpufreq routines
cpufreq: loongson2: Use generic cpufreq routines
cpufreq: maple: Use generic cpufreq routines
cpufreq: omap: Use generic cpufreq routines
cpufreq: p4-clockmod: Use generic cpufreq routines
cpufreq: pasemi: Use generic cpufreq routines
cpufreq: pmac: Use generic cpufreq routines
cpufreq: powernow: Use generic cpufreq routines
cpufreq: ppc-corenet: Use generic cpufreq routines
cpufreq: ppc_cbe: Use generic cpufreq routines
cpufreq: pxa: Use generic cpufreq routines
cpufreq: s3cx4xx: Use generic cpufreq routines
cpufreq: s5pv210: Use generic cpufreq routines
cpufreq: sa11x0: Use generic cpufreq routines
cpufreq: sc520: Use generic cpufreq routines
cpufreq: sh: Use generic cpufreq routines
cpufreq: sparc: Use generic cpufreq routines
cpufreq: spear: Use generic cpufreq routines
cpufreq: speedstep: Use generic cpufreq routines
cpufreq: tegra: Use generic cpufreq routines
cpufreq: call cpufreq_driver->get() after calling ->init()
cpufreq: acpi: don't initialize part of policy that is set by core
too
cpufreq: arm_big_little: don't initialize part of policy that is set
by core too
cpufreq: at32ap: don't initialize part of policy that is set by core
too
cpufreq: blackfin: don't initialize part of policy that is set by
core too
cpufreq: cpu0: don't initialize part of policy that is set by core
too
cpufreq: nforce2: don't initialize part of policy that is set by core
too
cpufreq: cris: don't initialize part of policy that is set by core
too
cpufreq: davinci: don't initialize part of policy that is set by core
too
cpufreq: dbx500: don't initialize part of policy that is set by core
too
cpufreq: e_powersaver: don't initialize part of policy that is set by
core too
cpufreq: elanfreq: don't initialize part of policy that is set by
core too
cpufreq: exynos: don't initialize part of policy that is set by core
too
cpufreq: gx: don't initialize part of policy that is set by core too
cpufreq: ia64-acpi: don't initialize part of policy that is set by
core too
cpufreq: imx6q: don't initialize part of policy that is set by core
too
cpufreq: integrator: don't initialize part of policy that is set by
core too
cpufreq: kirkwood: don't initialize part of policy that is set by
core too
cpufreq: longhaul: don't initialize part of policy that is set by
core too
cpufreq: loongson2: don't initialize part of policy that is set by
core too
cpufreq: maple: don't initialize part of policy that is set by core
too
cpufreq: omap: don't initialize part of policy that is set by core
too
cpufreq: p4: don't initialize part of policy that is set by core too
cpufreq: pcc: don't initialize part of policy that is set by core too
cpufreq: pmac: don't initialize part of policy that is set by core
too
cpufreq: powernow: don't initialize part of policy that is set by
core too
cpufreq: ppc: don't initialize part of policy that is set by core too
cpufreq: pxa: don't initialize part of policy that is set by core too
cpufreq: s3c: don't initialize part of policy that is set by core too
cpufreq: s5pv210: don't initialize part of policy that is set by core
too
cpufreq: sa11x0: don't initialize part of policy that is set by core
too
cpufreq: sc520_freq: don't initialize part of policy that is set by
core too
cpufreq: sh: don't initialize part of policy that is set by core too
cpufreq: spear: don't initialize part of policy that is set by core
too
cpufreq: speedstep: don't initialize part of policy that is set by
core too
cpufreq: tegra: don't initialize part of policy that is set by core
too
cpufreq: unicore2: don't initialize part of policy that is set by
core too
cpufreq: create cpufreq_generic_init() routine
cpufreq: remove CONFIG_CPU_FREQ_TABLE
cpufreq: cpu0: use cpufreq_generic_init() routine
cpufreq: cris: use cpufreq_generic_init() routine
cpufreq: davinci: use cpufreq_generic_init() routine
cpufreq: dbx500: use cpufreq_generic_init() routine
cpufreq: exynos: use cpufreq_generic_init() routine
cpufreq: imx6q: use cpufreq_generic_init() routine
cpufreq: kirkwood: use cpufreq_generic_init() routine
cpufreq: loongson2: use cpufreq_generic_init() routine
cpufreq: maple: use cpufreq_generic_init() routine
cpufreq: omap: use cpufreq_generic_init() routine
cpufreq: pasemi: use cpufreq_generic_init() routine
cpufreq: pmac32: use cpufreq_generic_init() routine
cpufreq: pmac64: use cpufreq_generic_init() routine
cpufreq: s3c: use cpufreq_generic_init() routine
cpufreq: s5pv210: use cpufreq_generic_init() routine
cpufreq: sa11x0: use cpufreq_generic_init() routine
cpufreq: spear: use cpufreq_generic_init() routine
cpufreq: tegra: use cpufreq_generic_init() routine
arch/arm/mach-davinci/Kconfig | 1 -
arch/arm/mach-pxa/Kconfig | 3 --
arch/arm/mach-sa1100/generic.c | 22 ------------
arch/arm/mach-sa1100/generic.h | 1 -
arch/arm/mach-ux500/Kconfig | 1 -
arch/blackfin/Kconfig | 1 -
arch/cris/Kconfig | 2 --
drivers/cpufreq/Kconfig | 11 ------
drivers/cpufreq/Kconfig.arm | 11 ------
drivers/cpufreq/Kconfig.powerpc | 6 ----
drivers/cpufreq/Kconfig.x86 | 13 --------
drivers/cpufreq/Makefile | 5 +--
drivers/cpufreq/acpi-cpufreq.c | 12 +------
drivers/cpufreq/arm_big_little.c | 20 ++---------
drivers/cpufreq/at32ap-cpufreq.c | 24 +++----------
drivers/cpufreq/blackfin-cpufreq.c | 24 ++-----------
drivers/cpufreq/cpufreq-cpu0.c | 43 +++---------------------
drivers/cpufreq/cpufreq-nforce2.c | 1 -
drivers/cpufreq/cpufreq.c | 44 ++++++++++++++++++++++--
drivers/cpufreq/cris-artpec3-cpufreq.c | 30 +++--------------
drivers/cpufreq/cris-etraxfs-cpufreq.c | 28 +++-------------
drivers/cpufreq/davinci-cpufreq.c | 27 ++-------------
drivers/cpufreq/dbx500-cpufreq.c | 40 ++--------------------
drivers/cpufreq/e_powersaver.c | 16 ++-------
drivers/cpufreq/elanfreq.c | 33 ++----------------
drivers/cpufreq/exynos-cpufreq.c | 32 +++---------------
drivers/cpufreq/exynos5440-cpufreq.c | 31 +++--------------
drivers/cpufreq/freq_table.c | 20 +++++++++++
drivers/cpufreq/gx-suspmod.c | 5 +--
drivers/cpufreq/ia64-acpi-cpufreq.c | 27 ++-------------
drivers/cpufreq/imx6q-cpufreq.c | 36 +++-----------------
drivers/cpufreq/integrator-cpufreq.c | 5 ++-
drivers/cpufreq/kirkwood-cpufreq.c | 28 +++-------------
drivers/cpufreq/longhaul.c | 24 ++-----------
drivers/cpufreq/loongson2_cpufreq.c | 20 ++---------
drivers/cpufreq/maple-cpufreq.c | 24 ++-----------
drivers/cpufreq/omap-cpufreq.c | 61 ++++++++--------------------------
drivers/cpufreq/p4-clockmod.c | 24 ++-----------
drivers/cpufreq/pasemi-cpufreq.c | 23 ++-----------
drivers/cpufreq/pcc-cpufreq.c | 7 ----
drivers/cpufreq/pmac32-cpufreq.c | 22 ++----------
drivers/cpufreq/pmac64-cpufreq.c | 24 ++-----------
drivers/cpufreq/powernow-k6.c | 23 ++-----------
drivers/cpufreq/powernow-k7.c | 16 ++-------
drivers/cpufreq/powernow-k8.c | 23 ++-----------
drivers/cpufreq/ppc-corenet-cpufreq.c | 19 ++---------
drivers/cpufreq/ppc_cbe_cpufreq.c | 15 ++-------
drivers/cpufreq/pxa2xx-cpufreq.c | 29 ++--------------
drivers/cpufreq/pxa3xx-cpufreq.c | 22 +++---------
drivers/cpufreq/s3c2416-cpufreq.c | 27 +++------------
drivers/cpufreq/s3c24xx-cpufreq.c | 27 +--------------
drivers/cpufreq/s3c64xx-cpufreq.c | 17 ++--------
drivers/cpufreq/s5pv210-cpufreq.c | 16 ++-------
drivers/cpufreq/sa1100-cpufreq.c | 9 ++---
drivers/cpufreq/sa1110-cpufreq.c | 9 ++---
drivers/cpufreq/sc520_freq.c | 25 ++------------
drivers/cpufreq/sh-cpufreq.c | 9 +----
drivers/cpufreq/sparc-us2e-cpufreq.c | 8 +----
drivers/cpufreq/sparc-us3-cpufreq.c | 8 +----
drivers/cpufreq/spear-cpufreq.c | 38 +++------------------
drivers/cpufreq/speedstep-centrino.c | 27 ++-------------
drivers/cpufreq/speedstep-ich.c | 45 +++----------------------
drivers/cpufreq/speedstep-smi.c | 43 ++----------------------
drivers/cpufreq/tegra-cpufreq.c | 30 +++++++----------
drivers/cpufreq/unicore2-cpufreq.c | 1 -
drivers/thermal/Kconfig | 1 -
include/linux/cpufreq.h | 11 ++++++
67 files changed, 226 insertions(+), 1104 deletions(-)
--
1.7.12.rc2.18.g61b472e
^ permalink raw reply [flat|nested] 112+ messages in thread
* [PATCH V2 Resend 01/92] cpufreq: define generic .attr, .exit() and .verify() routines
2013-10-03 14:57 [PATCH V2 Resend 00/92] CPUFreq Cleanup Series: Part II Viresh Kumar
@ 2013-10-03 14:57 ` Viresh Kumar
2013-10-03 14:57 ` [PATCH V2 Resend 02/92] cpufreq: acpi: Use generic cpufreq routines Viresh Kumar
` (89 subsequent siblings)
90 siblings, 0 replies; 112+ messages in thread
From: Viresh Kumar @ 2013-10-03 14:57 UTC (permalink / raw)
To: rjw; +Cc: cpufreq, linux-pm, Viresh Kumar
Most of the CPUFreq drivers do similar things in .exit() and .verify() routines
and .attr. So its better if we have generic routines for them which can be used
by cpufreq drivers then.
This patch introduces generic .attr, .exit() and .verify() cpufreq drivers.
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
---
drivers/cpufreq/freq_table.c | 20 ++++++++++++++++++++
include/linux/cpufreq.h | 8 ++++++++
2 files changed, 28 insertions(+)
diff --git a/drivers/cpufreq/freq_table.c b/drivers/cpufreq/freq_table.c
index 11f6fa9..b198458 100644
--- a/drivers/cpufreq/freq_table.c
+++ b/drivers/cpufreq/freq_table.c
@@ -87,6 +87,20 @@ int cpufreq_frequency_table_verify(struct cpufreq_policy *policy,
}
EXPORT_SYMBOL_GPL(cpufreq_frequency_table_verify);
+/*
+ * Generic routine to verify policy & frequency table, requires driver to call
+ * cpufreq_frequency_table_get_attr() prior to it.
+ */
+int cpufreq_generic_frequency_table_verify(struct cpufreq_policy *policy)
+{
+ struct cpufreq_frequency_table *table =
+ cpufreq_frequency_get_table(policy->cpu);
+ if (!table)
+ return -ENODEV;
+
+ return cpufreq_frequency_table_verify(policy, table);
+}
+EXPORT_SYMBOL_GPL(cpufreq_generic_frequency_table_verify);
int cpufreq_frequency_table_target(struct cpufreq_policy *policy,
struct cpufreq_frequency_table *table,
@@ -200,6 +214,12 @@ struct freq_attr cpufreq_freq_attr_scaling_available_freqs = {
};
EXPORT_SYMBOL_GPL(cpufreq_freq_attr_scaling_available_freqs);
+struct freq_attr *cpufreq_generic_attr[] = {
+ &cpufreq_freq_attr_scaling_available_freqs,
+ NULL,
+};
+EXPORT_SYMBOL_GPL(cpufreq_generic_attr);
+
/*
* if you use these, you must assure that the frequency table is valid
* all the time between get_attr and put_attr!
diff --git a/include/linux/cpufreq.h b/include/linux/cpufreq.h
index 6b199ed..c808809 100644
--- a/include/linux/cpufreq.h
+++ b/include/linux/cpufreq.h
@@ -392,6 +392,7 @@ int cpufreq_frequency_table_cpuinfo(struct cpufreq_policy *policy,
int cpufreq_frequency_table_verify(struct cpufreq_policy *policy,
struct cpufreq_frequency_table *table);
+int cpufreq_generic_frequency_table_verify(struct cpufreq_policy *policy);
int cpufreq_frequency_table_target(struct cpufreq_policy *policy,
struct cpufreq_frequency_table *table,
@@ -407,10 +408,17 @@ struct cpufreq_frequency_table *cpufreq_frequency_get_table(unsigned int cpu);
/* the following are really really optional */
extern struct freq_attr cpufreq_freq_attr_scaling_available_freqs;
+extern struct freq_attr *cpufreq_generic_attr[];
void cpufreq_frequency_table_get_attr(struct cpufreq_frequency_table *table,
unsigned int cpu);
void cpufreq_frequency_table_put_attr(unsigned int cpu);
int cpufreq_table_validate_and_show(struct cpufreq_policy *policy,
struct cpufreq_frequency_table *table);
+static inline int cpufreq_generic_exit(struct cpufreq_policy *policy)
+{
+ cpufreq_frequency_table_put_attr(policy->cpu);
+ return 0;
+}
+
#endif /* _LINUX_CPUFREQ_H */
--
1.7.12.rc2.18.g61b472e
^ permalink raw reply related [flat|nested] 112+ messages in thread
* [PATCH V2 Resend 02/92] cpufreq: acpi: Use generic cpufreq routines
2013-10-03 14:57 [PATCH V2 Resend 00/92] CPUFreq Cleanup Series: Part II Viresh Kumar
2013-10-03 14:57 ` [PATCH V2 Resend 01/92] cpufreq: define generic .attr, .exit() and .verify() routines Viresh Kumar
@ 2013-10-03 14:57 ` Viresh Kumar
2013-10-03 14:57 ` [PATCH V2 Resend 03/92] cpufreq: arm_big_little: " Viresh Kumar
` (88 subsequent siblings)
90 siblings, 0 replies; 112+ messages in thread
From: Viresh Kumar @ 2013-10-03 14:57 UTC (permalink / raw)
To: rjw; +Cc: cpufreq, linux-pm, Viresh Kumar
Most of the CPUFreq drivers do similar things in .exit() and .verify() routines
and .attr. So its better if we have generic routines for them which can be used
by cpufreq drivers then.
This patch uses these generic routines for this driver.
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
---
drivers/cpufreq/acpi-cpufreq.c | 11 +----------
1 file changed, 1 insertion(+), 10 deletions(-)
diff --git a/drivers/cpufreq/acpi-cpufreq.c b/drivers/cpufreq/acpi-cpufreq.c
index d993211..94a5a1d 100644
--- a/drivers/cpufreq/acpi-cpufreq.c
+++ b/drivers/cpufreq/acpi-cpufreq.c
@@ -516,15 +516,6 @@ out:
return result;
}
-static int acpi_cpufreq_verify(struct cpufreq_policy *policy)
-{
- struct acpi_cpufreq_data *data = per_cpu(acfreq_data, policy->cpu);
-
- pr_debug("acpi_cpufreq_verify\n");
-
- return cpufreq_frequency_table_verify(policy, data->freq_table);
-}
-
static unsigned long
acpi_cpufreq_guess_freq(struct acpi_cpufreq_data *data, unsigned int cpu)
{
@@ -927,7 +918,7 @@ static struct freq_attr *acpi_cpufreq_attr[] = {
};
static struct cpufreq_driver acpi_cpufreq_driver = {
- .verify = acpi_cpufreq_verify,
+ .verify = cpufreq_generic_frequency_table_verify,
.target = acpi_cpufreq_target,
.bios_limit = acpi_processor_get_bios_limit,
.init = acpi_cpufreq_cpu_init,
--
1.7.12.rc2.18.g61b472e
^ permalink raw reply related [flat|nested] 112+ messages in thread
* [PATCH V2 Resend 03/92] cpufreq: arm_big_little: Use generic cpufreq routines
2013-10-03 14:57 [PATCH V2 Resend 00/92] CPUFreq Cleanup Series: Part II Viresh Kumar
2013-10-03 14:57 ` [PATCH V2 Resend 01/92] cpufreq: define generic .attr, .exit() and .verify() routines Viresh Kumar
2013-10-03 14:57 ` [PATCH V2 Resend 02/92] cpufreq: acpi: Use generic cpufreq routines Viresh Kumar
@ 2013-10-03 14:57 ` Viresh Kumar
2013-10-03 14:57 ` [PATCH V2 Resend 04/92] cpufreq: at32ap: " Viresh Kumar
` (87 subsequent siblings)
90 siblings, 0 replies; 112+ messages in thread
From: Viresh Kumar @ 2013-10-03 14:57 UTC (permalink / raw)
To: rjw; +Cc: cpufreq, linux-pm, Viresh Kumar
Most of the CPUFreq drivers do similar things in .exit() and .verify() routines
and .attr. So its better if we have generic routines for them which can be used
by cpufreq drivers then.
This patch uses these generic routines for this driver.
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
---
drivers/cpufreq/arm_big_little.c | 18 ++----------------
1 file changed, 2 insertions(+), 16 deletions(-)
diff --git a/drivers/cpufreq/arm_big_little.c b/drivers/cpufreq/arm_big_little.c
index 9acfb82..7e92586 100644
--- a/drivers/cpufreq/arm_big_little.c
+++ b/drivers/cpufreq/arm_big_little.c
@@ -47,14 +47,6 @@ static unsigned int bL_cpufreq_get(unsigned int cpu)
return clk_get_rate(clk[cur_cluster]) / 1000;
}
-/* Validate policy frequency range */
-static int bL_cpufreq_verify_policy(struct cpufreq_policy *policy)
-{
- u32 cur_cluster = cpu_to_cluster(policy->cpu);
-
- return cpufreq_frequency_table_verify(policy, freq_table[cur_cluster]);
-}
-
/* Set clock frequency */
static int bL_cpufreq_set_target(struct cpufreq_policy *policy,
unsigned int target_freq, unsigned int relation)
@@ -205,22 +197,16 @@ static int bL_cpufreq_exit(struct cpufreq_policy *policy)
return 0;
}
-/* Export freq_table to sysfs */
-static struct freq_attr *bL_cpufreq_attr[] = {
- &cpufreq_freq_attr_scaling_available_freqs,
- NULL,
-};
-
static struct cpufreq_driver bL_cpufreq_driver = {
.name = "arm-big-little",
.flags = CPUFREQ_STICKY,
- .verify = bL_cpufreq_verify_policy,
+ .verify = cpufreq_generic_frequency_table_verify,
.target = bL_cpufreq_set_target,
.get = bL_cpufreq_get,
.init = bL_cpufreq_init,
.exit = bL_cpufreq_exit,
.have_governor_per_policy = true,
- .attr = bL_cpufreq_attr,
+ .attr = cpufreq_generic_attr,
};
int bL_cpufreq_register(struct cpufreq_arm_bL_ops *ops)
--
1.7.12.rc2.18.g61b472e
^ permalink raw reply related [flat|nested] 112+ messages in thread
* [PATCH V2 Resend 04/92] cpufreq: at32ap: Use generic cpufreq routines
2013-10-03 14:57 [PATCH V2 Resend 00/92] CPUFreq Cleanup Series: Part II Viresh Kumar
` (2 preceding siblings ...)
2013-10-03 14:57 ` [PATCH V2 Resend 03/92] cpufreq: arm_big_little: " Viresh Kumar
@ 2013-10-03 14:57 ` Viresh Kumar
2013-10-03 14:57 ` [PATCH V2 Resend 05/92] cpufreq: blackfin: " Viresh Kumar
` (86 subsequent siblings)
90 siblings, 0 replies; 112+ messages in thread
From: Viresh Kumar @ 2013-10-03 14:57 UTC (permalink / raw)
To: rjw; +Cc: cpufreq, linux-pm, Viresh Kumar
Most of the CPUFreq drivers do similar things in .exit() and .verify() routines
and .attr. So its better if we have generic routines for them which can be used
by cpufreq drivers then.
This patch uses these generic routines for this driver.
Acked-by: Hans-Christian Egtvedt <egtvedt@samfundet.no>
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
---
drivers/cpufreq/at32ap-cpufreq.c | 12 +-----------
1 file changed, 1 insertion(+), 11 deletions(-)
diff --git a/drivers/cpufreq/at32ap-cpufreq.c b/drivers/cpufreq/at32ap-cpufreq.c
index 1d19fa5..788f7e7 100644
--- a/drivers/cpufreq/at32ap-cpufreq.c
+++ b/drivers/cpufreq/at32ap-cpufreq.c
@@ -24,16 +24,6 @@
static struct clk *cpuclk;
static struct cpufreq_frequency_table *freq_table;
-static int at32_verify_speed(struct cpufreq_policy *policy)
-{
- if (policy->cpu != 0)
- return -EINVAL;
-
- cpufreq_verify_within_limits(policy, policy->cpuinfo.min_freq,
- policy->cpuinfo.max_freq);
- return 0;
-}
-
static unsigned int at32_get_speed(unsigned int cpu)
{
/* No SMP support */
@@ -152,7 +142,7 @@ out_err:
static struct cpufreq_driver at32_driver = {
.name = "at32ap",
.init = at32_cpufreq_driver_init,
- .verify = at32_verify_speed,
+ .verify = cpufreq_generic_frequency_table_verify,
.target = at32_set_target,
.get = at32_get_speed,
.flags = CPUFREQ_STICKY,
--
1.7.12.rc2.18.g61b472e
^ permalink raw reply related [flat|nested] 112+ messages in thread
* [PATCH V2 Resend 05/92] cpufreq: blackfin: Use generic cpufreq routines
2013-10-03 14:57 [PATCH V2 Resend 00/92] CPUFreq Cleanup Series: Part II Viresh Kumar
` (3 preceding siblings ...)
2013-10-03 14:57 ` [PATCH V2 Resend 04/92] cpufreq: at32ap: " Viresh Kumar
@ 2013-10-03 14:57 ` Viresh Kumar
2013-10-03 14:58 ` [PATCH V2 Resend 06/92] cpufreq: cpu0: " Viresh Kumar
` (85 subsequent siblings)
90 siblings, 0 replies; 112+ messages in thread
From: Viresh Kumar @ 2013-10-03 14:57 UTC (permalink / raw)
To: rjw; +Cc: cpufreq, linux-pm, Viresh Kumar, Steven Miao
Most of the CPUFreq drivers do similar things in .exit() and .verify() routines
and .attr. So its better if we have generic routines for them which can be used
by cpufreq drivers then.
This patch uses these generic routines for this driver.
Cc: Steven Miao <realmz6@gmail.com>
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
---
drivers/cpufreq/blackfin-cpufreq.c | 23 +++--------------------
1 file changed, 3 insertions(+), 20 deletions(-)
diff --git a/drivers/cpufreq/blackfin-cpufreq.c b/drivers/cpufreq/blackfin-cpufreq.c
index 0e76c09..48888cf 100644
--- a/drivers/cpufreq/blackfin-cpufreq.c
+++ b/drivers/cpufreq/blackfin-cpufreq.c
@@ -191,11 +191,6 @@ static int bfin_target(struct cpufreq_policy *policy,
return ret;
}
-static int bfin_verify_speed(struct cpufreq_policy *policy)
-{
- return cpufreq_frequency_table_verify(policy, bfin_freq_table);
-}
-
static int __bfin_cpu_init(struct cpufreq_policy *policy)
{
@@ -213,26 +208,14 @@ static int __bfin_cpu_init(struct cpufreq_policy *policy)
return cpufreq_table_validate_and_show(policy, bfin_freq_table);
}
-static int __bfin_cpu_exit(struct cpufreq_policy *policy)
-{
-
- cpufreq_frequency_table_put_attr(policy->cpu);
- return 0;
-}
-
-static struct freq_attr *bfin_freq_attr[] = {
- &cpufreq_freq_attr_scaling_available_freqs,
- NULL,
-};
-
static struct cpufreq_driver bfin_driver = {
- .verify = bfin_verify_speed,
+ .verify = cpufreq_generic_frequency_table_verify,
.target = bfin_target,
.get = bfin_getfreq_khz,
.init = __bfin_cpu_init,
- .exit = __bfin_cpu_exit,
+ .exit = cpufreq_generic_exit,
.name = "bfin cpufreq",
- .attr = bfin_freq_attr,
+ .attr = cpufreq_generic_attr,
};
static int __init bfin_cpu_init(void)
--
1.7.12.rc2.18.g61b472e
^ permalink raw reply related [flat|nested] 112+ messages in thread
* [PATCH V2 Resend 06/92] cpufreq: cpu0: Use generic cpufreq routines
2013-10-03 14:57 [PATCH V2 Resend 00/92] CPUFreq Cleanup Series: Part II Viresh Kumar
` (4 preceding siblings ...)
2013-10-03 14:57 ` [PATCH V2 Resend 05/92] cpufreq: blackfin: " Viresh Kumar
@ 2013-10-03 14:58 ` Viresh Kumar
2013-10-03 14:58 ` [PATCH V2 Resend 07/92] cpufreq: cris: " Viresh Kumar
` (84 subsequent siblings)
90 siblings, 0 replies; 112+ messages in thread
From: Viresh Kumar @ 2013-10-03 14:58 UTC (permalink / raw)
To: rjw; +Cc: cpufreq, linux-pm, Viresh Kumar
Most of the CPUFreq drivers do similar things in .exit() and .verify() routines
and .attr. So its better if we have generic routines for them which can be used
by cpufreq drivers then.
This patch uses these generic routines for this driver.
Acked-by: Shawn Guo <shawn.guo@linaro.org>
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
---
drivers/cpufreq/cpufreq-cpu0.c | 23 +++--------------------
1 file changed, 3 insertions(+), 20 deletions(-)
diff --git a/drivers/cpufreq/cpufreq-cpu0.c b/drivers/cpufreq/cpufreq-cpu0.c
index b24f8c4..ecea8fc 100644
--- a/drivers/cpufreq/cpufreq-cpu0.c
+++ b/drivers/cpufreq/cpufreq-cpu0.c
@@ -30,11 +30,6 @@ static struct clk *cpu_clk;
static struct regulator *cpu_reg;
static struct cpufreq_frequency_table *freq_table;
-static int cpu0_verify_speed(struct cpufreq_policy *policy)
-{
- return cpufreq_frequency_table_verify(policy, freq_table);
-}
-
static unsigned int cpu0_get_speed(unsigned int cpu)
{
return clk_get_rate(cpu_clk) / 1000;
@@ -148,27 +143,15 @@ static int cpu0_cpufreq_init(struct cpufreq_policy *policy)
return 0;
}
-static int cpu0_cpufreq_exit(struct cpufreq_policy *policy)
-{
- cpufreq_frequency_table_put_attr(policy->cpu);
-
- return 0;
-}
-
-static struct freq_attr *cpu0_cpufreq_attr[] = {
- &cpufreq_freq_attr_scaling_available_freqs,
- NULL,
-};
-
static struct cpufreq_driver cpu0_cpufreq_driver = {
.flags = CPUFREQ_STICKY,
- .verify = cpu0_verify_speed,
+ .verify = cpufreq_generic_frequency_table_verify,
.target = cpu0_set_target,
.get = cpu0_get_speed,
.init = cpu0_cpufreq_init,
- .exit = cpu0_cpufreq_exit,
+ .exit = cpufreq_generic_exit,
.name = "generic_cpu0",
- .attr = cpu0_cpufreq_attr,
+ .attr = cpufreq_generic_attr,
};
static int cpu0_cpufreq_probe(struct platform_device *pdev)
--
1.7.12.rc2.18.g61b472e
^ permalink raw reply related [flat|nested] 112+ messages in thread
* [PATCH V2 Resend 07/92] cpufreq: cris: Use generic cpufreq routines
2013-10-03 14:57 [PATCH V2 Resend 00/92] CPUFreq Cleanup Series: Part II Viresh Kumar
` (5 preceding siblings ...)
2013-10-03 14:58 ` [PATCH V2 Resend 06/92] cpufreq: cpu0: " Viresh Kumar
@ 2013-10-03 14:58 ` Viresh Kumar
2013-10-03 15:25 ` Jesper Nilsson
2013-10-03 14:58 ` [PATCH V2 Resend 08/92] cpufreq: davinci: " Viresh Kumar
` (83 subsequent siblings)
90 siblings, 1 reply; 112+ messages in thread
From: Viresh Kumar @ 2013-10-03 14:58 UTC (permalink / raw)
To: rjw
Cc: cpufreq, linux-pm, Viresh Kumar, Jesper Nilsson, Mikael Starvik,
linux-cris-kernel
Most of the CPUFreq drivers do similar things in .exit() and .verify() routines
and .attr. So its better if we have generic routines for them which can be used
by cpufreq drivers then.
This patch uses these generic routines for this driver.
Cc: Jesper Nilsson <jesper.nilsson@axis.com>
Cc: Mikael Starvik <starvik@axis.com>
Cc: linux-cris-kernel@axis.com
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
---
drivers/cpufreq/cris-artpec3-cpufreq.c | 23 +++--------------------
drivers/cpufreq/cris-etraxfs-cpufreq.c | 22 +++-------------------
2 files changed, 6 insertions(+), 39 deletions(-)
diff --git a/drivers/cpufreq/cris-artpec3-cpufreq.c b/drivers/cpufreq/cris-artpec3-cpufreq.c
index 444fd96..d26f4e4 100644
--- a/drivers/cpufreq/cris-artpec3-cpufreq.c
+++ b/drivers/cpufreq/cris-artpec3-cpufreq.c
@@ -54,11 +54,6 @@ static void cris_freq_set_cpu_state(struct cpufreq_policy *policy,
cpufreq_notify_transition(policy, &freqs, CPUFREQ_POSTCHANGE);
};
-static int cris_freq_verify(struct cpufreq_policy *policy)
-{
- return cpufreq_frequency_table_verify(policy, &cris_freq_table[0]);
-}
-
static int cris_freq_target(struct cpufreq_policy *policy,
unsigned int target_freq,
unsigned int relation)
@@ -84,26 +79,14 @@ static int cris_freq_cpu_init(struct cpufreq_policy *policy)
}
-static int cris_freq_cpu_exit(struct cpufreq_policy *policy)
-{
- cpufreq_frequency_table_put_attr(policy->cpu);
- return 0;
-}
-
-
-static struct freq_attr *cris_freq_attr[] = {
- &cpufreq_freq_attr_scaling_available_freqs,
- NULL,
-};
-
static struct cpufreq_driver cris_freq_driver = {
.get = cris_freq_get_cpu_frequency,
- .verify = cris_freq_verify,
+ .verify = cpufreq_generic_frequency_table_verify,
.target = cris_freq_target,
.init = cris_freq_cpu_init,
- .exit = cris_freq_cpu_exit,
+ .exit = cpufreq_generic_exit,
.name = "cris_freq",
- .attr = cris_freq_attr,
+ .attr = cpufreq_generic_attr,
};
static int __init cris_freq_init(void)
diff --git a/drivers/cpufreq/cris-etraxfs-cpufreq.c b/drivers/cpufreq/cris-etraxfs-cpufreq.c
index 428395e..d384e63 100644
--- a/drivers/cpufreq/cris-etraxfs-cpufreq.c
+++ b/drivers/cpufreq/cris-etraxfs-cpufreq.c
@@ -54,11 +54,6 @@ static void cris_freq_set_cpu_state(struct cpufreq_policy *policy,
cpufreq_notify_transition(policy, &freqs, CPUFREQ_POSTCHANGE);
};
-static int cris_freq_verify(struct cpufreq_policy *policy)
-{
- return cpufreq_frequency_table_verify(policy, &cris_freq_table[0]);
-}
-
static int cris_freq_target(struct cpufreq_policy *policy,
unsigned int target_freq, unsigned int relation)
{
@@ -82,25 +77,14 @@ static int cris_freq_cpu_init(struct cpufreq_policy *policy)
return cpufreq_table_validate_and_show(policy, cris_freq_table);
}
-static int cris_freq_cpu_exit(struct cpufreq_policy *policy)
-{
- cpufreq_frequency_table_put_attr(policy->cpu);
- return 0;
-}
-
-static struct freq_attr *cris_freq_attr[] = {
- &cpufreq_freq_attr_scaling_available_freqs,
- NULL,
-};
-
static struct cpufreq_driver cris_freq_driver = {
.get = cris_freq_get_cpu_frequency,
- .verify = cris_freq_verify,
+ .verify = cpufreq_generic_frequency_table_verify,
.target = cris_freq_target,
.init = cris_freq_cpu_init,
- .exit = cris_freq_cpu_exit,
+ .exit = cpufreq_generic_exit,
.name = "cris_freq",
- .attr = cris_freq_attr,
+ .attr = cpufreq_generic_attr,
};
static int __init cris_freq_init(void)
--
1.7.12.rc2.18.g61b472e
^ permalink raw reply related [flat|nested] 112+ messages in thread
* [PATCH V2 Resend 08/92] cpufreq: davinci: Use generic cpufreq routines
2013-10-03 14:57 [PATCH V2 Resend 00/92] CPUFreq Cleanup Series: Part II Viresh Kumar
` (6 preceding siblings ...)
2013-10-03 14:58 ` [PATCH V2 Resend 07/92] cpufreq: cris: " Viresh Kumar
@ 2013-10-03 14:58 ` Viresh Kumar
2013-10-03 14:58 ` [PATCH V2 Resend 09/92] cpufreq: dbx500: " Viresh Kumar
` (82 subsequent siblings)
90 siblings, 0 replies; 112+ messages in thread
From: Viresh Kumar @ 2013-10-03 14:58 UTC (permalink / raw)
To: rjw; +Cc: cpufreq, linux-pm, Viresh Kumar, Sekhar Nori
Most of the CPUFreq drivers do similar things in .exit() and .verify() routines
and .attr. So its better if we have generic routines for them which can be used
by cpufreq drivers then.
This patch uses these generic routines for this driver.
Cc: Sekhar Nori <nsekhar@ti.com>
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
---
drivers/cpufreq/davinci-cpufreq.c | 15 ++-------------
1 file changed, 2 insertions(+), 13 deletions(-)
diff --git a/drivers/cpufreq/davinci-cpufreq.c b/drivers/cpufreq/davinci-cpufreq.c
index f67196e..33e9460 100644
--- a/drivers/cpufreq/davinci-cpufreq.c
+++ b/drivers/cpufreq/davinci-cpufreq.c
@@ -157,26 +157,15 @@ static int davinci_cpu_init(struct cpufreq_policy *policy)
return 0;
}
-static int davinci_cpu_exit(struct cpufreq_policy *policy)
-{
- cpufreq_frequency_table_put_attr(policy->cpu);
- return 0;
-}
-
-static struct freq_attr *davinci_cpufreq_attr[] = {
- &cpufreq_freq_attr_scaling_available_freqs,
- NULL,
-};
-
static struct cpufreq_driver davinci_driver = {
.flags = CPUFREQ_STICKY,
.verify = davinci_verify_speed,
.target = davinci_target,
.get = davinci_getspeed,
.init = davinci_cpu_init,
- .exit = davinci_cpu_exit,
+ .exit = cpufreq_generic_exit,
.name = "davinci",
- .attr = davinci_cpufreq_attr,
+ .attr = cpufreq_generic_attr,
};
static int __init davinci_cpufreq_probe(struct platform_device *pdev)
--
1.7.12.rc2.18.g61b472e
^ permalink raw reply related [flat|nested] 112+ messages in thread
* [PATCH V2 Resend 09/92] cpufreq: dbx500: Use generic cpufreq routines
2013-10-03 14:57 [PATCH V2 Resend 00/92] CPUFreq Cleanup Series: Part II Viresh Kumar
` (7 preceding siblings ...)
2013-10-03 14:58 ` [PATCH V2 Resend 08/92] cpufreq: davinci: " Viresh Kumar
@ 2013-10-03 14:58 ` Viresh Kumar
2013-10-03 14:58 ` [PATCH V2 Resend 10/92] cpufreq: e_powersaver: " Viresh Kumar
` (81 subsequent siblings)
90 siblings, 0 replies; 112+ messages in thread
From: Viresh Kumar @ 2013-10-03 14:58 UTC (permalink / raw)
To: rjw; +Cc: cpufreq, linux-pm, Viresh Kumar, Linus Walleij
Most of the CPUFreq drivers do similar things in .exit() and .verify() routines
and .attr. So its better if we have generic routines for them which can be used
by cpufreq drivers then.
This patch uses these generic routines for this driver.
Cc: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
---
drivers/cpufreq/dbx500-cpufreq.c | 14 ++------------
1 file changed, 2 insertions(+), 12 deletions(-)
diff --git a/drivers/cpufreq/dbx500-cpufreq.c b/drivers/cpufreq/dbx500-cpufreq.c
index 8a484e9..2d70637 100644
--- a/drivers/cpufreq/dbx500-cpufreq.c
+++ b/drivers/cpufreq/dbx500-cpufreq.c
@@ -19,16 +19,6 @@
static struct cpufreq_frequency_table *freq_table;
static struct clk *armss_clk;
-static struct freq_attr *dbx500_cpufreq_attr[] = {
- &cpufreq_freq_attr_scaling_available_freqs,
- NULL,
-};
-
-static int dbx500_cpufreq_verify_speed(struct cpufreq_policy *policy)
-{
- return cpufreq_frequency_table_verify(policy, freq_table);
-}
-
static int dbx500_cpufreq_target(struct cpufreq_policy *policy,
unsigned int target_freq,
unsigned int relation)
@@ -113,12 +103,12 @@ static int dbx500_cpufreq_init(struct cpufreq_policy *policy)
static struct cpufreq_driver dbx500_cpufreq_driver = {
.flags = CPUFREQ_STICKY | CPUFREQ_CONST_LOOPS,
- .verify = dbx500_cpufreq_verify_speed,
+ .verify = cpufreq_generic_frequency_table_verify,
.target = dbx500_cpufreq_target,
.get = dbx500_cpufreq_getspeed,
.init = dbx500_cpufreq_init,
.name = "DBX500",
- .attr = dbx500_cpufreq_attr,
+ .attr = cpufreq_generic_attr,
};
static int dbx500_cpufreq_probe(struct platform_device *pdev)
--
1.7.12.rc2.18.g61b472e
^ permalink raw reply related [flat|nested] 112+ messages in thread
* [PATCH V2 Resend 10/92] cpufreq: e_powersaver: Use generic cpufreq routines
2013-10-03 14:57 [PATCH V2 Resend 00/92] CPUFreq Cleanup Series: Part II Viresh Kumar
` (8 preceding siblings ...)
2013-10-03 14:58 ` [PATCH V2 Resend 09/92] cpufreq: dbx500: " Viresh Kumar
@ 2013-10-03 14:58 ` Viresh Kumar
2013-10-03 14:58 ` [PATCH V2 Resend 11/92] cpufreq: elanfreq: " Viresh Kumar
` (80 subsequent siblings)
90 siblings, 0 replies; 112+ messages in thread
From: Viresh Kumar @ 2013-10-03 14:58 UTC (permalink / raw)
To: rjw; +Cc: cpufreq, linux-pm, Viresh Kumar
Most of the CPUFreq drivers do similar things in .exit() and .verify() routines
and .attr. So its better if we have generic routines for them which can be used
by cpufreq drivers then.
This patch uses these generic routines for this driver.
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
---
drivers/cpufreq/e_powersaver.c | 15 ++-------------
1 file changed, 2 insertions(+), 13 deletions(-)
diff --git a/drivers/cpufreq/e_powersaver.c b/drivers/cpufreq/e_powersaver.c
index c1b7c99..a8cbbd0 100644
--- a/drivers/cpufreq/e_powersaver.c
+++ b/drivers/cpufreq/e_powersaver.c
@@ -198,12 +198,6 @@ static int eps_target(struct cpufreq_policy *policy,
return ret;
}
-static int eps_verify(struct cpufreq_policy *policy)
-{
- return cpufreq_frequency_table_verify(policy,
- &eps_cpu[policy->cpu]->freq_table[0]);
-}
-
static int eps_cpu_init(struct cpufreq_policy *policy)
{
unsigned int i;
@@ -423,19 +417,14 @@ static int eps_cpu_exit(struct cpufreq_policy *policy)
return 0;
}
-static struct freq_attr *eps_attr[] = {
- &cpufreq_freq_attr_scaling_available_freqs,
- NULL,
-};
-
static struct cpufreq_driver eps_driver = {
- .verify = eps_verify,
+ .verify = cpufreq_generic_frequency_table_verify,
.target = eps_target,
.init = eps_cpu_init,
.exit = eps_cpu_exit,
.get = eps_get,
.name = "e_powersaver",
- .attr = eps_attr,
+ .attr = cpufreq_generic_attr,
};
--
1.7.12.rc2.18.g61b472e
^ permalink raw reply related [flat|nested] 112+ messages in thread
* [PATCH V2 Resend 11/92] cpufreq: elanfreq: Use generic cpufreq routines
2013-10-03 14:57 [PATCH V2 Resend 00/92] CPUFreq Cleanup Series: Part II Viresh Kumar
` (9 preceding siblings ...)
2013-10-03 14:58 ` [PATCH V2 Resend 10/92] cpufreq: e_powersaver: " Viresh Kumar
@ 2013-10-03 14:58 ` Viresh Kumar
2013-10-03 14:58 ` [PATCH V2 Resend 12/92] cpufreq: exynos: " Viresh Kumar
` (79 subsequent siblings)
90 siblings, 0 replies; 112+ messages in thread
From: Viresh Kumar @ 2013-10-03 14:58 UTC (permalink / raw)
To: rjw; +Cc: cpufreq, linux-pm, Viresh Kumar
Most of the CPUFreq drivers do similar things in .exit() and .verify() routines
and .attr. So its better if we have generic routines for them which can be used
by cpufreq drivers then.
This patch uses these generic routines for this driver.
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
---
drivers/cpufreq/elanfreq.c | 32 +++-----------------------------
1 file changed, 3 insertions(+), 29 deletions(-)
diff --git a/drivers/cpufreq/elanfreq.c b/drivers/cpufreq/elanfreq.c
index 4000c34..fe7053c 100644
--- a/drivers/cpufreq/elanfreq.c
+++ b/drivers/cpufreq/elanfreq.c
@@ -165,19 +165,6 @@ static void elanfreq_set_cpu_state(struct cpufreq_policy *policy,
};
-/**
- * elanfreq_validatespeed: test if frequency range is valid
- * @policy: the policy to validate
- *
- * This function checks if a given frequency range in kHz is valid
- * for the hardware supported by the driver.
- */
-
-static int elanfreq_verify(struct cpufreq_policy *policy)
-{
- return cpufreq_frequency_table_verify(policy, &elanfreq_table[0]);
-}
-
static int elanfreq_target(struct cpufreq_policy *policy,
unsigned int target_freq,
unsigned int relation)
@@ -226,13 +213,6 @@ static int elanfreq_cpu_init(struct cpufreq_policy *policy)
}
-static int elanfreq_cpu_exit(struct cpufreq_policy *policy)
-{
- cpufreq_frequency_table_put_attr(policy->cpu);
- return 0;
-}
-
-
#ifndef MODULE
/**
* elanfreq_setup - elanfreq command line parameter parsing
@@ -255,20 +235,14 @@ __setup("elanfreq=", elanfreq_setup);
#endif
-static struct freq_attr *elanfreq_attr[] = {
- &cpufreq_freq_attr_scaling_available_freqs,
- NULL,
-};
-
-
static struct cpufreq_driver elanfreq_driver = {
.get = elanfreq_get_cpu_frequency,
- .verify = elanfreq_verify,
+ .verify = cpufreq_generic_frequency_table_verify,
.target = elanfreq_target,
.init = elanfreq_cpu_init,
- .exit = elanfreq_cpu_exit,
+ .exit = cpufreq_generic_exit,
.name = "elanfreq",
- .attr = elanfreq_attr,
+ .attr = cpufreq_generic_attr,
};
static const struct x86_cpu_id elan_id[] = {
--
1.7.12.rc2.18.g61b472e
^ permalink raw reply related [flat|nested] 112+ messages in thread
* [PATCH V2 Resend 12/92] cpufreq: exynos: Use generic cpufreq routines
2013-10-03 14:57 [PATCH V2 Resend 00/92] CPUFreq Cleanup Series: Part II Viresh Kumar
` (10 preceding siblings ...)
2013-10-03 14:58 ` [PATCH V2 Resend 11/92] cpufreq: elanfreq: " Viresh Kumar
@ 2013-10-03 14:58 ` Viresh Kumar
2013-10-03 14:58 ` [PATCH V2 Resend 13/92] cpufreq: ia64-acpi: " Viresh Kumar
` (78 subsequent siblings)
90 siblings, 0 replies; 112+ messages in thread
From: Viresh Kumar @ 2013-10-03 14:58 UTC (permalink / raw)
To: rjw; +Cc: cpufreq, linux-pm, Viresh Kumar
Most of the CPUFreq drivers do similar things in .exit() and .verify() routines
and .attr. So its better if we have generic routines for them which can be used
by cpufreq drivers then.
This patch uses these generic routines for this driver.
Acked-By: Amit Daniel Kachhap <amit.daniel@samsung.com>
Acked-by: Kukjin Kim <kgene.kim@samsung.com>
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
---
drivers/cpufreq/exynos-cpufreq.c | 23 +++--------------------
drivers/cpufreq/exynos5440-cpufreq.c | 16 ++--------------
2 files changed, 5 insertions(+), 34 deletions(-)
diff --git a/drivers/cpufreq/exynos-cpufreq.c b/drivers/cpufreq/exynos-cpufreq.c
index 954baed..08338d4 100644
--- a/drivers/cpufreq/exynos-cpufreq.c
+++ b/drivers/cpufreq/exynos-cpufreq.c
@@ -31,12 +31,6 @@ static unsigned int locking_frequency;
static bool frequency_locked;
static DEFINE_MUTEX(cpufreq_lock);
-static int exynos_verify_speed(struct cpufreq_policy *policy)
-{
- return cpufreq_frequency_table_verify(policy,
- exynos_info->freq_table);
-}
-
static unsigned int exynos_getspeed(unsigned int cpu)
{
return clk_get_rate(exynos_info->cpu_clk) / 1000;
@@ -257,26 +251,15 @@ static int exynos_cpufreq_cpu_init(struct cpufreq_policy *policy)
return cpufreq_table_validate_and_show(policy, exynos_info->freq_table);
}
-static int exynos_cpufreq_cpu_exit(struct cpufreq_policy *policy)
-{
- cpufreq_frequency_table_put_attr(policy->cpu);
- return 0;
-}
-
-static struct freq_attr *exynos_cpufreq_attr[] = {
- &cpufreq_freq_attr_scaling_available_freqs,
- NULL,
-};
-
static struct cpufreq_driver exynos_driver = {
.flags = CPUFREQ_STICKY,
- .verify = exynos_verify_speed,
+ .verify = cpufreq_generic_frequency_table_verify,
.target = exynos_target,
.get = exynos_getspeed,
.init = exynos_cpufreq_cpu_init,
- .exit = exynos_cpufreq_cpu_exit,
+ .exit = cpufreq_generic_exit,
.name = "exynos_cpufreq",
- .attr = exynos_cpufreq_attr,
+ .attr = cpufreq_generic_attr,
#ifdef CONFIG_PM
.suspend = exynos_cpufreq_suspend,
.resume = exynos_cpufreq_resume,
diff --git a/drivers/cpufreq/exynos5440-cpufreq.c b/drivers/cpufreq/exynos5440-cpufreq.c
index 24df155..bce6f74 100644
--- a/drivers/cpufreq/exynos5440-cpufreq.c
+++ b/drivers/cpufreq/exynos5440-cpufreq.c
@@ -209,12 +209,6 @@ static void exynos_enable_dvfs(void)
dvfs_info->base + XMU_DVFS_CTRL);
}
-static int exynos_verify_speed(struct cpufreq_policy *policy)
-{
- return cpufreq_frequency_table_verify(policy,
- dvfs_info->freq_table);
-}
-
static unsigned int exynos_getspeed(unsigned int cpu)
{
return dvfs_info->cur_frequency;
@@ -339,19 +333,13 @@ static int exynos_cpufreq_cpu_init(struct cpufreq_policy *policy)
return 0;
}
-static int exynos_cpufreq_cpu_exit(struct cpufreq_policy *policy)
-{
- cpufreq_frequency_table_put_attr(policy->cpu);
- return 0;
-}
-
static struct cpufreq_driver exynos_driver = {
.flags = CPUFREQ_STICKY,
- .verify = exynos_verify_speed,
+ .verify = cpufreq_generic_frequency_table_verify,
.target = exynos_target,
.get = exynos_getspeed,
.init = exynos_cpufreq_cpu_init,
- .exit = exynos_cpufreq_cpu_exit,
+ .exit = cpufreq_generic_exit,
.name = CPUFREQ_NAME,
};
--
1.7.12.rc2.18.g61b472e
^ permalink raw reply related [flat|nested] 112+ messages in thread
* [PATCH V2 Resend 13/92] cpufreq: ia64-acpi: Use generic cpufreq routines
2013-10-03 14:57 [PATCH V2 Resend 00/92] CPUFreq Cleanup Series: Part II Viresh Kumar
` (11 preceding siblings ...)
2013-10-03 14:58 ` [PATCH V2 Resend 12/92] cpufreq: exynos: " Viresh Kumar
@ 2013-10-03 14:58 ` Viresh Kumar
2013-10-03 14:58 ` [PATCH V2 Resend 14/92] cpufreq: imx6q: " Viresh Kumar
` (77 subsequent siblings)
90 siblings, 0 replies; 112+ messages in thread
From: Viresh Kumar @ 2013-10-03 14:58 UTC (permalink / raw)
To: rjw; +Cc: cpufreq, linux-pm, Viresh Kumar, Tony Luck
Most of the CPUFreq drivers do similar things in .exit() and .verify() routines
and .attr. So its better if we have generic routines for them which can be used
by cpufreq drivers then.
This patch uses these generic routines for this driver.
Cc: Tony Luck <tony.luck@intel.com>
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
---
drivers/cpufreq/ia64-acpi-cpufreq.c | 26 ++------------------------
1 file changed, 2 insertions(+), 24 deletions(-)
diff --git a/drivers/cpufreq/ia64-acpi-cpufreq.c b/drivers/cpufreq/ia64-acpi-cpufreq.c
index 6cfad51..b958bdb 100644
--- a/drivers/cpufreq/ia64-acpi-cpufreq.c
+++ b/drivers/cpufreq/ia64-acpi-cpufreq.c
@@ -248,22 +248,6 @@ acpi_cpufreq_target (
static int
-acpi_cpufreq_verify (
- struct cpufreq_policy *policy)
-{
- unsigned int result = 0;
- struct cpufreq_acpi_io *data = acpi_io_data[policy->cpu];
-
- pr_debug("acpi_cpufreq_verify\n");
-
- result = cpufreq_frequency_table_verify(policy,
- data->freq_table);
-
- return (result);
-}
-
-
-static int
acpi_cpufreq_cpu_init (
struct cpufreq_policy *policy)
{
@@ -394,20 +378,14 @@ acpi_cpufreq_cpu_exit (
}
-static struct freq_attr* acpi_cpufreq_attr[] = {
- &cpufreq_freq_attr_scaling_available_freqs,
- NULL,
-};
-
-
static struct cpufreq_driver acpi_cpufreq_driver = {
- .verify = acpi_cpufreq_verify,
+ .verify = cpufreq_generic_frequency_table_verify,
.target = acpi_cpufreq_target,
.get = acpi_cpufreq_get,
.init = acpi_cpufreq_cpu_init,
.exit = acpi_cpufreq_cpu_exit,
.name = "acpi-cpufreq",
- .attr = acpi_cpufreq_attr,
+ .attr = cpufreq_generic_attr,
};
--
1.7.12.rc2.18.g61b472e
^ permalink raw reply related [flat|nested] 112+ messages in thread
* [PATCH V2 Resend 14/92] cpufreq: imx6q: Use generic cpufreq routines
2013-10-03 14:57 [PATCH V2 Resend 00/92] CPUFreq Cleanup Series: Part II Viresh Kumar
` (12 preceding siblings ...)
2013-10-03 14:58 ` [PATCH V2 Resend 13/92] cpufreq: ia64-acpi: " Viresh Kumar
@ 2013-10-03 14:58 ` Viresh Kumar
2013-10-03 14:58 ` [PATCH V2 Resend 15/92] cpufreq: kirkwood: " Viresh Kumar
` (76 subsequent siblings)
90 siblings, 0 replies; 112+ messages in thread
From: Viresh Kumar @ 2013-10-03 14:58 UTC (permalink / raw)
To: rjw; +Cc: cpufreq, linux-pm, Viresh Kumar
Most of the CPUFreq drivers do similar things in .exit() and .verify() routines
and .attr. So its better if we have generic routines for them which can be used
by cpufreq drivers then.
This patch uses these generic routines for this driver.
Acked-by: Shawn Guo <shawn.guo@linaro.org>
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
---
drivers/cpufreq/imx6q-cpufreq.c | 22 +++-------------------
1 file changed, 3 insertions(+), 19 deletions(-)
diff --git a/drivers/cpufreq/imx6q-cpufreq.c b/drivers/cpufreq/imx6q-cpufreq.c
index af0e202..d839657 100644
--- a/drivers/cpufreq/imx6q-cpufreq.c
+++ b/drivers/cpufreq/imx6q-cpufreq.c
@@ -35,11 +35,6 @@ static struct device *cpu_dev;
static struct cpufreq_frequency_table *freq_table;
static unsigned int transition_latency;
-static int imx6q_verify_speed(struct cpufreq_policy *policy)
-{
- return cpufreq_frequency_table_verify(policy, freq_table);
-}
-
static unsigned int imx6q_get_speed(unsigned int cpu)
{
return clk_get_rate(arm_clk) / 1000;
@@ -174,25 +169,14 @@ static int imx6q_cpufreq_init(struct cpufreq_policy *policy)
return 0;
}
-static int imx6q_cpufreq_exit(struct cpufreq_policy *policy)
-{
- cpufreq_frequency_table_put_attr(policy->cpu);
- return 0;
-}
-
-static struct freq_attr *imx6q_cpufreq_attr[] = {
- &cpufreq_freq_attr_scaling_available_freqs,
- NULL,
-};
-
static struct cpufreq_driver imx6q_cpufreq_driver = {
- .verify = imx6q_verify_speed,
+ .verify = cpufreq_generic_frequency_table_verify,
.target = imx6q_set_target,
.get = imx6q_get_speed,
.init = imx6q_cpufreq_init,
- .exit = imx6q_cpufreq_exit,
+ .exit = cpufreq_generic_exit,
.name = "imx6q-cpufreq",
- .attr = imx6q_cpufreq_attr,
+ .attr = cpufreq_generic_attr,
};
static int imx6q_cpufreq_probe(struct platform_device *pdev)
--
1.7.12.rc2.18.g61b472e
^ permalink raw reply related [flat|nested] 112+ messages in thread
* [PATCH V2 Resend 15/92] cpufreq: kirkwood: Use generic cpufreq routines
2013-10-03 14:57 [PATCH V2 Resend 00/92] CPUFreq Cleanup Series: Part II Viresh Kumar
` (13 preceding siblings ...)
2013-10-03 14:58 ` [PATCH V2 Resend 14/92] cpufreq: imx6q: " Viresh Kumar
@ 2013-10-03 14:58 ` Viresh Kumar
2013-10-03 14:58 ` [PATCH V2 Resend 16/92] cpufreq: longhaul: " Viresh Kumar
` (75 subsequent siblings)
90 siblings, 0 replies; 112+ messages in thread
From: Viresh Kumar @ 2013-10-03 14:58 UTC (permalink / raw)
To: rjw; +Cc: cpufreq, linux-pm, Viresh Kumar
Most of the CPUFreq drivers do similar things in .exit() and .verify() routines
and .attr. So its better if we have generic routines for them which can be used
by cpufreq drivers then.
This patch uses these generic routines for this driver.
Tested-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
---
drivers/cpufreq/kirkwood-cpufreq.c | 22 +++-------------------
1 file changed, 3 insertions(+), 19 deletions(-)
diff --git a/drivers/cpufreq/kirkwood-cpufreq.c b/drivers/cpufreq/kirkwood-cpufreq.c
index 59cbb35..1a4e4f4 100644
--- a/drivers/cpufreq/kirkwood-cpufreq.c
+++ b/drivers/cpufreq/kirkwood-cpufreq.c
@@ -102,11 +102,6 @@ static void kirkwood_cpufreq_set_cpu_state(struct cpufreq_policy *policy,
cpufreq_notify_transition(policy, &freqs, CPUFREQ_POSTCHANGE);
};
-static int kirkwood_cpufreq_verify(struct cpufreq_policy *policy)
-{
- return cpufreq_frequency_table_verify(policy, kirkwood_freq_table);
-}
-
static int kirkwood_cpufreq_target(struct cpufreq_policy *policy,
unsigned int target_freq,
unsigned int relation)
@@ -132,25 +127,14 @@ static int kirkwood_cpufreq_cpu_init(struct cpufreq_policy *policy)
return cpufreq_table_validate_and_show(policy, kirkwood_freq_table);
}
-static int kirkwood_cpufreq_cpu_exit(struct cpufreq_policy *policy)
-{
- cpufreq_frequency_table_put_attr(policy->cpu);
- return 0;
-}
-
-static struct freq_attr *kirkwood_cpufreq_attr[] = {
- &cpufreq_freq_attr_scaling_available_freqs,
- NULL,
-};
-
static struct cpufreq_driver kirkwood_cpufreq_driver = {
.get = kirkwood_cpufreq_get_cpu_frequency,
- .verify = kirkwood_cpufreq_verify,
+ .verify = cpufreq_generic_frequency_table_verify,
.target = kirkwood_cpufreq_target,
.init = kirkwood_cpufreq_cpu_init,
- .exit = kirkwood_cpufreq_cpu_exit,
+ .exit = cpufreq_generic_exit,
.name = "kirkwood-cpufreq",
- .attr = kirkwood_cpufreq_attr,
+ .attr = cpufreq_generic_attr,
};
static int kirkwood_cpufreq_probe(struct platform_device *pdev)
--
1.7.12.rc2.18.g61b472e
^ permalink raw reply related [flat|nested] 112+ messages in thread
* [PATCH V2 Resend 16/92] cpufreq: longhaul: Use generic cpufreq routines
2013-10-03 14:57 [PATCH V2 Resend 00/92] CPUFreq Cleanup Series: Part II Viresh Kumar
` (14 preceding siblings ...)
2013-10-03 14:58 ` [PATCH V2 Resend 15/92] cpufreq: kirkwood: " Viresh Kumar
@ 2013-10-03 14:58 ` Viresh Kumar
2013-10-03 14:58 ` [PATCH V2 Resend 17/92] cpufreq: loongson2: " Viresh Kumar
` (74 subsequent siblings)
90 siblings, 0 replies; 112+ messages in thread
From: Viresh Kumar @ 2013-10-03 14:58 UTC (permalink / raw)
To: rjw; +Cc: cpufreq, linux-pm, Viresh Kumar
Most of the CPUFreq drivers do similar things in .exit() and .verify() routines
and .attr. So its better if we have generic routines for them which can be used
by cpufreq drivers then.
This patch uses these generic routines for this driver.
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
---
drivers/cpufreq/longhaul.c | 23 +++--------------------
1 file changed, 3 insertions(+), 20 deletions(-)
diff --git a/drivers/cpufreq/longhaul.c b/drivers/cpufreq/longhaul.c
index 70b66fd..57d7b02 100644
--- a/drivers/cpufreq/longhaul.c
+++ b/drivers/cpufreq/longhaul.c
@@ -625,12 +625,6 @@ static void longhaul_setup_voltagescaling(void)
}
-static int longhaul_verify(struct cpufreq_policy *policy)
-{
- return cpufreq_frequency_table_verify(policy, longhaul_table);
-}
-
-
static int longhaul_target(struct cpufreq_policy *policy,
unsigned int target_freq, unsigned int relation)
{
@@ -924,25 +918,14 @@ static int longhaul_cpu_init(struct cpufreq_policy *policy)
return cpufreq_table_validate_and_show(policy, longhaul_table);
}
-static int longhaul_cpu_exit(struct cpufreq_policy *policy)
-{
- cpufreq_frequency_table_put_attr(policy->cpu);
- return 0;
-}
-
-static struct freq_attr *longhaul_attr[] = {
- &cpufreq_freq_attr_scaling_available_freqs,
- NULL,
-};
-
static struct cpufreq_driver longhaul_driver = {
- .verify = longhaul_verify,
+ .verify = cpufreq_generic_frequency_table_verify,
.target = longhaul_target,
.get = longhaul_get,
.init = longhaul_cpu_init,
- .exit = longhaul_cpu_exit,
+ .exit = cpufreq_generic_exit,
.name = "longhaul",
- .attr = longhaul_attr,
+ .attr = cpufreq_generic_attr,
};
static const struct x86_cpu_id longhaul_id[] = {
--
1.7.12.rc2.18.g61b472e
^ permalink raw reply related [flat|nested] 112+ messages in thread
* [PATCH V2 Resend 17/92] cpufreq: loongson2: Use generic cpufreq routines
2013-10-03 14:57 [PATCH V2 Resend 00/92] CPUFreq Cleanup Series: Part II Viresh Kumar
` (15 preceding siblings ...)
2013-10-03 14:58 ` [PATCH V2 Resend 16/92] cpufreq: longhaul: " Viresh Kumar
@ 2013-10-03 14:58 ` Viresh Kumar
2013-10-03 14:58 ` [PATCH V2 Resend 18/92] cpufreq: maple: " Viresh Kumar
` (73 subsequent siblings)
90 siblings, 0 replies; 112+ messages in thread
From: Viresh Kumar @ 2013-10-03 14:58 UTC (permalink / raw)
To: rjw; +Cc: cpufreq, linux-pm, Viresh Kumar, John Crispin
Most of the CPUFreq drivers do similar things in .exit() and .verify() routines
and .attr. So its better if we have generic routines for them which can be used
by cpufreq drivers then.
This patch uses these generic routines for this driver.
Cc: John Crispin <blogic@openwrt.org>
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
---
drivers/cpufreq/loongson2_cpufreq.c | 15 ++-------------
1 file changed, 2 insertions(+), 13 deletions(-)
diff --git a/drivers/cpufreq/loongson2_cpufreq.c b/drivers/cpufreq/loongson2_cpufreq.c
index cec4e72..ed7fbe2 100644
--- a/drivers/cpufreq/loongson2_cpufreq.c
+++ b/drivers/cpufreq/loongson2_cpufreq.c
@@ -137,12 +137,6 @@ static int loongson2_cpufreq_cpu_init(struct cpufreq_policy *policy)
&loongson2_clockmod_table[0]);
}
-static int loongson2_cpufreq_verify(struct cpufreq_policy *policy)
-{
- return cpufreq_frequency_table_verify(policy,
- &loongson2_clockmod_table[0]);
-}
-
static int loongson2_cpufreq_exit(struct cpufreq_policy *policy)
{
cpufreq_frequency_table_put_attr(policy->cpu);
@@ -150,19 +144,14 @@ static int loongson2_cpufreq_exit(struct cpufreq_policy *policy)
return 0;
}
-static struct freq_attr *loongson2_table_attr[] = {
- &cpufreq_freq_attr_scaling_available_freqs,
- NULL,
-};
-
static struct cpufreq_driver loongson2_cpufreq_driver = {
.name = "loongson2",
.init = loongson2_cpufreq_cpu_init,
- .verify = loongson2_cpufreq_verify,
+ .verify = cpufreq_generic_frequency_table_verify,
.target = loongson2_cpufreq_target,
.get = loongson2_cpufreq_get,
.exit = loongson2_cpufreq_exit,
- .attr = loongson2_table_attr,
+ .attr = cpufreq_generic_attr,
};
static struct platform_device_id platform_device_ids[] = {
--
1.7.12.rc2.18.g61b472e
^ permalink raw reply related [flat|nested] 112+ messages in thread
* [PATCH V2 Resend 18/92] cpufreq: maple: Use generic cpufreq routines
2013-10-03 14:57 [PATCH V2 Resend 00/92] CPUFreq Cleanup Series: Part II Viresh Kumar
` (16 preceding siblings ...)
2013-10-03 14:58 ` [PATCH V2 Resend 17/92] cpufreq: loongson2: " Viresh Kumar
@ 2013-10-03 14:58 ` Viresh Kumar
2013-10-03 14:58 ` [PATCH V2 Resend 19/92] cpufreq: omap: " Viresh Kumar
` (72 subsequent siblings)
90 siblings, 0 replies; 112+ messages in thread
From: Viresh Kumar @ 2013-10-03 14:58 UTC (permalink / raw)
To: rjw; +Cc: cpufreq, linux-pm, Viresh Kumar, Dmitry Eremin-Solenikov
Most of the CPUFreq drivers do similar things in .exit() and .verify() routines
and .attr. So its better if we have generic routines for them which can be used
by cpufreq drivers then.
This patch uses these generic routines for this driver.
Cc: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
---
drivers/cpufreq/maple-cpufreq.c | 14 ++------------
1 file changed, 2 insertions(+), 12 deletions(-)
diff --git a/drivers/cpufreq/maple-cpufreq.c b/drivers/cpufreq/maple-cpufreq.c
index b3fb661..b23d1d8 100644
--- a/drivers/cpufreq/maple-cpufreq.c
+++ b/drivers/cpufreq/maple-cpufreq.c
@@ -64,11 +64,6 @@ static struct cpufreq_frequency_table maple_cpu_freqs[] = {
{0, CPUFREQ_TABLE_END},
};
-static struct freq_attr *maple_cpu_freqs_attr[] = {
- &cpufreq_freq_attr_scaling_available_freqs,
- NULL,
-};
-
/* Power mode data is an array of the 32 bits PCR values to use for
* the various frequencies, retrieved from the device-tree
*/
@@ -135,11 +130,6 @@ static int maple_scom_query_freq(void)
* Common interface to the cpufreq core
*/
-static int maple_cpufreq_verify(struct cpufreq_policy *policy)
-{
- return cpufreq_frequency_table_verify(policy, maple_cpu_freqs);
-}
-
static int maple_cpufreq_target(struct cpufreq_policy *policy,
unsigned int target_freq, unsigned int relation)
{
@@ -190,10 +180,10 @@ static struct cpufreq_driver maple_cpufreq_driver = {
.name = "maple",
.flags = CPUFREQ_CONST_LOOPS,
.init = maple_cpufreq_cpu_init,
- .verify = maple_cpufreq_verify,
+ .verify = cpufreq_generic_frequency_table_verify,
.target = maple_cpufreq_target,
.get = maple_cpufreq_get_speed,
- .attr = maple_cpu_freqs_attr,
+ .attr = cpufreq_generic_attr,
};
static int __init maple_cpufreq_init(void)
--
1.7.12.rc2.18.g61b472e
^ permalink raw reply related [flat|nested] 112+ messages in thread
* [PATCH V2 Resend 19/92] cpufreq: omap: Use generic cpufreq routines
2013-10-03 14:57 [PATCH V2 Resend 00/92] CPUFreq Cleanup Series: Part II Viresh Kumar
` (17 preceding siblings ...)
2013-10-03 14:58 ` [PATCH V2 Resend 18/92] cpufreq: maple: " Viresh Kumar
@ 2013-10-03 14:58 ` Viresh Kumar
2013-10-03 14:58 ` [PATCH V2 Resend 20/92] cpufreq: p4-clockmod: " Viresh Kumar
` (71 subsequent siblings)
90 siblings, 0 replies; 112+ messages in thread
From: Viresh Kumar @ 2013-10-03 14:58 UTC (permalink / raw)
To: rjw; +Cc: cpufreq, linux-pm, Viresh Kumar, Santosh Shilimkar
Most of the CPUFreq drivers do similar things in .exit() and .verify() routines
and .attr. So its better if we have generic routines for them which can be used
by cpufreq drivers then.
This patch uses these generic routines for this driver.
Cc: Santosh Shilimkar <santosh.shilimkar@ti.com>
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
---
drivers/cpufreq/omap-cpufreq.c | 16 ++--------------
1 file changed, 2 insertions(+), 14 deletions(-)
diff --git a/drivers/cpufreq/omap-cpufreq.c b/drivers/cpufreq/omap-cpufreq.c
index 091f233..48020b5 100644
--- a/drivers/cpufreq/omap-cpufreq.c
+++ b/drivers/cpufreq/omap-cpufreq.c
@@ -40,13 +40,6 @@ static struct clk *mpu_clk;
static struct device *mpu_dev;
static struct regulator *mpu_reg;
-static int omap_verify_speed(struct cpufreq_policy *policy)
-{
- if (!freq_table)
- return -EINVAL;
- return cpufreq_frequency_table_verify(policy, freq_table);
-}
-
static unsigned int omap_getspeed(unsigned int cpu)
{
unsigned long rate;
@@ -227,20 +220,15 @@ static int omap_cpu_exit(struct cpufreq_policy *policy)
return 0;
}
-static struct freq_attr *omap_cpufreq_attr[] = {
- &cpufreq_freq_attr_scaling_available_freqs,
- NULL,
-};
-
static struct cpufreq_driver omap_driver = {
.flags = CPUFREQ_STICKY,
- .verify = omap_verify_speed,
+ .verify = cpufreq_generic_frequency_table_verify,
.target = omap_target,
.get = omap_getspeed,
.init = omap_cpu_init,
.exit = omap_cpu_exit,
.name = "omap",
- .attr = omap_cpufreq_attr,
+ .attr = cpufreq_generic_attr,
};
static int omap_cpufreq_probe(struct platform_device *pdev)
--
1.7.12.rc2.18.g61b472e
^ permalink raw reply related [flat|nested] 112+ messages in thread
* [PATCH V2 Resend 20/92] cpufreq: p4-clockmod: Use generic cpufreq routines
2013-10-03 14:57 [PATCH V2 Resend 00/92] CPUFreq Cleanup Series: Part II Viresh Kumar
` (18 preceding siblings ...)
2013-10-03 14:58 ` [PATCH V2 Resend 19/92] cpufreq: omap: " Viresh Kumar
@ 2013-10-03 14:58 ` Viresh Kumar
2013-10-03 14:58 ` [PATCH V2 Resend 21/92] cpufreq: pasemi: " Viresh Kumar
` (70 subsequent siblings)
90 siblings, 0 replies; 112+ messages in thread
From: Viresh Kumar @ 2013-10-03 14:58 UTC (permalink / raw)
To: rjw; +Cc: cpufreq, linux-pm, Viresh Kumar, David S. Miller
Most of the CPUFreq drivers do similar things in .exit() and .verify() routines
and .attr. So its better if we have generic routines for them which can be used
by cpufreq drivers then.
This patch uses these generic routines for this driver.
Cc: David S. Miller <davem@davemloft.net>
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
---
drivers/cpufreq/p4-clockmod.c | 23 +++--------------------
1 file changed, 3 insertions(+), 20 deletions(-)
diff --git a/drivers/cpufreq/p4-clockmod.c b/drivers/cpufreq/p4-clockmod.c
index 03478bf..4fe6d4c 100644
--- a/drivers/cpufreq/p4-clockmod.c
+++ b/drivers/cpufreq/p4-clockmod.c
@@ -140,12 +140,6 @@ static int cpufreq_p4_target(struct cpufreq_policy *policy,
}
-static int cpufreq_p4_verify(struct cpufreq_policy *policy)
-{
- return cpufreq_frequency_table_verify(policy, &p4clockmod_table[0]);
-}
-
-
static unsigned int cpufreq_p4_get_frequency(struct cpuinfo_x86 *c)
{
if (c->x86 == 0x06) {
@@ -242,12 +236,6 @@ static int cpufreq_p4_cpu_init(struct cpufreq_policy *policy)
}
-static int cpufreq_p4_cpu_exit(struct cpufreq_policy *policy)
-{
- cpufreq_frequency_table_put_attr(policy->cpu);
- return 0;
-}
-
static unsigned int cpufreq_p4_get(unsigned int cpu)
{
u32 l, h;
@@ -266,19 +254,14 @@ static unsigned int cpufreq_p4_get(unsigned int cpu)
return stock_freq;
}
-static struct freq_attr *p4clockmod_attr[] = {
- &cpufreq_freq_attr_scaling_available_freqs,
- NULL,
-};
-
static struct cpufreq_driver p4clockmod_driver = {
- .verify = cpufreq_p4_verify,
+ .verify = cpufreq_generic_frequency_table_verify,
.target = cpufreq_p4_target,
.init = cpufreq_p4_cpu_init,
- .exit = cpufreq_p4_cpu_exit,
+ .exit = cpufreq_generic_exit,
.get = cpufreq_p4_get,
.name = "p4-clockmod",
- .attr = p4clockmod_attr,
+ .attr = cpufreq_generic_attr,
};
static const struct x86_cpu_id cpufreq_p4_id[] = {
--
1.7.12.rc2.18.g61b472e
^ permalink raw reply related [flat|nested] 112+ messages in thread
* [PATCH V2 Resend 21/92] cpufreq: pasemi: Use generic cpufreq routines
2013-10-03 14:57 [PATCH V2 Resend 00/92] CPUFreq Cleanup Series: Part II Viresh Kumar
` (19 preceding siblings ...)
2013-10-03 14:58 ` [PATCH V2 Resend 20/92] cpufreq: p4-clockmod: " Viresh Kumar
@ 2013-10-03 14:58 ` Viresh Kumar
2013-10-03 14:58 ` [PATCH V2 Resend 22/92] cpufreq: pmac: " Viresh Kumar
` (69 subsequent siblings)
90 siblings, 0 replies; 112+ messages in thread
From: Viresh Kumar @ 2013-10-03 14:58 UTC (permalink / raw)
To: rjw; +Cc: cpufreq, linux-pm, Viresh Kumar
Most of the CPUFreq drivers do similar things in .exit() and .verify() routines
and .attr. So its better if we have generic routines for them which can be used
by cpufreq drivers then.
This patch uses these generic routines for this driver.
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
---
drivers/cpufreq/pasemi-cpufreq.c | 14 ++------------
1 file changed, 2 insertions(+), 12 deletions(-)
diff --git a/drivers/cpufreq/pasemi-cpufreq.c b/drivers/cpufreq/pasemi-cpufreq.c
index 23bc8a82..16f2508 100644
--- a/drivers/cpufreq/pasemi-cpufreq.c
+++ b/drivers/cpufreq/pasemi-cpufreq.c
@@ -69,11 +69,6 @@ static struct cpufreq_frequency_table pas_freqs[] = {
{0, CPUFREQ_TABLE_END},
};
-static struct freq_attr *pas_cpu_freqs_attr[] = {
- &cpufreq_freq_attr_scaling_available_freqs,
- NULL,
-};
-
/*
* hardware specific functions
*/
@@ -251,11 +246,6 @@ static int pas_cpufreq_cpu_exit(struct cpufreq_policy *policy)
return 0;
}
-static int pas_cpufreq_verify(struct cpufreq_policy *policy)
-{
- return cpufreq_frequency_table_verify(policy, pas_freqs);
-}
-
static int pas_cpufreq_target(struct cpufreq_policy *policy,
unsigned int target_freq,
unsigned int relation)
@@ -298,9 +288,9 @@ static struct cpufreq_driver pas_cpufreq_driver = {
.flags = CPUFREQ_CONST_LOOPS,
.init = pas_cpufreq_cpu_init,
.exit = pas_cpufreq_cpu_exit,
- .verify = pas_cpufreq_verify,
+ .verify = cpufreq_generic_frequency_table_verify,
.target = pas_cpufreq_target,
- .attr = pas_cpu_freqs_attr,
+ .attr = cpufreq_generic_attr,
};
/*
--
1.7.12.rc2.18.g61b472e
^ permalink raw reply related [flat|nested] 112+ messages in thread
* [PATCH V2 Resend 22/92] cpufreq: pmac: Use generic cpufreq routines
2013-10-03 14:57 [PATCH V2 Resend 00/92] CPUFreq Cleanup Series: Part II Viresh Kumar
` (20 preceding siblings ...)
2013-10-03 14:58 ` [PATCH V2 Resend 21/92] cpufreq: pasemi: " Viresh Kumar
@ 2013-10-03 14:58 ` Viresh Kumar
2013-10-03 14:58 ` [PATCH V2 Resend 23/92] cpufreq: powernow: " Viresh Kumar
` (68 subsequent siblings)
90 siblings, 0 replies; 112+ messages in thread
From: Viresh Kumar @ 2013-10-03 14:58 UTC (permalink / raw)
To: rjw; +Cc: cpufreq, linux-pm, Viresh Kumar
Most of the CPUFreq drivers do similar things in .exit() and .verify() routines
and .attr. So its better if we have generic routines for them which can be used
by cpufreq drivers then.
This patch uses these generic routines for this driver.
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
---
drivers/cpufreq/pmac32-cpufreq.c | 14 ++------------
drivers/cpufreq/pmac64-cpufreq.c | 14 ++------------
2 files changed, 4 insertions(+), 24 deletions(-)
diff --git a/drivers/cpufreq/pmac32-cpufreq.c b/drivers/cpufreq/pmac32-cpufreq.c
index 470b555..8715ab9 100644
--- a/drivers/cpufreq/pmac32-cpufreq.c
+++ b/drivers/cpufreq/pmac32-cpufreq.c
@@ -86,11 +86,6 @@ static struct cpufreq_frequency_table pmac_cpu_freqs[] = {
{0, CPUFREQ_TABLE_END},
};
-static struct freq_attr* pmac_cpu_freqs_attr[] = {
- &cpufreq_freq_attr_scaling_available_freqs,
- NULL,
-};
-
static inline void local_delay(unsigned long ms)
{
if (no_schedule)
@@ -378,11 +373,6 @@ static unsigned int pmac_cpufreq_get_speed(unsigned int cpu)
return cur_freq;
}
-static int pmac_cpufreq_verify(struct cpufreq_policy *policy)
-{
- return cpufreq_frequency_table_verify(policy, pmac_cpu_freqs);
-}
-
static int pmac_cpufreq_target( struct cpufreq_policy *policy,
unsigned int target_freq,
unsigned int relation)
@@ -468,14 +458,14 @@ static int pmac_cpufreq_resume(struct cpufreq_policy *policy)
}
static struct cpufreq_driver pmac_cpufreq_driver = {
- .verify = pmac_cpufreq_verify,
+ .verify = cpufreq_generic_frequency_table_verify,
.target = pmac_cpufreq_target,
.get = pmac_cpufreq_get_speed,
.init = pmac_cpufreq_cpu_init,
.suspend = pmac_cpufreq_suspend,
.resume = pmac_cpufreq_resume,
.flags = CPUFREQ_PM_NO_WARN,
- .attr = pmac_cpu_freqs_attr,
+ .attr = cpufreq_generic_attr,
.name = "powermac",
};
diff --git a/drivers/cpufreq/pmac64-cpufreq.c b/drivers/cpufreq/pmac64-cpufreq.c
index 41fa89e..e853b85 100644
--- a/drivers/cpufreq/pmac64-cpufreq.c
+++ b/drivers/cpufreq/pmac64-cpufreq.c
@@ -70,11 +70,6 @@ static struct cpufreq_frequency_table g5_cpu_freqs[] = {
{0, CPUFREQ_TABLE_END},
};
-static struct freq_attr* g5_cpu_freqs_attr[] = {
- &cpufreq_freq_attr_scaling_available_freqs,
- NULL,
-};
-
/* Power mode data is an array of the 32 bits PCR values to use for
* the various frequencies, retrieved from the device-tree
*/
@@ -317,11 +312,6 @@ static int g5_pfunc_query_freq(void)
* Common interface to the cpufreq core
*/
-static int g5_cpufreq_verify(struct cpufreq_policy *policy)
-{
- return cpufreq_frequency_table_verify(policy, g5_cpu_freqs);
-}
-
static int g5_cpufreq_target(struct cpufreq_policy *policy,
unsigned int target_freq, unsigned int relation)
{
@@ -372,10 +362,10 @@ static struct cpufreq_driver g5_cpufreq_driver = {
.name = "powermac",
.flags = CPUFREQ_CONST_LOOPS,
.init = g5_cpufreq_cpu_init,
- .verify = g5_cpufreq_verify,
+ .verify = cpufreq_generic_frequency_table_verify,
.target = g5_cpufreq_target,
.get = g5_cpufreq_get_speed,
- .attr = g5_cpu_freqs_attr,
+ .attr = cpufreq_generic_attr,
};
--
1.7.12.rc2.18.g61b472e
^ permalink raw reply related [flat|nested] 112+ messages in thread
* [PATCH V2 Resend 23/92] cpufreq: powernow: Use generic cpufreq routines
2013-10-03 14:57 [PATCH V2 Resend 00/92] CPUFreq Cleanup Series: Part II Viresh Kumar
` (21 preceding siblings ...)
2013-10-03 14:58 ` [PATCH V2 Resend 22/92] cpufreq: pmac: " Viresh Kumar
@ 2013-10-03 14:58 ` Viresh Kumar
2013-10-03 14:58 ` [PATCH V2 Resend 24/92] cpufreq: ppc-corenet: " Viresh Kumar
` (67 subsequent siblings)
90 siblings, 0 replies; 112+ messages in thread
From: Viresh Kumar @ 2013-10-03 14:58 UTC (permalink / raw)
To: rjw; +Cc: cpufreq, linux-pm, Viresh Kumar
Most of the CPUFreq drivers do similar things in .exit() and .verify() routines
and .attr. So its better if we have generic routines for them which can be used
by cpufreq drivers then.
This patch uses these generic routines for this driver.
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
---
drivers/cpufreq/powernow-k6.c | 22 ++--------------------
drivers/cpufreq/powernow-k7.c | 14 ++------------
drivers/cpufreq/powernow-k8.c | 20 ++------------------
3 files changed, 6 insertions(+), 50 deletions(-)
diff --git a/drivers/cpufreq/powernow-k6.c b/drivers/cpufreq/powernow-k6.c
index ab1de0d..ff05d28 100644
--- a/drivers/cpufreq/powernow-k6.c
+++ b/drivers/cpufreq/powernow-k6.c
@@ -105,19 +105,6 @@ static void powernow_k6_set_state(struct cpufreq_policy *policy,
/**
- * powernow_k6_verify - verifies a new CPUfreq policy
- * @policy: new policy
- *
- * Policy must be within lowest and highest possible CPU Frequency,
- * and at least one possible state must be within min and max.
- */
-static int powernow_k6_verify(struct cpufreq_policy *policy)
-{
- return cpufreq_frequency_table_verify(policy, &clock_ratio[0]);
-}
-
-
-/**
* powernow_k6_setpolicy - sets a new CPUFreq policy
* @policy: new policy
* @target_freq: the target frequency
@@ -188,19 +175,14 @@ static unsigned int powernow_k6_get(unsigned int cpu)
return ret;
}
-static struct freq_attr *powernow_k6_attr[] = {
- &cpufreq_freq_attr_scaling_available_freqs,
- NULL,
-};
-
static struct cpufreq_driver powernow_k6_driver = {
- .verify = powernow_k6_verify,
+ .verify = cpufreq_generic_frequency_table_verify,
.target = powernow_k6_target,
.init = powernow_k6_cpu_init,
.exit = powernow_k6_cpu_exit,
.get = powernow_k6_get,
.name = "powernow-k6",
- .attr = powernow_k6_attr,
+ .attr = cpufreq_generic_attr,
};
static const struct x86_cpu_id powernow_k6_ids[] = {
diff --git a/drivers/cpufreq/powernow-k7.c b/drivers/cpufreq/powernow-k7.c
index c863c13..14cd98f 100644
--- a/drivers/cpufreq/powernow-k7.c
+++ b/drivers/cpufreq/powernow-k7.c
@@ -549,11 +549,6 @@ static int powernow_target(struct cpufreq_policy *policy,
}
-static int powernow_verify(struct cpufreq_policy *policy)
-{
- return cpufreq_frequency_table_verify(policy, powernow_table);
-}
-
/*
* We use the fact that the bus frequency is somehow
* a multiple of 100000/3 khz, then we compute sgtc according
@@ -699,13 +694,8 @@ static int powernow_cpu_exit(struct cpufreq_policy *policy)
return 0;
}
-static struct freq_attr *powernow_table_attr[] = {
- &cpufreq_freq_attr_scaling_available_freqs,
- NULL,
-};
-
static struct cpufreq_driver powernow_driver = {
- .verify = powernow_verify,
+ .verify = cpufreq_generic_frequency_table_verify,
.target = powernow_target,
.get = powernow_get,
#ifdef CONFIG_X86_POWERNOW_K7_ACPI
@@ -714,7 +704,7 @@ static struct cpufreq_driver powernow_driver = {
.init = powernow_cpu_init,
.exit = powernow_cpu_exit,
.name = "powernow-k7",
- .attr = powernow_table_attr,
+ .attr = cpufreq_generic_attr,
};
static int __init powernow_init(void)
diff --git a/drivers/cpufreq/powernow-k8.c b/drivers/cpufreq/powernow-k8.c
index 8d4114a..1e6f68a 100644
--- a/drivers/cpufreq/powernow-k8.c
+++ b/drivers/cpufreq/powernow-k8.c
@@ -1053,17 +1053,6 @@ static int powernowk8_target(struct cpufreq_policy *pol,
return work_on_cpu(pol->cpu, powernowk8_target_fn, &pta);
}
-/* Driver entry point to verify the policy and range of frequencies */
-static int powernowk8_verify(struct cpufreq_policy *pol)
-{
- struct powernow_k8_data *data = per_cpu(powernow_data, pol->cpu);
-
- if (!data)
- return -EINVAL;
-
- return cpufreq_frequency_table_verify(pol, data->powernow_table);
-}
-
struct init_on_cpu {
struct powernow_k8_data *data;
int rc;
@@ -1225,20 +1214,15 @@ out:
return khz;
}
-static struct freq_attr *powernow_k8_attr[] = {
- &cpufreq_freq_attr_scaling_available_freqs,
- NULL,
-};
-
static struct cpufreq_driver cpufreq_amd64_driver = {
- .verify = powernowk8_verify,
+ .verify = cpufreq_generic_frequency_table_verify,
.target = powernowk8_target,
.bios_limit = acpi_processor_get_bios_limit,
.init = powernowk8_cpu_init,
.exit = powernowk8_cpu_exit,
.get = powernowk8_get,
.name = "powernow-k8",
- .attr = powernow_k8_attr,
+ .attr = cpufreq_generic_attr,
};
static void __request_acpi_cpufreq(void)
--
1.7.12.rc2.18.g61b472e
^ permalink raw reply related [flat|nested] 112+ messages in thread
* [PATCH V2 Resend 24/92] cpufreq: ppc-corenet: Use generic cpufreq routines
2013-10-03 14:57 [PATCH V2 Resend 00/92] CPUFreq Cleanup Series: Part II Viresh Kumar
` (22 preceding siblings ...)
2013-10-03 14:58 ` [PATCH V2 Resend 23/92] cpufreq: powernow: " Viresh Kumar
@ 2013-10-03 14:58 ` Viresh Kumar
2013-10-03 14:58 ` [PATCH V2 Resend 25/92] cpufreq: ppc_cbe: " Viresh Kumar
` (66 subsequent siblings)
90 siblings, 0 replies; 112+ messages in thread
From: Viresh Kumar @ 2013-10-03 14:58 UTC (permalink / raw)
To: rjw; +Cc: cpufreq, linux-pm, Viresh Kumar
Most of the CPUFreq drivers do similar things in .exit() and .verify() routines
and .attr. So its better if we have generic routines for them which can be used
by cpufreq drivers then.
This patch uses these generic routines for this driver.
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
---
drivers/cpufreq/ppc-corenet-cpufreq.c | 17 ++---------------
1 file changed, 2 insertions(+), 15 deletions(-)
diff --git a/drivers/cpufreq/ppc-corenet-cpufreq.c b/drivers/cpufreq/ppc-corenet-cpufreq.c
index 5716b44..befd489 100644
--- a/drivers/cpufreq/ppc-corenet-cpufreq.c
+++ b/drivers/cpufreq/ppc-corenet-cpufreq.c
@@ -252,14 +252,6 @@ static int __exit corenet_cpufreq_cpu_exit(struct cpufreq_policy *policy)
return 0;
}
-static int corenet_cpufreq_verify(struct cpufreq_policy *policy)
-{
- struct cpufreq_frequency_table *table =
- per_cpu(cpu_data, policy->cpu)->table;
-
- return cpufreq_frequency_table_verify(policy, table);
-}
-
static int corenet_cpufreq_target(struct cpufreq_policy *policy,
unsigned int target_freq, unsigned int relation)
{
@@ -292,20 +284,15 @@ static int corenet_cpufreq_target(struct cpufreq_policy *policy,
return ret;
}
-static struct freq_attr *corenet_cpufreq_attr[] = {
- &cpufreq_freq_attr_scaling_available_freqs,
- NULL,
-};
-
static struct cpufreq_driver ppc_corenet_cpufreq_driver = {
.name = "ppc_cpufreq",
.flags = CPUFREQ_CONST_LOOPS,
.init = corenet_cpufreq_cpu_init,
.exit = __exit_p(corenet_cpufreq_cpu_exit),
- .verify = corenet_cpufreq_verify,
+ .verify = cpufreq_generic_frequency_table_verify,
.target = corenet_cpufreq_target,
.get = corenet_cpufreq_get_speed,
- .attr = corenet_cpufreq_attr,
+ .attr = cpufreq_generic_attr,
};
static const struct of_device_id node_matches[] __initdata = {
--
1.7.12.rc2.18.g61b472e
^ permalink raw reply related [flat|nested] 112+ messages in thread
* [PATCH V2 Resend 25/92] cpufreq: ppc_cbe: Use generic cpufreq routines
2013-10-03 14:57 [PATCH V2 Resend 00/92] CPUFreq Cleanup Series: Part II Viresh Kumar
` (23 preceding siblings ...)
2013-10-03 14:58 ` [PATCH V2 Resend 24/92] cpufreq: ppc-corenet: " Viresh Kumar
@ 2013-10-03 14:58 ` Viresh Kumar
2013-10-03 14:58 ` [PATCH V2 Resend 26/92] cpufreq: pxa: " Viresh Kumar
` (65 subsequent siblings)
90 siblings, 0 replies; 112+ messages in thread
From: Viresh Kumar @ 2013-10-03 14:58 UTC (permalink / raw)
To: rjw; +Cc: cpufreq, linux-pm, Viresh Kumar
Most of the CPUFreq drivers do similar things in .exit() and .verify() routines
and .attr. So its better if we have generic routines for them which can be used
by cpufreq drivers then.
This patch uses these generic routines for this driver.
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
---
drivers/cpufreq/ppc_cbe_cpufreq.c | 15 ++-------------
1 file changed, 2 insertions(+), 13 deletions(-)
diff --git a/drivers/cpufreq/ppc_cbe_cpufreq.c b/drivers/cpufreq/ppc_cbe_cpufreq.c
index 6c5be63..38540d1 100644
--- a/drivers/cpufreq/ppc_cbe_cpufreq.c
+++ b/drivers/cpufreq/ppc_cbe_cpufreq.c
@@ -128,17 +128,6 @@ static int cbe_cpufreq_cpu_init(struct cpufreq_policy *policy)
return cpufreq_table_validate_and_show(policy, cbe_freqs);
}
-static int cbe_cpufreq_cpu_exit(struct cpufreq_policy *policy)
-{
- cpufreq_frequency_table_put_attr(policy->cpu);
- return 0;
-}
-
-static int cbe_cpufreq_verify(struct cpufreq_policy *policy)
-{
- return cpufreq_frequency_table_verify(policy, cbe_freqs);
-}
-
static int cbe_cpufreq_target(struct cpufreq_policy *policy,
unsigned int target_freq,
unsigned int relation)
@@ -174,10 +163,10 @@ static int cbe_cpufreq_target(struct cpufreq_policy *policy,
}
static struct cpufreq_driver cbe_cpufreq_driver = {
- .verify = cbe_cpufreq_verify,
+ .verify = cpufreq_generic_frequency_table_verify,
.target = cbe_cpufreq_target,
.init = cbe_cpufreq_cpu_init,
- .exit = cbe_cpufreq_cpu_exit,
+ .exit = cpufreq_generic_exit,
.name = "cbe-cpufreq",
.flags = CPUFREQ_CONST_LOOPS,
};
--
1.7.12.rc2.18.g61b472e
^ permalink raw reply related [flat|nested] 112+ messages in thread
* [PATCH V2 Resend 26/92] cpufreq: pxa: Use generic cpufreq routines
2013-10-03 14:57 [PATCH V2 Resend 00/92] CPUFreq Cleanup Series: Part II Viresh Kumar
` (24 preceding siblings ...)
2013-10-03 14:58 ` [PATCH V2 Resend 25/92] cpufreq: ppc_cbe: " Viresh Kumar
@ 2013-10-03 14:58 ` Viresh Kumar
2013-10-03 14:58 ` [PATCH V2 Resend 27/92] cpufreq: s3cx4xx: " Viresh Kumar
` (64 subsequent siblings)
90 siblings, 0 replies; 112+ messages in thread
From: Viresh Kumar @ 2013-10-03 14:58 UTC (permalink / raw)
To: rjw; +Cc: cpufreq, linux-pm, Viresh Kumar, Eric Miao
Most of the CPUFreq drivers do similar things in .exit() and .verify() routines
and .attr. So its better if we have generic routines for them which can be used
by cpufreq drivers then.
This patch uses these generic routines for this driver.
Cc: Eric Miao <eric.y.miao@gmail.com>
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
---
drivers/cpufreq/pxa2xx-cpufreq.c | 27 ++-------------------------
drivers/cpufreq/pxa3xx-cpufreq.c | 15 ++-------------
2 files changed, 4 insertions(+), 38 deletions(-)
diff --git a/drivers/cpufreq/pxa2xx-cpufreq.c b/drivers/cpufreq/pxa2xx-cpufreq.c
index 236531a..82905fe 100644
--- a/drivers/cpufreq/pxa2xx-cpufreq.c
+++ b/drivers/cpufreq/pxa2xx-cpufreq.c
@@ -262,23 +262,6 @@ static u32 mdrefr_dri(unsigned int freq)
return (interval - (cpu_is_pxa27x() ? 31 : 0)) / 32;
}
-/* find a valid frequency point */
-static int pxa_verify_policy(struct cpufreq_policy *policy)
-{
- struct cpufreq_frequency_table *pxa_freqs_table;
- pxa_freqs_t *pxa_freqs;
- int ret;
-
- find_freq_tables(&pxa_freqs_table, &pxa_freqs);
- ret = cpufreq_frequency_table_verify(policy, pxa_freqs_table);
-
- if (freq_debug)
- pr_debug("Verified CPU policy: %dKhz min to %dKhz max\n",
- policy->min, policy->max);
-
- return ret;
-}
-
static unsigned int pxa_cpufreq_get(unsigned int cpu)
{
return get_clk_frequency_khz(0);
@@ -465,17 +448,11 @@ static int pxa_cpufreq_init(struct cpufreq_policy *policy)
return 0;
}
-static int pxa_cpufreq_exit(struct cpufreq_policy *policy)
-{
- cpufreq_frequency_table_put_attr(policy->cpu);
- return 0;
-}
-
static struct cpufreq_driver pxa_cpufreq_driver = {
- .verify = pxa_verify_policy,
+ .verify = cpufreq_generic_frequency_table_verify,
.target = pxa_set_target,
.init = pxa_cpufreq_init,
- .exit = pxa_cpufreq_exit,
+ .exit = cpufreq_generic_exit,
.get = pxa_cpufreq_get,
.name = "PXA2xx",
};
diff --git a/drivers/cpufreq/pxa3xx-cpufreq.c b/drivers/cpufreq/pxa3xx-cpufreq.c
index 65fd01e..ae3ac08 100644
--- a/drivers/cpufreq/pxa3xx-cpufreq.c
+++ b/drivers/cpufreq/pxa3xx-cpufreq.c
@@ -150,11 +150,6 @@ static void __update_bus_freq(struct pxa3xx_freq_info *info)
cpu_relax();
}
-static int pxa3xx_cpufreq_verify(struct cpufreq_policy *policy)
-{
- return cpufreq_frequency_table_verify(policy, pxa3xx_freqs_table);
-}
-
static unsigned int pxa3xx_cpufreq_get(unsigned int cpu)
{
return pxa3xx_get_clk_frequency_khz(0);
@@ -229,17 +224,11 @@ static int pxa3xx_cpufreq_init(struct cpufreq_policy *policy)
return 0;
}
-static int pxa3xx_cpufreq_exit(struct cpufreq_policy *policy)
-{
- cpufreq_frequency_table_put_attr(policy->cpu);
- return 0;
-}
-
static struct cpufreq_driver pxa3xx_cpufreq_driver = {
- .verify = pxa3xx_cpufreq_verify,
+ .verify = cpufreq_generic_frequency_table_verify,
.target = pxa3xx_cpufreq_set,
.init = pxa3xx_cpufreq_init,
- .exit = pxa3xx_cpufreq_exit,
+ .exit = cpufreq_generic_exit,
.get = pxa3xx_cpufreq_get,
.name = "pxa3xx-cpufreq",
};
--
1.7.12.rc2.18.g61b472e
^ permalink raw reply related [flat|nested] 112+ messages in thread
* [PATCH V2 Resend 27/92] cpufreq: s3cx4xx: Use generic cpufreq routines
2013-10-03 14:57 [PATCH V2 Resend 00/92] CPUFreq Cleanup Series: Part II Viresh Kumar
` (25 preceding siblings ...)
2013-10-03 14:58 ` [PATCH V2 Resend 26/92] cpufreq: pxa: " Viresh Kumar
@ 2013-10-03 14:58 ` Viresh Kumar
2013-10-05 2:27 ` Kukjin Kim
2013-10-03 14:58 ` [PATCH V2 Resend 28/92] cpufreq: s5pv210: " Viresh Kumar
` (63 subsequent siblings)
90 siblings, 1 reply; 112+ messages in thread
From: Viresh Kumar @ 2013-10-03 14:58 UTC (permalink / raw)
To: rjw; +Cc: cpufreq, linux-pm, Viresh Kumar, Kukjin Kim
Most of the CPUFreq drivers do similar things in .exit() and .verify() routines
and .attr. So its better if we have generic routines for them which can be used
by cpufreq drivers then.
This patch uses these generic routines for this driver.
Cc: Kukjin Kim <kgene.kim@samsung.com>
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
---
drivers/cpufreq/s3c2416-cpufreq.c | 19 ++-----------------
drivers/cpufreq/s3c24xx-cpufreq.c | 9 ---------
drivers/cpufreq/s3c64xx-cpufreq.c | 10 +---------
3 files changed, 3 insertions(+), 35 deletions(-)
diff --git a/drivers/cpufreq/s3c2416-cpufreq.c b/drivers/cpufreq/s3c2416-cpufreq.c
index a7a4c61..8c57f10 100644
--- a/drivers/cpufreq/s3c2416-cpufreq.c
+++ b/drivers/cpufreq/s3c2416-cpufreq.c
@@ -87,16 +87,6 @@ static struct cpufreq_frequency_table s3c2450_freq_table[] = {
{ 0, CPUFREQ_TABLE_END },
};
-static int s3c2416_cpufreq_verify_speed(struct cpufreq_policy *policy)
-{
- struct s3c2416_data *s3c_freq = &s3c2416_cpufreq;
-
- if (policy->cpu != 0)
- return -EINVAL;
-
- return cpufreq_frequency_table_verify(policy, s3c_freq->freq_table);
-}
-
static unsigned int s3c2416_cpufreq_get_speed(unsigned int cpu)
{
struct s3c2416_data *s3c_freq = &s3c2416_cpufreq;
@@ -516,19 +506,14 @@ err_hclk:
return ret;
}
-static struct freq_attr *s3c2416_cpufreq_attr[] = {
- &cpufreq_freq_attr_scaling_available_freqs,
- NULL,
-};
-
static struct cpufreq_driver s3c2416_cpufreq_driver = {
.flags = 0,
- .verify = s3c2416_cpufreq_verify_speed,
+ .verify = cpufreq_generic_frequency_table_verify,
.target = s3c2416_cpufreq_set_target,
.get = s3c2416_cpufreq_get_speed,
.init = s3c2416_cpufreq_driver_init,
.name = "s3c2416",
- .attr = s3c2416_cpufreq_attr,
+ .attr = cpufreq_generic_attr,
};
static int __init s3c2416_cpufreq_init(void)
diff --git a/drivers/cpufreq/s3c24xx-cpufreq.c b/drivers/cpufreq/s3c24xx-cpufreq.c
index 73856d1..027dec1 100644
--- a/drivers/cpufreq/s3c24xx-cpufreq.c
+++ b/drivers/cpufreq/s3c24xx-cpufreq.c
@@ -416,14 +416,6 @@ static int __init s3c_cpufreq_initclks(void)
return 0;
}
-static int s3c_cpufreq_verify(struct cpufreq_policy *policy)
-{
- if (policy->cpu != 0)
- return -EINVAL;
-
- return 0;
-}
-
#ifdef CONFIG_PM
static struct cpufreq_frequency_table suspend_pll;
static unsigned int suspend_freq;
@@ -473,7 +465,6 @@ static int s3c_cpufreq_resume(struct cpufreq_policy *policy)
static struct cpufreq_driver s3c24xx_driver = {
.flags = CPUFREQ_STICKY,
- .verify = s3c_cpufreq_verify,
.target = s3c_cpufreq_target,
.get = s3c_cpufreq_get,
.init = s3c_cpufreq_init,
diff --git a/drivers/cpufreq/s3c64xx-cpufreq.c b/drivers/cpufreq/s3c64xx-cpufreq.c
index 872f74d..99fbc49 100644
--- a/drivers/cpufreq/s3c64xx-cpufreq.c
+++ b/drivers/cpufreq/s3c64xx-cpufreq.c
@@ -54,14 +54,6 @@ static struct cpufreq_frequency_table s3c64xx_freq_table[] = {
};
#endif
-static int s3c64xx_cpufreq_verify_speed(struct cpufreq_policy *policy)
-{
- if (policy->cpu != 0)
- return -EINVAL;
-
- return cpufreq_frequency_table_verify(policy, s3c64xx_freq_table);
-}
-
static unsigned int s3c64xx_cpufreq_get_speed(unsigned int cpu)
{
if (cpu != 0)
@@ -264,7 +256,7 @@ static int s3c64xx_cpufreq_driver_init(struct cpufreq_policy *policy)
static struct cpufreq_driver s3c64xx_cpufreq_driver = {
.flags = 0,
- .verify = s3c64xx_cpufreq_verify_speed,
+ .verify = cpufreq_generic_frequency_table_verify,
.target = s3c64xx_cpufreq_set_target,
.get = s3c64xx_cpufreq_get_speed,
.init = s3c64xx_cpufreq_driver_init,
--
1.7.12.rc2.18.g61b472e
^ permalink raw reply related [flat|nested] 112+ messages in thread
* [PATCH V2 Resend 28/92] cpufreq: s5pv210: Use generic cpufreq routines
2013-10-03 14:57 [PATCH V2 Resend 00/92] CPUFreq Cleanup Series: Part II Viresh Kumar
` (26 preceding siblings ...)
2013-10-03 14:58 ` [PATCH V2 Resend 27/92] cpufreq: s3cx4xx: " Viresh Kumar
@ 2013-10-03 14:58 ` Viresh Kumar
2013-10-05 2:28 ` Kukjin Kim
2013-10-03 14:58 ` [PATCH V2 Resend 29/92] cpufreq: sa11x0: " Viresh Kumar
` (62 subsequent siblings)
90 siblings, 1 reply; 112+ messages in thread
From: Viresh Kumar @ 2013-10-03 14:58 UTC (permalink / raw)
To: rjw; +Cc: cpufreq, linux-pm, Viresh Kumar, Kukjin Kim
Most of the CPUFreq drivers do similar things in .exit() and .verify() routines
and .attr. So its better if we have generic routines for them which can be used
by cpufreq drivers then.
This patch uses these generic routines for this driver.
Cc: Kukjin Kim <kgene.kim@samsung.com>
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
---
drivers/cpufreq/s5pv210-cpufreq.c | 10 +---------
1 file changed, 1 insertion(+), 9 deletions(-)
diff --git a/drivers/cpufreq/s5pv210-cpufreq.c b/drivers/cpufreq/s5pv210-cpufreq.c
index c266a7e..0eafc52 100644
--- a/drivers/cpufreq/s5pv210-cpufreq.c
+++ b/drivers/cpufreq/s5pv210-cpufreq.c
@@ -174,14 +174,6 @@ static void s5pv210_set_refresh(enum s5pv210_dmc_port ch, unsigned long freq)
__raw_writel(tmp1, reg);
}
-static int s5pv210_verify_speed(struct cpufreq_policy *policy)
-{
- if (policy->cpu)
- return -EINVAL;
-
- return cpufreq_frequency_table_verify(policy, s5pv210_freq_table);
-}
-
static unsigned int s5pv210_getspeed(unsigned int cpu)
{
if (cpu)
@@ -603,7 +595,7 @@ static int s5pv210_cpufreq_reboot_notifier_event(struct notifier_block *this,
static struct cpufreq_driver s5pv210_driver = {
.flags = CPUFREQ_STICKY,
- .verify = s5pv210_verify_speed,
+ .verify = cpufreq_generic_frequency_table_verify,
.target = s5pv210_target,
.get = s5pv210_getspeed,
.init = s5pv210_cpu_init,
--
1.7.12.rc2.18.g61b472e
^ permalink raw reply related [flat|nested] 112+ messages in thread
* [PATCH V2 Resend 29/92] cpufreq: sa11x0: Use generic cpufreq routines
2013-10-03 14:57 [PATCH V2 Resend 00/92] CPUFreq Cleanup Series: Part II Viresh Kumar
` (27 preceding siblings ...)
2013-10-03 14:58 ` [PATCH V2 Resend 28/92] cpufreq: s5pv210: " Viresh Kumar
@ 2013-10-03 14:58 ` Viresh Kumar
2013-10-03 14:58 ` [PATCH V2 Resend 30/92] cpufreq: sc520: " Viresh Kumar
` (61 subsequent siblings)
90 siblings, 0 replies; 112+ messages in thread
From: Viresh Kumar @ 2013-10-03 14:58 UTC (permalink / raw)
To: rjw; +Cc: cpufreq, linux-pm, Viresh Kumar
Most of the CPUFreq drivers do similar things in .exit() and .verify() routines
and .attr. So its better if we have generic routines for them which can be used
by cpufreq drivers then.
This patch uses these generic routines for this driver.
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
---
arch/arm/mach-sa1100/generic.c | 22 ----------------------
arch/arm/mach-sa1100/generic.h | 1 -
drivers/cpufreq/sa1100-cpufreq.c | 2 +-
drivers/cpufreq/sa1110-cpufreq.c | 2 +-
4 files changed, 2 insertions(+), 25 deletions(-)
diff --git a/arch/arm/mach-sa1100/generic.c b/arch/arm/mach-sa1100/generic.c
index 5c8167b..cb4b2ca 100644
--- a/arch/arm/mach-sa1100/generic.c
+++ b/arch/arm/mach-sa1100/generic.c
@@ -82,28 +82,6 @@ unsigned int sa11x0_ppcr_to_freq(unsigned int idx)
return freq;
}
-
-/* make sure that only the "userspace" governor is run -- anything else wouldn't make sense on
- * this platform, anyway.
- */
-int sa11x0_verify_speed(struct cpufreq_policy *policy)
-{
- unsigned int tmp;
- if (policy->cpu)
- return -EINVAL;
-
- cpufreq_verify_within_limits(policy, policy->cpuinfo.min_freq, policy->cpuinfo.max_freq);
-
- /* make sure that at least one frequency is within the policy */
- tmp = sa11x0_freq_table[sa11x0_freq_to_ppcr(policy->min)].frequency;
- if (tmp > policy->max)
- policy->max = tmp;
-
- cpufreq_verify_within_limits(policy, policy->cpuinfo.min_freq, policy->cpuinfo.max_freq);
-
- return 0;
-}
-
unsigned int sa11x0_getspeed(unsigned int cpu)
{
if (cpu)
diff --git a/arch/arm/mach-sa1100/generic.h b/arch/arm/mach-sa1100/generic.h
index f5214ce..39d56a67 100644
--- a/arch/arm/mach-sa1100/generic.h
+++ b/arch/arm/mach-sa1100/generic.h
@@ -23,7 +23,6 @@ struct cpufreq_policy;
extern struct cpufreq_frequency_table sa11x0_freq_table[];
extern unsigned int sa11x0_freq_to_ppcr(unsigned int khz);
-extern int sa11x0_verify_speed(struct cpufreq_policy *policy);
extern unsigned int sa11x0_getspeed(unsigned int cpu);
extern unsigned int sa11x0_ppcr_to_freq(unsigned int idx);
diff --git a/drivers/cpufreq/sa1100-cpufreq.c b/drivers/cpufreq/sa1100-cpufreq.c
index 37fce2f..80a4fde 100644
--- a/drivers/cpufreq/sa1100-cpufreq.c
+++ b/drivers/cpufreq/sa1100-cpufreq.c
@@ -228,7 +228,7 @@ static int __init sa1100_cpu_init(struct cpufreq_policy *policy)
static struct cpufreq_driver sa1100_driver __refdata = {
.flags = CPUFREQ_STICKY,
- .verify = sa11x0_verify_speed,
+ .verify = cpufreq_generic_frequency_table_verify,
.target = sa1100_target,
.get = sa11x0_getspeed,
.init = sa1100_cpu_init,
diff --git a/drivers/cpufreq/sa1110-cpufreq.c b/drivers/cpufreq/sa1110-cpufreq.c
index 13760fc..a38d904 100644
--- a/drivers/cpufreq/sa1110-cpufreq.c
+++ b/drivers/cpufreq/sa1110-cpufreq.c
@@ -344,7 +344,7 @@ static int __init sa1110_cpu_init(struct cpufreq_policy *policy)
* it with cpufreq_register_driver() */
static struct cpufreq_driver sa1110_driver __refdata = {
.flags = CPUFREQ_STICKY,
- .verify = sa11x0_verify_speed,
+ .verify = cpufreq_generic_frequency_table_verify,
.target = sa1110_target,
.get = sa11x0_getspeed,
.init = sa1110_cpu_init,
--
1.7.12.rc2.18.g61b472e
^ permalink raw reply related [flat|nested] 112+ messages in thread
* [PATCH V2 Resend 30/92] cpufreq: sc520: Use generic cpufreq routines
2013-10-03 14:57 [PATCH V2 Resend 00/92] CPUFreq Cleanup Series: Part II Viresh Kumar
` (28 preceding siblings ...)
2013-10-03 14:58 ` [PATCH V2 Resend 29/92] cpufreq: sa11x0: " Viresh Kumar
@ 2013-10-03 14:58 ` Viresh Kumar
2013-10-03 14:58 ` [PATCH V2 Resend 31/92] cpufreq: sh: " Viresh Kumar
` (60 subsequent siblings)
90 siblings, 0 replies; 112+ messages in thread
From: Viresh Kumar @ 2013-10-03 14:58 UTC (permalink / raw)
To: rjw; +Cc: cpufreq, linux-pm, Viresh Kumar
Most of the CPUFreq drivers do similar things in .exit() and .verify() routines
and .attr. So its better if we have generic routines for them which can be used
by cpufreq drivers then.
This patch uses these generic routines for this driver.
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
---
drivers/cpufreq/sc520_freq.c | 24 +++---------------------
1 file changed, 3 insertions(+), 21 deletions(-)
diff --git a/drivers/cpufreq/sc520_freq.c b/drivers/cpufreq/sc520_freq.c
index bb9c0de..8556225 100644
--- a/drivers/cpufreq/sc520_freq.c
+++ b/drivers/cpufreq/sc520_freq.c
@@ -78,11 +78,6 @@ static void sc520_freq_set_cpu_state(struct cpufreq_policy *policy,
cpufreq_notify_transition(policy, &freqs, CPUFREQ_POSTCHANGE);
};
-static int sc520_freq_verify(struct cpufreq_policy *policy)
-{
- return cpufreq_frequency_table_verify(policy, &sc520_freq_table[0]);
-}
-
static int sc520_freq_target(struct cpufreq_policy *policy,
unsigned int target_freq,
unsigned int relation)
@@ -120,27 +115,14 @@ static int sc520_freq_cpu_init(struct cpufreq_policy *policy)
}
-static int sc520_freq_cpu_exit(struct cpufreq_policy *policy)
-{
- cpufreq_frequency_table_put_attr(policy->cpu);
- return 0;
-}
-
-
-static struct freq_attr *sc520_freq_attr[] = {
- &cpufreq_freq_attr_scaling_available_freqs,
- NULL,
-};
-
-
static struct cpufreq_driver sc520_freq_driver = {
.get = sc520_freq_get_cpu_frequency,
- .verify = sc520_freq_verify,
+ .verify = cpufreq_generic_frequency_table_verify,
.target = sc520_freq_target,
.init = sc520_freq_cpu_init,
- .exit = sc520_freq_cpu_exit,
+ .exit = cpufreq_generic_exit,
.name = "sc520_freq",
- .attr = sc520_freq_attr,
+ .attr = cpufreq_generic_attr,
};
static const struct x86_cpu_id sc520_ids[] = {
--
1.7.12.rc2.18.g61b472e
^ permalink raw reply related [flat|nested] 112+ messages in thread
* [PATCH V2 Resend 31/92] cpufreq: sh: Use generic cpufreq routines
2013-10-03 14:57 [PATCH V2 Resend 00/92] CPUFreq Cleanup Series: Part II Viresh Kumar
` (29 preceding siblings ...)
2013-10-03 14:58 ` [PATCH V2 Resend 30/92] cpufreq: sc520: " Viresh Kumar
@ 2013-10-03 14:58 ` Viresh Kumar
2013-10-03 14:58 ` [PATCH V2 Resend 32/92] cpufreq: sparc: " Viresh Kumar
` (59 subsequent siblings)
90 siblings, 0 replies; 112+ messages in thread
From: Viresh Kumar @ 2013-10-03 14:58 UTC (permalink / raw)
To: rjw; +Cc: cpufreq, linux-pm, Viresh Kumar, Paul Mundt, linux-sh
Most of the CPUFreq drivers do similar things in .exit() and .verify() routines
and .attr. So its better if we have generic routines for them which can be used
by cpufreq drivers then.
This patch uses these generic routines for this driver.
Cc: Paul Mundt <lethal@linux-sh.org>
Cc: linux-sh@vger.kernel.org
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
---
drivers/cpufreq/sh-cpufreq.c | 7 +------
1 file changed, 1 insertion(+), 6 deletions(-)
diff --git a/drivers/cpufreq/sh-cpufreq.c b/drivers/cpufreq/sh-cpufreq.c
index 1362e88..91c6446 100644
--- a/drivers/cpufreq/sh-cpufreq.c
+++ b/drivers/cpufreq/sh-cpufreq.c
@@ -154,11 +154,6 @@ static int sh_cpufreq_cpu_exit(struct cpufreq_policy *policy)
return 0;
}
-static struct freq_attr *sh_freq_attr[] = {
- &cpufreq_freq_attr_scaling_available_freqs,
- NULL,
-};
-
static struct cpufreq_driver sh_cpufreq_driver = {
.name = "sh",
.get = sh_cpufreq_get,
@@ -166,7 +161,7 @@ static struct cpufreq_driver sh_cpufreq_driver = {
.verify = sh_cpufreq_verify,
.init = sh_cpufreq_cpu_init,
.exit = sh_cpufreq_cpu_exit,
- .attr = sh_freq_attr,
+ .attr = cpufreq_generic_attr,
};
static int __init sh_cpufreq_module_init(void)
--
1.7.12.rc2.18.g61b472e
^ permalink raw reply related [flat|nested] 112+ messages in thread
* [PATCH V2 Resend 32/92] cpufreq: sparc: Use generic cpufreq routines
2013-10-03 14:57 [PATCH V2 Resend 00/92] CPUFreq Cleanup Series: Part II Viresh Kumar
` (30 preceding siblings ...)
2013-10-03 14:58 ` [PATCH V2 Resend 31/92] cpufreq: sh: " Viresh Kumar
@ 2013-10-03 14:58 ` Viresh Kumar
2013-10-03 14:58 ` [PATCH V2 Resend 33/92] cpufreq: spear: " Viresh Kumar
` (58 subsequent siblings)
90 siblings, 0 replies; 112+ messages in thread
From: Viresh Kumar @ 2013-10-03 14:58 UTC (permalink / raw)
To: rjw; +Cc: cpufreq, linux-pm, Viresh Kumar, David S. Miller, sparclinux
Most of the CPUFreq drivers do similar things in .exit() and .verify() routines
and .attr. So its better if we have generic routines for them which can be used
by cpufreq drivers then.
This patch uses these generic routines for this driver.
Cc: David S. Miller <davem@davemloft.net>
Cc: sparclinux@vger.kernel.org
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
---
drivers/cpufreq/sparc-us2e-cpufreq.c | 8 +-------
drivers/cpufreq/sparc-us3-cpufreq.c | 8 +-------
2 files changed, 2 insertions(+), 14 deletions(-)
diff --git a/drivers/cpufreq/sparc-us2e-cpufreq.c b/drivers/cpufreq/sparc-us2e-cpufreq.c
index 8db0c18..291688c 100644
--- a/drivers/cpufreq/sparc-us2e-cpufreq.c
+++ b/drivers/cpufreq/sparc-us2e-cpufreq.c
@@ -295,12 +295,6 @@ static int us2e_freq_target(struct cpufreq_policy *policy,
return 0;
}
-static int us2e_freq_verify(struct cpufreq_policy *policy)
-{
- return cpufreq_frequency_table_verify(policy,
- &us2e_freq_table[policy->cpu].table[0]);
-}
-
static int __init us2e_freq_cpu_init(struct cpufreq_policy *policy)
{
unsigned int cpu = policy->cpu;
@@ -363,7 +357,7 @@ static int __init us2e_freq_init(void)
goto err_out;
driver->init = us2e_freq_cpu_init;
- driver->verify = us2e_freq_verify;
+ driver->verify = cpufreq_generic_frequency_table_verify;
driver->target = us2e_freq_target;
driver->get = us2e_freq_get;
driver->exit = us2e_freq_cpu_exit;
diff --git a/drivers/cpufreq/sparc-us3-cpufreq.c b/drivers/cpufreq/sparc-us3-cpufreq.c
index 120a2df..9b3dbd3 100644
--- a/drivers/cpufreq/sparc-us3-cpufreq.c
+++ b/drivers/cpufreq/sparc-us3-cpufreq.c
@@ -156,12 +156,6 @@ static int us3_freq_target(struct cpufreq_policy *policy,
return 0;
}
-static int us3_freq_verify(struct cpufreq_policy *policy)
-{
- return cpufreq_frequency_table_verify(policy,
- &us3_freq_table[policy->cpu].table[0]);
-}
-
static int __init us3_freq_cpu_init(struct cpufreq_policy *policy)
{
unsigned int cpu = policy->cpu;
@@ -224,7 +218,7 @@ static int __init us3_freq_init(void)
goto err_out;
driver->init = us3_freq_cpu_init;
- driver->verify = us3_freq_verify;
+ driver->verify = cpufreq_generic_frequency_table_verify;
driver->target = us3_freq_target;
driver->get = us3_freq_get;
driver->exit = us3_freq_cpu_exit;
--
1.7.12.rc2.18.g61b472e
^ permalink raw reply related [flat|nested] 112+ messages in thread
* [PATCH V2 Resend 33/92] cpufreq: spear: Use generic cpufreq routines
2013-10-03 14:57 [PATCH V2 Resend 00/92] CPUFreq Cleanup Series: Part II Viresh Kumar
` (31 preceding siblings ...)
2013-10-03 14:58 ` [PATCH V2 Resend 32/92] cpufreq: sparc: " Viresh Kumar
@ 2013-10-03 14:58 ` Viresh Kumar
2013-10-03 14:58 ` [PATCH V2 Resend 34/92] cpufreq: speedstep: " Viresh Kumar
` (57 subsequent siblings)
90 siblings, 0 replies; 112+ messages in thread
From: Viresh Kumar @ 2013-10-03 14:58 UTC (permalink / raw)
To: rjw; +Cc: cpufreq, linux-pm, Viresh Kumar, spear-devel
Most of the CPUFreq drivers do similar things in .exit() and .verify() routines
and .attr. So its better if we have generic routines for them which can be used
by cpufreq drivers then.
This patch uses these generic routines for this driver.
Cc: spear-devel@list.st.com
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
---
drivers/cpufreq/spear-cpufreq.c | 22 +++-------------------
1 file changed, 3 insertions(+), 19 deletions(-)
diff --git a/drivers/cpufreq/spear-cpufreq.c b/drivers/cpufreq/spear-cpufreq.c
index 9ff05d4..796b1db 100644
--- a/drivers/cpufreq/spear-cpufreq.c
+++ b/drivers/cpufreq/spear-cpufreq.c
@@ -30,11 +30,6 @@ static struct {
u32 cnt;
} spear_cpufreq;
-static int spear_cpufreq_verify(struct cpufreq_policy *policy)
-{
- return cpufreq_frequency_table_verify(policy, spear_cpufreq.freq_tbl);
-}
-
static unsigned int spear_cpufreq_get(unsigned int cpu)
{
return clk_get_rate(spear_cpufreq.clk) / 1000;
@@ -192,26 +187,15 @@ static int spear_cpufreq_init(struct cpufreq_policy *policy)
return 0;
}
-static int spear_cpufreq_exit(struct cpufreq_policy *policy)
-{
- cpufreq_frequency_table_put_attr(policy->cpu);
- return 0;
-}
-
-static struct freq_attr *spear_cpufreq_attr[] = {
- &cpufreq_freq_attr_scaling_available_freqs,
- NULL,
-};
-
static struct cpufreq_driver spear_cpufreq_driver = {
.name = "cpufreq-spear",
.flags = CPUFREQ_STICKY,
- .verify = spear_cpufreq_verify,
+ .verify = cpufreq_generic_frequency_table_verify,
.target = spear_cpufreq_target,
.get = spear_cpufreq_get,
.init = spear_cpufreq_init,
- .exit = spear_cpufreq_exit,
- .attr = spear_cpufreq_attr,
+ .exit = cpufreq_generic_exit,
+ .attr = cpufreq_generic_attr,
};
static int spear_cpufreq_driver_init(void)
--
1.7.12.rc2.18.g61b472e
^ permalink raw reply related [flat|nested] 112+ messages in thread
* [PATCH V2 Resend 34/92] cpufreq: speedstep: Use generic cpufreq routines
2013-10-03 14:57 [PATCH V2 Resend 00/92] CPUFreq Cleanup Series: Part II Viresh Kumar
` (32 preceding siblings ...)
2013-10-03 14:58 ` [PATCH V2 Resend 33/92] cpufreq: spear: " Viresh Kumar
@ 2013-10-03 14:58 ` Viresh Kumar
2013-10-03 14:58 ` [PATCH V2 Resend 35/92] cpufreq: tegra: " Viresh Kumar
` (56 subsequent siblings)
90 siblings, 0 replies; 112+ messages in thread
From: Viresh Kumar @ 2013-10-03 14:58 UTC (permalink / raw)
To: rjw; +Cc: cpufreq, linux-pm, Viresh Kumar, David S. Miller
Most of the CPUFreq drivers do similar things in .exit() and .verify() routines
and .attr. So its better if we have generic routines for them which can be used
by cpufreq drivers then.
This patch uses these generic routines for this driver.
Cc: David S. Miller <davem@davemloft.net>
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
---
drivers/cpufreq/speedstep-centrino.c | 22 ++--------------------
drivers/cpufreq/speedstep-ich.c | 30 +++---------------------------
drivers/cpufreq/speedstep-smi.c | 30 +++---------------------------
3 files changed, 8 insertions(+), 74 deletions(-)
diff --git a/drivers/cpufreq/speedstep-centrino.c b/drivers/cpufreq/speedstep-centrino.c
index f180561..c7c14ae 100644
--- a/drivers/cpufreq/speedstep-centrino.c
+++ b/drivers/cpufreq/speedstep-centrino.c
@@ -420,19 +420,6 @@ static int centrino_cpu_exit(struct cpufreq_policy *policy)
}
/**
- * centrino_verify - verifies a new CPUFreq policy
- * @policy: new policy
- *
- * Limit must be within this model's frequency range at least one
- * border included.
- */
-static int centrino_verify (struct cpufreq_policy *policy)
-{
- return cpufreq_frequency_table_verify(policy,
- per_cpu(centrino_model, policy->cpu)->op_points);
-}
-
-/**
* centrino_setpolicy - set a new CPUFreq policy
* @policy: new policy
* @target_freq: the target frequency
@@ -553,20 +540,15 @@ out:
return retval;
}
-static struct freq_attr* centrino_attr[] = {
- &cpufreq_freq_attr_scaling_available_freqs,
- NULL,
-};
-
static struct cpufreq_driver centrino_driver = {
.name = "centrino", /* should be speedstep-centrino,
but there's a 16 char limit */
.init = centrino_cpu_init,
.exit = centrino_cpu_exit,
- .verify = centrino_verify,
+ .verify = cpufreq_generic_frequency_table_verify,
.target = centrino_target,
.get = get_cur_freq,
- .attr = centrino_attr,
+ .attr = cpufreq_generic_attr,
};
/*
diff --git a/drivers/cpufreq/speedstep-ich.c b/drivers/cpufreq/speedstep-ich.c
index 86a184e..929a4f0 100644
--- a/drivers/cpufreq/speedstep-ich.c
+++ b/drivers/cpufreq/speedstep-ich.c
@@ -289,18 +289,6 @@ static int speedstep_target(struct cpufreq_policy *policy,
}
-/**
- * speedstep_verify - verifies a new CPUFreq policy
- * @policy: new policy
- *
- * Limit must be within speedstep_low_freq and speedstep_high_freq, with
- * at least one border included.
- */
-static int speedstep_verify(struct cpufreq_policy *policy)
-{
- return cpufreq_frequency_table_verify(policy, &speedstep_freqs[0]);
-}
-
struct get_freqs {
struct cpufreq_policy *policy;
int ret;
@@ -352,26 +340,14 @@ static int speedstep_cpu_init(struct cpufreq_policy *policy)
}
-static int speedstep_cpu_exit(struct cpufreq_policy *policy)
-{
- cpufreq_frequency_table_put_attr(policy->cpu);
- return 0;
-}
-
-static struct freq_attr *speedstep_attr[] = {
- &cpufreq_freq_attr_scaling_available_freqs,
- NULL,
-};
-
-
static struct cpufreq_driver speedstep_driver = {
.name = "speedstep-ich",
- .verify = speedstep_verify,
+ .verify = cpufreq_generic_frequency_table_verify,
.target = speedstep_target,
.init = speedstep_cpu_init,
- .exit = speedstep_cpu_exit,
+ .exit = cpufreq_generic_exit,
.get = speedstep_get,
- .attr = speedstep_attr,
+ .attr = cpufreq_generic_attr,
};
static const struct x86_cpu_id ss_smi_ids[] = {
diff --git a/drivers/cpufreq/speedstep-smi.c b/drivers/cpufreq/speedstep-smi.c
index f4d0318..b3dfba0 100644
--- a/drivers/cpufreq/speedstep-smi.c
+++ b/drivers/cpufreq/speedstep-smi.c
@@ -264,19 +264,6 @@ static int speedstep_target(struct cpufreq_policy *policy,
}
-/**
- * speedstep_verify - verifies a new CPUFreq policy
- * @policy: new policy
- *
- * Limit must be within speedstep_low_freq and speedstep_high_freq, with
- * at least one border included.
- */
-static int speedstep_verify(struct cpufreq_policy *policy)
-{
- return cpufreq_frequency_table_verify(policy, &speedstep_freqs[0]);
-}
-
-
static int speedstep_cpu_init(struct cpufreq_policy *policy)
{
int result;
@@ -332,12 +319,6 @@ static int speedstep_cpu_init(struct cpufreq_policy *policy)
return cpufreq_table_validate_and_show(policy, speedstep_freqs);
}
-static int speedstep_cpu_exit(struct cpufreq_policy *policy)
-{
- cpufreq_frequency_table_put_attr(policy->cpu);
- return 0;
-}
-
static unsigned int speedstep_get(unsigned int cpu)
{
if (cpu)
@@ -356,20 +337,15 @@ static int speedstep_resume(struct cpufreq_policy *policy)
return result;
}
-static struct freq_attr *speedstep_attr[] = {
- &cpufreq_freq_attr_scaling_available_freqs,
- NULL,
-};
-
static struct cpufreq_driver speedstep_driver = {
.name = "speedstep-smi",
- .verify = speedstep_verify,
+ .verify = cpufreq_generic_frequency_table_verify,
.target = speedstep_target,
.init = speedstep_cpu_init,
- .exit = speedstep_cpu_exit,
+ .exit = cpufreq_generic_exit,
.get = speedstep_get,
.resume = speedstep_resume,
- .attr = speedstep_attr,
+ .attr = cpufreq_generic_attr,
};
static const struct x86_cpu_id ss_smi_ids[] = {
--
1.7.12.rc2.18.g61b472e
^ permalink raw reply related [flat|nested] 112+ messages in thread
* [PATCH V2 Resend 35/92] cpufreq: tegra: Use generic cpufreq routines
2013-10-03 14:57 [PATCH V2 Resend 00/92] CPUFreq Cleanup Series: Part II Viresh Kumar
` (33 preceding siblings ...)
2013-10-03 14:58 ` [PATCH V2 Resend 34/92] cpufreq: speedstep: " Viresh Kumar
@ 2013-10-03 14:58 ` Viresh Kumar
2013-10-03 14:58 ` [PATCH V2 Resend 36/92] cpufreq: call cpufreq_driver->get() after calling ->init() Viresh Kumar
` (55 subsequent siblings)
90 siblings, 0 replies; 112+ messages in thread
From: Viresh Kumar @ 2013-10-03 14:58 UTC (permalink / raw)
To: rjw; +Cc: cpufreq, linux-pm, Viresh Kumar, Stephen Warren
Most of the CPUFreq drivers do similar things in .exit() and .verify() routines
and .attr. So its better if we have generic routines for them which can be used
by cpufreq drivers then.
This patch uses these generic routines for this driver.
Cc: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
---
drivers/cpufreq/tegra-cpufreq.c | 14 ++------------
1 file changed, 2 insertions(+), 12 deletions(-)
diff --git a/drivers/cpufreq/tegra-cpufreq.c b/drivers/cpufreq/tegra-cpufreq.c
index e014077..c36a8e7 100644
--- a/drivers/cpufreq/tegra-cpufreq.c
+++ b/drivers/cpufreq/tegra-cpufreq.c
@@ -51,11 +51,6 @@ static unsigned long target_cpu_speed[NUM_CPUS];
static DEFINE_MUTEX(tegra_cpu_lock);
static bool is_suspended;
-static int tegra_verify_speed(struct cpufreq_policy *policy)
-{
- return cpufreq_frequency_table_verify(policy, freq_table);
-}
-
static unsigned int tegra_getspeed(unsigned int cpu)
{
unsigned long rate;
@@ -237,19 +232,14 @@ static int tegra_cpu_exit(struct cpufreq_policy *policy)
return 0;
}
-static struct freq_attr *tegra_cpufreq_attr[] = {
- &cpufreq_freq_attr_scaling_available_freqs,
- NULL,
-};
-
static struct cpufreq_driver tegra_cpufreq_driver = {
- .verify = tegra_verify_speed,
+ .verify = cpufreq_generic_frequency_table_verify,
.target = tegra_target,
.get = tegra_getspeed,
.init = tegra_cpu_init,
.exit = tegra_cpu_exit,
.name = "tegra",
- .attr = tegra_cpufreq_attr,
+ .attr = cpufreq_generic_attr,
};
static int __init tegra_cpufreq_init(void)
--
1.7.12.rc2.18.g61b472e
^ permalink raw reply related [flat|nested] 112+ messages in thread
* [PATCH V2 Resend 36/92] cpufreq: call cpufreq_driver->get() after calling ->init()
2013-10-03 14:57 [PATCH V2 Resend 00/92] CPUFreq Cleanup Series: Part II Viresh Kumar
` (34 preceding siblings ...)
2013-10-03 14:58 ` [PATCH V2 Resend 35/92] cpufreq: tegra: " Viresh Kumar
@ 2013-10-03 14:58 ` Viresh Kumar
2013-10-03 14:58 ` [PATCH V2 Resend 37/92] cpufreq: acpi: don't initialize part of policy that is set by core too Viresh Kumar
` (54 subsequent siblings)
90 siblings, 0 replies; 112+ messages in thread
From: Viresh Kumar @ 2013-10-03 14:58 UTC (permalink / raw)
To: rjw; +Cc: cpufreq, linux-pm, Viresh Kumar
Almost all drivers set policy->cur with current cpu frequency in their ->init()
part. This can be done for all of them at core level and so they wouldn't need
to do it.
This patch adds supporting code in cpufreq core for calling get() after we have
called init() for a policy.
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
---
drivers/cpufreq/cpufreq.c | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/drivers/cpufreq/cpufreq.c b/drivers/cpufreq/cpufreq.c
index 04548f7..1a944f7 100644
--- a/drivers/cpufreq/cpufreq.c
+++ b/drivers/cpufreq/cpufreq.c
@@ -1053,6 +1053,14 @@ static int __cpufreq_add_dev(struct device *dev, struct subsys_interface *sif,
goto err_set_policy_cpu;
}
+ if (cpufreq_driver->get) {
+ policy->cur = cpufreq_driver->get(policy->cpu);
+ if (!policy->cur) {
+ pr_err("%s: ->get() failed\n", __func__);
+ goto err_get_freq;
+ }
+ }
+
/* related cpus should atleast have policy->cpus */
cpumask_or(policy->related_cpus, policy->related_cpus, policy->cpus);
@@ -1107,6 +1115,9 @@ err_out_unregister:
per_cpu(cpufreq_cpu_data, j) = NULL;
write_unlock_irqrestore(&cpufreq_driver_lock, flags);
+err_get_freq:
+ if (cpufreq_driver->exit)
+ cpufreq_driver->exit(policy);
err_set_policy_cpu:
cpufreq_policy_free(policy);
nomem_out:
--
1.7.12.rc2.18.g61b472e
^ permalink raw reply related [flat|nested] 112+ messages in thread
* [PATCH V2 Resend 37/92] cpufreq: acpi: don't initialize part of policy that is set by core too
2013-10-03 14:57 [PATCH V2 Resend 00/92] CPUFreq Cleanup Series: Part II Viresh Kumar
` (35 preceding siblings ...)
2013-10-03 14:58 ` [PATCH V2 Resend 36/92] cpufreq: call cpufreq_driver->get() after calling ->init() Viresh Kumar
@ 2013-10-03 14:58 ` Viresh Kumar
2013-10-11 12:51 ` Rafael J. Wysocki
2013-10-03 14:58 ` [PATCH V2 Resend 38/92] cpufreq: arm_big_little: " Viresh Kumar
` (53 subsequent siblings)
90 siblings, 1 reply; 112+ messages in thread
From: Viresh Kumar @ 2013-10-03 14:58 UTC (permalink / raw)
To: rjw; +Cc: cpufreq, linux-pm, Viresh Kumar
Many common initializations of struct policy are moved to core now and hence
this driver doesn't need to do it. This patch removes such code.
Most recent of those changes is to call ->get() in the core after calling
->init().
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
---
drivers/cpufreq/acpi-cpufreq.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/drivers/cpufreq/acpi-cpufreq.c b/drivers/cpufreq/acpi-cpufreq.c
index 94a5a1d..a8dac7b 100644
--- a/drivers/cpufreq/acpi-cpufreq.c
+++ b/drivers/cpufreq/acpi-cpufreq.c
@@ -842,7 +842,6 @@ static int acpi_cpufreq_cpu_init(struct cpufreq_policy *policy)
break;
case ACPI_ADR_SPACE_FIXED_HARDWARE:
acpi_cpufreq_driver.get = get_cur_freq_on_cpu;
- policy->cur = get_cur_freq_on_cpu(cpu);
break;
default:
break;
--
1.7.12.rc2.18.g61b472e
^ permalink raw reply related [flat|nested] 112+ messages in thread
* [PATCH V2 Resend 38/92] cpufreq: arm_big_little: don't initialize part of policy that is set by core too
2013-10-03 14:57 [PATCH V2 Resend 00/92] CPUFreq Cleanup Series: Part II Viresh Kumar
` (36 preceding siblings ...)
2013-10-03 14:58 ` [PATCH V2 Resend 37/92] cpufreq: acpi: don't initialize part of policy that is set by core too Viresh Kumar
@ 2013-10-03 14:58 ` Viresh Kumar
2013-10-03 14:58 ` [PATCH V2 Resend 39/92] cpufreq: at32ap: " Viresh Kumar
` (52 subsequent siblings)
90 siblings, 0 replies; 112+ messages in thread
From: Viresh Kumar @ 2013-10-03 14:58 UTC (permalink / raw)
To: rjw; +Cc: cpufreq, linux-pm, Viresh Kumar
Many common initializations of struct policy are moved to core now and hence
this driver doesn't need to do it. This patch removes such code.
Most recent of those changes is to call ->get() in the core after calling
->init().
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
---
drivers/cpufreq/arm_big_little.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/drivers/cpufreq/arm_big_little.c b/drivers/cpufreq/arm_big_little.c
index 7e92586..8075eb6 100644
--- a/drivers/cpufreq/arm_big_little.c
+++ b/drivers/cpufreq/arm_big_little.c
@@ -171,8 +171,6 @@ static int bL_cpufreq_init(struct cpufreq_policy *policy)
else
policy->cpuinfo.transition_latency = CPUFREQ_ETERNAL;
- policy->cur = bL_cpufreq_get(policy->cpu);
-
cpumask_copy(policy->cpus, topology_core_cpumask(policy->cpu));
dev_info(cpu_dev, "%s: CPU %d initialized\n", __func__, policy->cpu);
--
1.7.12.rc2.18.g61b472e
^ permalink raw reply related [flat|nested] 112+ messages in thread
* [PATCH V2 Resend 39/92] cpufreq: at32ap: don't initialize part of policy that is set by core too
2013-10-03 14:57 [PATCH V2 Resend 00/92] CPUFreq Cleanup Series: Part II Viresh Kumar
` (37 preceding siblings ...)
2013-10-03 14:58 ` [PATCH V2 Resend 38/92] cpufreq: arm_big_little: " Viresh Kumar
@ 2013-10-03 14:58 ` Viresh Kumar
2013-10-03 14:58 ` [PATCH V2 Resend 40/92] cpufreq: blackfin: " Viresh Kumar
` (51 subsequent siblings)
90 siblings, 0 replies; 112+ messages in thread
From: Viresh Kumar @ 2013-10-03 14:58 UTC (permalink / raw)
To: rjw; +Cc: cpufreq, linux-pm, Viresh Kumar
Many common initializations of struct policy are moved to core now and hence
this driver doesn't need to do it. This patch removes such code.
Most recent of those changes is to call ->get() in the core after calling
->init().
Acked-by: Hans-Christian Egtvedt <egtvedt@samfundet.no>
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
---
drivers/cpufreq/at32ap-cpufreq.c | 12 ++++--------
1 file changed, 4 insertions(+), 8 deletions(-)
diff --git a/drivers/cpufreq/at32ap-cpufreq.c b/drivers/cpufreq/at32ap-cpufreq.c
index 788f7e7..7439ded 100644
--- a/drivers/cpufreq/at32ap-cpufreq.c
+++ b/drivers/cpufreq/at32ap-cpufreq.c
@@ -77,7 +77,7 @@ static int at32_set_target(struct cpufreq_policy *policy,
static int __init at32_cpufreq_driver_init(struct cpufreq_policy *policy)
{
- unsigned int frequency, rate;
+ unsigned int frequency, rate, min_freq;
int retval, steps, i;
if (policy->cpu != 0)
@@ -90,12 +90,9 @@ static int __init at32_cpufreq_driver_init(struct cpufreq_policy *policy)
goto out_err;
}
- policy->cpuinfo.min_freq = (clk_round_rate(cpuclk, 1) + 500) / 1000;
- policy->cpuinfo.max_freq = (clk_round_rate(cpuclk, ~0UL) + 500) / 1000;
+ min_freq = (clk_round_rate(cpuclk, 1) + 500) / 1000;
+ frequency = (clk_round_rate(cpuclk, ~0UL) + 500) / 1000;
policy->cpuinfo.transition_latency = 0;
- policy->cur = at32_get_speed(0);
- policy->min = policy->cpuinfo.min_freq;
- policy->max = policy->cpuinfo.max_freq;
/*
* AVR32 CPU frequency rate scales in power of two between maximum and
@@ -104,7 +101,7 @@ static int __init at32_cpufreq_driver_init(struct cpufreq_policy *policy)
* Further validate that the frequency is usable, and append it to the
* frequency table.
*/
- steps = fls(policy->cpuinfo.max_freq / policy->cpuinfo.min_freq) + 1;
+ steps = fls(frequency / min_freq) + 1;
freq_table = kzalloc(steps * sizeof(struct cpufreq_frequency_table),
GFP_KERNEL);
if (!freq_table) {
@@ -112,7 +109,6 @@ static int __init at32_cpufreq_driver_init(struct cpufreq_policy *policy)
goto out_err_put_clk;
}
- frequency = policy->cpuinfo.max_freq;
for (i = 0; i < (steps - 1); i++) {
rate = clk_round_rate(cpuclk, frequency * 1000) / 1000;
--
1.7.12.rc2.18.g61b472e
^ permalink raw reply related [flat|nested] 112+ messages in thread
* [PATCH V2 Resend 40/92] cpufreq: blackfin: don't initialize part of policy that is set by core too
2013-10-03 14:57 [PATCH V2 Resend 00/92] CPUFreq Cleanup Series: Part II Viresh Kumar
` (38 preceding siblings ...)
2013-10-03 14:58 ` [PATCH V2 Resend 39/92] cpufreq: at32ap: " Viresh Kumar
@ 2013-10-03 14:58 ` Viresh Kumar
2013-10-03 14:58 ` [PATCH V2 Resend 41/92] cpufreq: cpu0: " Viresh Kumar
` (50 subsequent siblings)
90 siblings, 0 replies; 112+ messages in thread
From: Viresh Kumar @ 2013-10-03 14:58 UTC (permalink / raw)
To: rjw; +Cc: cpufreq, linux-pm, Viresh Kumar, Steven Miao
Many common initializations of struct policy are moved to core now and hence
this driver doesn't need to do it. This patch removes such code.
Most recent of those changes is to call ->get() in the core after calling
->init().
Cc: Steven Miao <realmz6@gmail.com>
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
---
drivers/cpufreq/blackfin-cpufreq.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/drivers/cpufreq/blackfin-cpufreq.c b/drivers/cpufreq/blackfin-cpufreq.c
index 48888cf..0bc9e8c 100644
--- a/drivers/cpufreq/blackfin-cpufreq.c
+++ b/drivers/cpufreq/blackfin-cpufreq.c
@@ -204,7 +204,6 @@ static int __bfin_cpu_init(struct cpufreq_policy *policy)
policy->cpuinfo.transition_latency = 50000; /* 50us assumed */
- policy->cur = cclk;
return cpufreq_table_validate_and_show(policy, bfin_freq_table);
}
--
1.7.12.rc2.18.g61b472e
^ permalink raw reply related [flat|nested] 112+ messages in thread
* [PATCH V2 Resend 41/92] cpufreq: cpu0: don't initialize part of policy that is set by core too
2013-10-03 14:57 [PATCH V2 Resend 00/92] CPUFreq Cleanup Series: Part II Viresh Kumar
` (39 preceding siblings ...)
2013-10-03 14:58 ` [PATCH V2 Resend 40/92] cpufreq: blackfin: " Viresh Kumar
@ 2013-10-03 14:58 ` Viresh Kumar
2013-10-05 8:00 ` Shawn Guo
2013-10-03 14:58 ` [PATCH V2 Resend 42/92] cpufreq: nforce2: " Viresh Kumar
` (49 subsequent siblings)
90 siblings, 1 reply; 112+ messages in thread
From: Viresh Kumar @ 2013-10-03 14:58 UTC (permalink / raw)
To: rjw; +Cc: cpufreq, linux-pm, Viresh Kumar, Shawn Guo
Many common initializations of struct policy are moved to core now and hence
this driver doesn't need to do it. This patch removes such code.
Most recent of those changes is to call ->get() in the core after calling
->init().
Cc: Shawn Guo <shawn.guo@linaro.org>
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
---
drivers/cpufreq/cpufreq-cpu0.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/drivers/cpufreq/cpufreq-cpu0.c b/drivers/cpufreq/cpufreq-cpu0.c
index ecea8fc..69c880f 100644
--- a/drivers/cpufreq/cpufreq-cpu0.c
+++ b/drivers/cpufreq/cpufreq-cpu0.c
@@ -131,7 +131,6 @@ static int cpu0_cpufreq_init(struct cpufreq_policy *policy)
}
policy->cpuinfo.transition_latency = transition_latency;
- policy->cur = clk_get_rate(cpu_clk) / 1000;
/*
* The driver only supports the SMP configuartion where all processors
--
1.7.12.rc2.18.g61b472e
^ permalink raw reply related [flat|nested] 112+ messages in thread
* [PATCH V2 Resend 42/92] cpufreq: nforce2: don't initialize part of policy that is set by core too
2013-10-03 14:57 [PATCH V2 Resend 00/92] CPUFreq Cleanup Series: Part II Viresh Kumar
` (40 preceding siblings ...)
2013-10-03 14:58 ` [PATCH V2 Resend 41/92] cpufreq: cpu0: " Viresh Kumar
@ 2013-10-03 14:58 ` Viresh Kumar
2013-10-03 14:58 ` [PATCH V2 Resend 43/92] cpufreq: cris: " Viresh Kumar
` (48 subsequent siblings)
90 siblings, 0 replies; 112+ messages in thread
From: Viresh Kumar @ 2013-10-03 14:58 UTC (permalink / raw)
To: rjw; +Cc: cpufreq, linux-pm, Viresh Kumar
Many common initializations of struct policy are moved to core now and hence
this driver doesn't need to do it. This patch removes such code.
Most recent of those changes is to call ->get() in the core after calling
->init().
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
---
drivers/cpufreq/cpufreq-nforce2.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/drivers/cpufreq/cpufreq-nforce2.c b/drivers/cpufreq/cpufreq-nforce2.c
index b83d45f6..ef70de2 100644
--- a/drivers/cpufreq/cpufreq-nforce2.c
+++ b/drivers/cpufreq/cpufreq-nforce2.c
@@ -362,7 +362,6 @@ static int nforce2_cpu_init(struct cpufreq_policy *policy)
policy->min = policy->cpuinfo.min_freq = min_fsb * fid * 100;
policy->max = policy->cpuinfo.max_freq = max_fsb * fid * 100;
policy->cpuinfo.transition_latency = CPUFREQ_ETERNAL;
- policy->cur = nforce2_get(policy->cpu);
return 0;
}
--
1.7.12.rc2.18.g61b472e
^ permalink raw reply related [flat|nested] 112+ messages in thread
* [PATCH V2 Resend 43/92] cpufreq: cris: don't initialize part of policy that is set by core too
2013-10-03 14:57 [PATCH V2 Resend 00/92] CPUFreq Cleanup Series: Part II Viresh Kumar
` (41 preceding siblings ...)
2013-10-03 14:58 ` [PATCH V2 Resend 42/92] cpufreq: nforce2: " Viresh Kumar
@ 2013-10-03 14:58 ` Viresh Kumar
2013-10-03 15:27 ` Jesper Nilsson
2013-10-03 14:58 ` [PATCH V2 Resend 44/92] cpufreq: davinci: " Viresh Kumar
` (47 subsequent siblings)
90 siblings, 1 reply; 112+ messages in thread
From: Viresh Kumar @ 2013-10-03 14:58 UTC (permalink / raw)
To: rjw
Cc: cpufreq, linux-pm, Viresh Kumar, Jesper Nilsson, Mikael Starvik,
linux-cris-kernel
Many common initializations of struct policy are moved to core now and hence
this driver doesn't need to do it. This patch removes such code.
Most recent of those changes is to call ->get() in the core after calling
->init().
Cc: Jesper Nilsson <jesper.nilsson@axis.com>
Cc: Mikael Starvik <starvik@axis.com>
Cc: linux-cris-kernel@axis.com
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
---
drivers/cpufreq/cris-artpec3-cpufreq.c | 1 -
drivers/cpufreq/cris-etraxfs-cpufreq.c | 1 -
2 files changed, 2 deletions(-)
diff --git a/drivers/cpufreq/cris-artpec3-cpufreq.c b/drivers/cpufreq/cris-artpec3-cpufreq.c
index d26f4e4..4d88e4f 100644
--- a/drivers/cpufreq/cris-artpec3-cpufreq.c
+++ b/drivers/cpufreq/cris-artpec3-cpufreq.c
@@ -73,7 +73,6 @@ static int cris_freq_cpu_init(struct cpufreq_policy *policy)
{
/* cpuinfo and default policy values */
policy->cpuinfo.transition_latency = 1000000; /* 1ms */
- policy->cur = cris_freq_get_cpu_frequency(0);
return cpufreq_table_validate_and_show(policy, cris_freq_table);
}
diff --git a/drivers/cpufreq/cris-etraxfs-cpufreq.c b/drivers/cpufreq/cris-etraxfs-cpufreq.c
index d384e63..f7d2d49 100644
--- a/drivers/cpufreq/cris-etraxfs-cpufreq.c
+++ b/drivers/cpufreq/cris-etraxfs-cpufreq.c
@@ -72,7 +72,6 @@ static int cris_freq_cpu_init(struct cpufreq_policy *policy)
{
/* cpuinfo and default policy values */
policy->cpuinfo.transition_latency = 1000000; /* 1ms */
- policy->cur = cris_freq_get_cpu_frequency(0);
return cpufreq_table_validate_and_show(policy, cris_freq_table);
}
--
1.7.12.rc2.18.g61b472e
^ permalink raw reply related [flat|nested] 112+ messages in thread
* [PATCH V2 Resend 44/92] cpufreq: davinci: don't initialize part of policy that is set by core too
2013-10-03 14:57 [PATCH V2 Resend 00/92] CPUFreq Cleanup Series: Part II Viresh Kumar
` (42 preceding siblings ...)
2013-10-03 14:58 ` [PATCH V2 Resend 43/92] cpufreq: cris: " Viresh Kumar
@ 2013-10-03 14:58 ` Viresh Kumar
2013-10-03 14:58 ` [PATCH V2 Resend 45/92] cpufreq: dbx500: " Viresh Kumar
` (46 subsequent siblings)
90 siblings, 0 replies; 112+ messages in thread
From: Viresh Kumar @ 2013-10-03 14:58 UTC (permalink / raw)
To: rjw; +Cc: cpufreq, linux-pm, Viresh Kumar, Sekhar Nori
Many common initializations of struct policy are moved to core now and hence
this driver doesn't need to do it. This patch removes such code.
Most recent of those changes is to call ->get() in the core after calling
->init().
Cc: Sekhar Nori <nsekhar@ti.com>
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
---
drivers/cpufreq/davinci-cpufreq.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/drivers/cpufreq/davinci-cpufreq.c b/drivers/cpufreq/davinci-cpufreq.c
index 33e9460..7762efc 100644
--- a/drivers/cpufreq/davinci-cpufreq.c
+++ b/drivers/cpufreq/davinci-cpufreq.c
@@ -138,8 +138,6 @@ static int davinci_cpu_init(struct cpufreq_policy *policy)
return result;
}
- policy->cur = davinci_getspeed(0);
-
result = cpufreq_table_validate_and_show(policy, freq_table);
if (result) {
pr_err("%s: cpufreq_table_validate_and_show() failed",
--
1.7.12.rc2.18.g61b472e
^ permalink raw reply related [flat|nested] 112+ messages in thread
* [PATCH V2 Resend 45/92] cpufreq: dbx500: don't initialize part of policy that is set by core too
2013-10-03 14:57 [PATCH V2 Resend 00/92] CPUFreq Cleanup Series: Part II Viresh Kumar
` (43 preceding siblings ...)
2013-10-03 14:58 ` [PATCH V2 Resend 44/92] cpufreq: davinci: " Viresh Kumar
@ 2013-10-03 14:58 ` Viresh Kumar
2013-10-03 14:58 ` [PATCH V2 Resend 46/92] cpufreq: e_powersaver: " Viresh Kumar
` (45 subsequent siblings)
90 siblings, 0 replies; 112+ messages in thread
From: Viresh Kumar @ 2013-10-03 14:58 UTC (permalink / raw)
To: rjw; +Cc: cpufreq, linux-pm, Viresh Kumar, Linus Walleij
Many common initializations of struct policy are moved to core now and hence
this driver doesn't need to do it. This patch removes such code.
Most recent of those changes is to call ->get() in the core after calling
->init().
Cc: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
---
drivers/cpufreq/dbx500-cpufreq.c | 5 -----
1 file changed, 5 deletions(-)
diff --git a/drivers/cpufreq/dbx500-cpufreq.c b/drivers/cpufreq/dbx500-cpufreq.c
index 2d70637..ae1aa60 100644
--- a/drivers/cpufreq/dbx500-cpufreq.c
+++ b/drivers/cpufreq/dbx500-cpufreq.c
@@ -83,11 +83,6 @@ static int dbx500_cpufreq_init(struct cpufreq_policy *policy)
return res;
}
- policy->min = policy->cpuinfo.min_freq;
- policy->max = policy->cpuinfo.max_freq;
- policy->cur = dbx500_cpufreq_getspeed(policy->cpu);
- policy->governor = CPUFREQ_DEFAULT_GOVERNOR;
-
/*
* FIXME : Need to take time measurement across the target()
* function with no/some/all drivers in the notification
--
1.7.12.rc2.18.g61b472e
^ permalink raw reply related [flat|nested] 112+ messages in thread
* [PATCH V2 Resend 46/92] cpufreq: e_powersaver: don't initialize part of policy that is set by core too
2013-10-03 14:57 [PATCH V2 Resend 00/92] CPUFreq Cleanup Series: Part II Viresh Kumar
` (44 preceding siblings ...)
2013-10-03 14:58 ` [PATCH V2 Resend 45/92] cpufreq: dbx500: " Viresh Kumar
@ 2013-10-03 14:58 ` Viresh Kumar
2013-10-03 14:58 ` [PATCH V2 Resend 47/92] cpufreq: elanfreq: " Viresh Kumar
` (44 subsequent siblings)
90 siblings, 0 replies; 112+ messages in thread
From: Viresh Kumar @ 2013-10-03 14:58 UTC (permalink / raw)
To: rjw; +Cc: cpufreq, linux-pm, Viresh Kumar
Many common initializations of struct policy are moved to core now and hence
this driver doesn't need to do it. This patch removes such code.
Most recent of those changes is to call ->get() in the core after calling
->init().
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
---
drivers/cpufreq/e_powersaver.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/drivers/cpufreq/e_powersaver.c b/drivers/cpufreq/e_powersaver.c
index a8cbbd0..2c11ce3 100644
--- a/drivers/cpufreq/e_powersaver.c
+++ b/drivers/cpufreq/e_powersaver.c
@@ -395,7 +395,6 @@ static int eps_cpu_init(struct cpufreq_policy *policy)
}
policy->cpuinfo.transition_latency = 140000; /* 844mV -> 700mV in ns */
- policy->cur = fsb * current_multiplier;
ret = cpufreq_table_validate_and_show(policy, ¢aur->freq_table[0]);
if (ret) {
--
1.7.12.rc2.18.g61b472e
^ permalink raw reply related [flat|nested] 112+ messages in thread
* [PATCH V2 Resend 47/92] cpufreq: elanfreq: don't initialize part of policy that is set by core too
2013-10-03 14:57 [PATCH V2 Resend 00/92] CPUFreq Cleanup Series: Part II Viresh Kumar
` (45 preceding siblings ...)
2013-10-03 14:58 ` [PATCH V2 Resend 46/92] cpufreq: e_powersaver: " Viresh Kumar
@ 2013-10-03 14:58 ` Viresh Kumar
2013-10-03 14:58 ` [PATCH V2 Resend 48/92] cpufreq: exynos: " Viresh Kumar
` (43 subsequent siblings)
90 siblings, 0 replies; 112+ messages in thread
From: Viresh Kumar @ 2013-10-03 14:58 UTC (permalink / raw)
To: rjw; +Cc: cpufreq, linux-pm, Viresh Kumar
Many common initializations of struct policy are moved to core now and hence
this driver doesn't need to do it. This patch removes such code.
Most recent of those changes is to call ->get() in the core after calling
->init().
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
---
drivers/cpufreq/elanfreq.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/drivers/cpufreq/elanfreq.c b/drivers/cpufreq/elanfreq.c
index fe7053c..d91a645 100644
--- a/drivers/cpufreq/elanfreq.c
+++ b/drivers/cpufreq/elanfreq.c
@@ -207,7 +207,6 @@ static int elanfreq_cpu_init(struct cpufreq_policy *policy)
/* cpuinfo and default policy values */
policy->cpuinfo.transition_latency = CPUFREQ_ETERNAL;
- policy->cur = elanfreq_get_cpu_frequency(0);
return cpufreq_table_validate_and_show(policy, elanfreq_table);
}
--
1.7.12.rc2.18.g61b472e
^ permalink raw reply related [flat|nested] 112+ messages in thread
* [PATCH V2 Resend 48/92] cpufreq: exynos: don't initialize part of policy that is set by core too
2013-10-03 14:57 [PATCH V2 Resend 00/92] CPUFreq Cleanup Series: Part II Viresh Kumar
` (46 preceding siblings ...)
2013-10-03 14:58 ` [PATCH V2 Resend 47/92] cpufreq: elanfreq: " Viresh Kumar
@ 2013-10-03 14:58 ` Viresh Kumar
2013-10-03 14:58 ` [PATCH V2 Resend 49/92] cpufreq: gx: " Viresh Kumar
` (42 subsequent siblings)
90 siblings, 0 replies; 112+ messages in thread
From: Viresh Kumar @ 2013-10-03 14:58 UTC (permalink / raw)
To: rjw; +Cc: cpufreq, linux-pm, Viresh Kumar
Many common initializations of struct policy are moved to core now and hence
this driver doesn't need to do it. This patch removes such code.
Most recent of those changes is to call ->get() in the core after calling
->init().
Acked-By: Amit Daniel Kachhap <amit.daniel@samsung.com>
Acked-by: Kukjin Kim <kgene.kim@samsung.com>
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
---
drivers/cpufreq/exynos-cpufreq.c | 2 --
drivers/cpufreq/exynos5440-cpufreq.c | 1 -
2 files changed, 3 deletions(-)
diff --git a/drivers/cpufreq/exynos-cpufreq.c b/drivers/cpufreq/exynos-cpufreq.c
index 08338d4..5244086 100644
--- a/drivers/cpufreq/exynos-cpufreq.c
+++ b/drivers/cpufreq/exynos-cpufreq.c
@@ -241,8 +241,6 @@ static struct notifier_block exynos_cpufreq_nb = {
static int exynos_cpufreq_cpu_init(struct cpufreq_policy *policy)
{
- policy->cur = policy->min = policy->max = exynos_getspeed(policy->cpu);
-
/* set the transition latency value */
policy->cpuinfo.transition_latency = 100000;
diff --git a/drivers/cpufreq/exynos5440-cpufreq.c b/drivers/cpufreq/exynos5440-cpufreq.c
index bce6f74..9b7fdec 100644
--- a/drivers/cpufreq/exynos5440-cpufreq.c
+++ b/drivers/cpufreq/exynos5440-cpufreq.c
@@ -326,7 +326,6 @@ static int exynos_cpufreq_cpu_init(struct cpufreq_policy *policy)
return ret;
}
- policy->cur = dvfs_info->cur_frequency;
policy->cpuinfo.transition_latency = dvfs_info->latency;
cpumask_setall(policy->cpus);
--
1.7.12.rc2.18.g61b472e
^ permalink raw reply related [flat|nested] 112+ messages in thread
* [PATCH V2 Resend 49/92] cpufreq: gx: don't initialize part of policy that is set by core too
2013-10-03 14:57 [PATCH V2 Resend 00/92] CPUFreq Cleanup Series: Part II Viresh Kumar
` (47 preceding siblings ...)
2013-10-03 14:58 ` [PATCH V2 Resend 48/92] cpufreq: exynos: " Viresh Kumar
@ 2013-10-03 14:58 ` Viresh Kumar
2013-10-03 14:58 ` [PATCH V2 Resend 50/92] cpufreq: ia64-acpi: " Viresh Kumar
` (41 subsequent siblings)
90 siblings, 0 replies; 112+ messages in thread
From: Viresh Kumar @ 2013-10-03 14:58 UTC (permalink / raw)
To: rjw; +Cc: cpufreq, linux-pm, Viresh Kumar
Many common initializations of struct policy are moved to core now and hence
this driver doesn't need to do it. This patch removes such code.
Most recent of those changes is to call ->get() in the core after calling
->init().
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
---
drivers/cpufreq/gx-suspmod.c | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/drivers/cpufreq/gx-suspmod.c b/drivers/cpufreq/gx-suspmod.c
index 70442c7..d83e826 100644
--- a/drivers/cpufreq/gx-suspmod.c
+++ b/drivers/cpufreq/gx-suspmod.c
@@ -401,7 +401,7 @@ static int cpufreq_gx_target(struct cpufreq_policy *policy,
static int cpufreq_gx_cpu_init(struct cpufreq_policy *policy)
{
- unsigned int maxfreq, curfreq;
+ unsigned int maxfreq;
if (!policy || policy->cpu != 0)
return -ENODEV;
@@ -415,10 +415,8 @@ static int cpufreq_gx_cpu_init(struct cpufreq_policy *policy)
maxfreq = 30000 * gx_freq_mult[getCx86(CX86_DIR1) & 0x0f];
stock_freq = maxfreq;
- curfreq = gx_get_cpuspeed(0);
pr_debug("cpu max frequency is %d.\n", maxfreq);
- pr_debug("cpu current frequency is %dkHz.\n", curfreq);
/* setup basic struct for cpufreq API */
policy->cpu = 0;
@@ -428,7 +426,6 @@ static int cpufreq_gx_cpu_init(struct cpufreq_policy *policy)
else
policy->min = maxfreq / POLICY_MIN_DIV;
policy->max = maxfreq;
- policy->cur = curfreq;
policy->cpuinfo.min_freq = maxfreq / max_duration;
policy->cpuinfo.max_freq = maxfreq;
policy->cpuinfo.transition_latency = CPUFREQ_ETERNAL;
--
1.7.12.rc2.18.g61b472e
^ permalink raw reply related [flat|nested] 112+ messages in thread
* [PATCH V2 Resend 50/92] cpufreq: ia64-acpi: don't initialize part of policy that is set by core too
2013-10-03 14:57 [PATCH V2 Resend 00/92] CPUFreq Cleanup Series: Part II Viresh Kumar
` (48 preceding siblings ...)
2013-10-03 14:58 ` [PATCH V2 Resend 49/92] cpufreq: gx: " Viresh Kumar
@ 2013-10-03 14:58 ` Viresh Kumar
2013-10-03 14:58 ` [PATCH V2 Resend 51/92] cpufreq: imx6q: " Viresh Kumar
` (40 subsequent siblings)
90 siblings, 0 replies; 112+ messages in thread
From: Viresh Kumar @ 2013-10-03 14:58 UTC (permalink / raw)
To: rjw; +Cc: cpufreq, linux-pm, Viresh Kumar, Tony Luck
Many common initializations of struct policy are moved to core now and hence
this driver doesn't need to do it. This patch removes such code.
Most recent of those changes is to call ->get() in the core after calling
->init().
Cc: Tony Luck <tony.luck@intel.com>
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
---
drivers/cpufreq/ia64-acpi-cpufreq.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/drivers/cpufreq/ia64-acpi-cpufreq.c b/drivers/cpufreq/ia64-acpi-cpufreq.c
index b958bdb..90c6598 100644
--- a/drivers/cpufreq/ia64-acpi-cpufreq.c
+++ b/drivers/cpufreq/ia64-acpi-cpufreq.c
@@ -305,7 +305,6 @@ acpi_cpufreq_cpu_init (
data->acpi_data.states[i].transition_latency * 1000;
}
}
- policy->cur = processor_get_freq(data, policy->cpu);
/* table init */
for (i = 0; i <= data->acpi_data.state_count; i++)
--
1.7.12.rc2.18.g61b472e
^ permalink raw reply related [flat|nested] 112+ messages in thread
* [PATCH V2 Resend 51/92] cpufreq: imx6q: don't initialize part of policy that is set by core too
2013-10-03 14:57 [PATCH V2 Resend 00/92] CPUFreq Cleanup Series: Part II Viresh Kumar
` (49 preceding siblings ...)
2013-10-03 14:58 ` [PATCH V2 Resend 50/92] cpufreq: ia64-acpi: " Viresh Kumar
@ 2013-10-03 14:58 ` Viresh Kumar
2013-10-03 14:58 ` [PATCH V2 Resend 52/92] cpufreq: integrator: " Viresh Kumar
` (39 subsequent siblings)
90 siblings, 0 replies; 112+ messages in thread
From: Viresh Kumar @ 2013-10-03 14:58 UTC (permalink / raw)
To: rjw; +Cc: cpufreq, linux-pm, Viresh Kumar, Shawn Guo
Many common initializations of struct policy are moved to core now and hence
this driver doesn't need to do it. This patch removes such code.
Most recent of those changes is to call ->get() in the core after calling
->init().
Cc: Shawn Guo <shawn.guo@linaro.org>
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
---
drivers/cpufreq/imx6q-cpufreq.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/drivers/cpufreq/imx6q-cpufreq.c b/drivers/cpufreq/imx6q-cpufreq.c
index d839657..9d22dfa 100644
--- a/drivers/cpufreq/imx6q-cpufreq.c
+++ b/drivers/cpufreq/imx6q-cpufreq.c
@@ -163,7 +163,6 @@ static int imx6q_cpufreq_init(struct cpufreq_policy *policy)
}
policy->cpuinfo.transition_latency = transition_latency;
- policy->cur = clk_get_rate(arm_clk) / 1000;
cpumask_setall(policy->cpus);
return 0;
--
1.7.12.rc2.18.g61b472e
^ permalink raw reply related [flat|nested] 112+ messages in thread
* [PATCH V2 Resend 52/92] cpufreq: integrator: don't initialize part of policy that is set by core too
2013-10-03 14:57 [PATCH V2 Resend 00/92] CPUFreq Cleanup Series: Part II Viresh Kumar
` (50 preceding siblings ...)
2013-10-03 14:58 ` [PATCH V2 Resend 51/92] cpufreq: imx6q: " Viresh Kumar
@ 2013-10-03 14:58 ` Viresh Kumar
2013-10-03 14:58 ` [PATCH V2 Resend 53/92] cpufreq: kirkwood: " Viresh Kumar
` (38 subsequent siblings)
90 siblings, 0 replies; 112+ messages in thread
From: Viresh Kumar @ 2013-10-03 14:58 UTC (permalink / raw)
To: rjw; +Cc: cpufreq, linux-pm, Viresh Kumar, Russell King
Many common initializations of struct policy are moved to core now and hence
this driver doesn't need to do it. This patch removes such code.
Most recent of those changes is to call ->get() in the core after calling
->init(). And so we don't need to set policy->cur from driver anymore.
Over that it sets policy->min and max correctly. They were earlier set to
current frequency of CPU but they should be set to max and min freq of cpu.
Cc: Russell King <linux@arm.linux.org.uk>
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
---
drivers/cpufreq/integrator-cpufreq.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/drivers/cpufreq/integrator-cpufreq.c b/drivers/cpufreq/integrator-cpufreq.c
index f7c99df..6391dd3 100644
--- a/drivers/cpufreq/integrator-cpufreq.c
+++ b/drivers/cpufreq/integrator-cpufreq.c
@@ -186,10 +186,9 @@ static int integrator_cpufreq_init(struct cpufreq_policy *policy)
{
/* set default policy and cpuinfo */
- policy->cpuinfo.max_freq = 160000;
- policy->cpuinfo.min_freq = 12000;
+ policy->max = policy->cpuinfo.max_freq = 160000;
+ policy->min = policy->cpuinfo.min_freq = 12000;
policy->cpuinfo.transition_latency = 1000000; /* 1 ms, assumed */
- policy->cur = policy->min = policy->max = integrator_get(policy->cpu);
return 0;
}
--
1.7.12.rc2.18.g61b472e
^ permalink raw reply related [flat|nested] 112+ messages in thread
* [PATCH V2 Resend 53/92] cpufreq: kirkwood: don't initialize part of policy that is set by core too
2013-10-03 14:57 [PATCH V2 Resend 00/92] CPUFreq Cleanup Series: Part II Viresh Kumar
` (51 preceding siblings ...)
2013-10-03 14:58 ` [PATCH V2 Resend 52/92] cpufreq: integrator: " Viresh Kumar
@ 2013-10-03 14:58 ` Viresh Kumar
2013-10-03 14:58 ` [PATCH V2 Resend 54/92] cpufreq: longhaul: " Viresh Kumar
` (37 subsequent siblings)
90 siblings, 0 replies; 112+ messages in thread
From: Viresh Kumar @ 2013-10-03 14:58 UTC (permalink / raw)
To: rjw; +Cc: cpufreq, linux-pm, Viresh Kumar
Many common initializations of struct policy are moved to core now and hence
this driver doesn't need to do it. This patch removes such code.
Most recent of those changes is to call ->get() in the core after calling
->init().
Tested-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
---
drivers/cpufreq/kirkwood-cpufreq.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/drivers/cpufreq/kirkwood-cpufreq.c b/drivers/cpufreq/kirkwood-cpufreq.c
index 1a4e4f4..dc434c4 100644
--- a/drivers/cpufreq/kirkwood-cpufreq.c
+++ b/drivers/cpufreq/kirkwood-cpufreq.c
@@ -122,7 +122,6 @@ static int kirkwood_cpufreq_cpu_init(struct cpufreq_policy *policy)
{
/* cpuinfo and default policy values */
policy->cpuinfo.transition_latency = 5000; /* 5uS */
- policy->cur = kirkwood_cpufreq_get_cpu_frequency(0);
return cpufreq_table_validate_and_show(policy, kirkwood_freq_table);
}
--
1.7.12.rc2.18.g61b472e
^ permalink raw reply related [flat|nested] 112+ messages in thread
* [PATCH V2 Resend 54/92] cpufreq: longhaul: don't initialize part of policy that is set by core too
2013-10-03 14:57 [PATCH V2 Resend 00/92] CPUFreq Cleanup Series: Part II Viresh Kumar
` (52 preceding siblings ...)
2013-10-03 14:58 ` [PATCH V2 Resend 53/92] cpufreq: kirkwood: " Viresh Kumar
@ 2013-10-03 14:58 ` Viresh Kumar
2013-10-03 14:58 ` [PATCH V2 Resend 55/92] cpufreq: loongson2: " Viresh Kumar
` (36 subsequent siblings)
90 siblings, 0 replies; 112+ messages in thread
From: Viresh Kumar @ 2013-10-03 14:58 UTC (permalink / raw)
To: rjw; +Cc: cpufreq, linux-pm, Viresh Kumar
Many common initializations of struct policy are moved to core now and hence
this driver doesn't need to do it. This patch removes such code.
Most recent of those changes is to call ->get() in the core after calling
->init().
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
---
drivers/cpufreq/longhaul.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/drivers/cpufreq/longhaul.c b/drivers/cpufreq/longhaul.c
index 57d7b02..14df497 100644
--- a/drivers/cpufreq/longhaul.c
+++ b/drivers/cpufreq/longhaul.c
@@ -913,7 +913,6 @@ static int longhaul_cpu_init(struct cpufreq_policy *policy)
longhaul_setup_voltagescaling();
policy->cpuinfo.transition_latency = 200000; /* nsec */
- policy->cur = calc_speed(longhaul_get_cpu_mult());
return cpufreq_table_validate_and_show(policy, longhaul_table);
}
--
1.7.12.rc2.18.g61b472e
^ permalink raw reply related [flat|nested] 112+ messages in thread
* [PATCH V2 Resend 55/92] cpufreq: loongson2: don't initialize part of policy that is set by core too
2013-10-03 14:57 [PATCH V2 Resend 00/92] CPUFreq Cleanup Series: Part II Viresh Kumar
` (53 preceding siblings ...)
2013-10-03 14:58 ` [PATCH V2 Resend 54/92] cpufreq: longhaul: " Viresh Kumar
@ 2013-10-03 14:58 ` Viresh Kumar
2013-10-03 14:58 ` [PATCH V2 Resend 56/92] cpufreq: maple: " Viresh Kumar
` (35 subsequent siblings)
90 siblings, 0 replies; 112+ messages in thread
From: Viresh Kumar @ 2013-10-03 14:58 UTC (permalink / raw)
To: rjw; +Cc: cpufreq, linux-pm, Viresh Kumar, John Crispin
Many common initializations of struct policy are moved to core now and hence
this driver doesn't need to do it. This patch removes such code.
Most recent of those changes is to call ->get() in the core after calling
->init().
Cc: John Crispin <blogic@openwrt.org>
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
---
drivers/cpufreq/loongson2_cpufreq.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/drivers/cpufreq/loongson2_cpufreq.c b/drivers/cpufreq/loongson2_cpufreq.c
index ed7fbe2..dd4f3e4 100644
--- a/drivers/cpufreq/loongson2_cpufreq.c
+++ b/drivers/cpufreq/loongson2_cpufreq.c
@@ -131,8 +131,6 @@ static int loongson2_cpufreq_cpu_init(struct cpufreq_policy *policy)
return ret;
}
- policy->cur = loongson2_cpufreq_get(policy->cpu);
-
return cpufreq_table_validate_and_show(policy,
&loongson2_clockmod_table[0]);
}
--
1.7.12.rc2.18.g61b472e
^ permalink raw reply related [flat|nested] 112+ messages in thread
* [PATCH V2 Resend 56/92] cpufreq: maple: don't initialize part of policy that is set by core too
2013-10-03 14:57 [PATCH V2 Resend 00/92] CPUFreq Cleanup Series: Part II Viresh Kumar
` (54 preceding siblings ...)
2013-10-03 14:58 ` [PATCH V2 Resend 55/92] cpufreq: loongson2: " Viresh Kumar
@ 2013-10-03 14:58 ` Viresh Kumar
2013-10-03 14:58 ` [PATCH V2 Resend 57/92] cpufreq: omap: " Viresh Kumar
` (34 subsequent siblings)
90 siblings, 0 replies; 112+ messages in thread
From: Viresh Kumar @ 2013-10-03 14:58 UTC (permalink / raw)
To: rjw; +Cc: cpufreq, linux-pm, Viresh Kumar, Dmitry Eremin-Solenikov
Many common initializations of struct policy are moved to core now and hence
this driver doesn't need to do it. This patch removes such code.
Most recent of those changes is to call ->get() in the core after calling
->init().
Cc: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
---
drivers/cpufreq/maple-cpufreq.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/drivers/cpufreq/maple-cpufreq.c b/drivers/cpufreq/maple-cpufreq.c
index b23d1d8..1c0cec1 100644
--- a/drivers/cpufreq/maple-cpufreq.c
+++ b/drivers/cpufreq/maple-cpufreq.c
@@ -166,7 +166,6 @@ static unsigned int maple_cpufreq_get_speed(unsigned int cpu)
static int maple_cpufreq_cpu_init(struct cpufreq_policy *policy)
{
policy->cpuinfo.transition_latency = 12000;
- policy->cur = maple_cpu_freqs[maple_scom_query_freq()].frequency;
/* secondary CPUs are tied to the primary one by the
* cpufreq core if in the secondary policy we tell it that
* it actually must be one policy together with all others. */
--
1.7.12.rc2.18.g61b472e
^ permalink raw reply related [flat|nested] 112+ messages in thread
* [PATCH V2 Resend 57/92] cpufreq: omap: don't initialize part of policy that is set by core too
2013-10-03 14:57 [PATCH V2 Resend 00/92] CPUFreq Cleanup Series: Part II Viresh Kumar
` (55 preceding siblings ...)
2013-10-03 14:58 ` [PATCH V2 Resend 56/92] cpufreq: maple: " Viresh Kumar
@ 2013-10-03 14:58 ` Viresh Kumar
2013-10-03 14:58 ` [PATCH V2 Resend 58/92] cpufreq: p4: " Viresh Kumar
` (33 subsequent siblings)
90 siblings, 0 replies; 112+ messages in thread
From: Viresh Kumar @ 2013-10-03 14:58 UTC (permalink / raw)
To: rjw; +Cc: cpufreq, linux-pm, Viresh Kumar, Santosh Shilimkar
Many common initializations of struct policy are moved to core now and hence
this driver doesn't need to do it. This patch removes such code.
Most recent of those changes is to call ->get() in the core after calling
->init().
Cc: Santosh Shilimkar <santosh.shilimkar@ti.com>
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
---
drivers/cpufreq/omap-cpufreq.c | 4 ----
1 file changed, 4 deletions(-)
diff --git a/drivers/cpufreq/omap-cpufreq.c b/drivers/cpufreq/omap-cpufreq.c
index 48020b5..a8c3f90 100644
--- a/drivers/cpufreq/omap-cpufreq.c
+++ b/drivers/cpufreq/omap-cpufreq.c
@@ -171,8 +171,6 @@ static int omap_cpu_init(struct cpufreq_policy *policy)
goto fail_ck;
}
- policy->cur = omap_getspeed(policy->cpu);
-
if (!freq_table)
result = opp_init_cpufreq_table(mpu_dev, &freq_table);
@@ -188,8 +186,6 @@ static int omap_cpu_init(struct cpufreq_policy *policy)
if (result)
goto fail_table;
- policy->cur = omap_getspeed(policy->cpu);
-
/*
* On OMAP SMP configuartion, both processors share the voltage
* and clock. So both CPUs needs to be scaled together and hence
--
1.7.12.rc2.18.g61b472e
^ permalink raw reply related [flat|nested] 112+ messages in thread
* [PATCH V2 Resend 58/92] cpufreq: p4: don't initialize part of policy that is set by core too
2013-10-03 14:57 [PATCH V2 Resend 00/92] CPUFreq Cleanup Series: Part II Viresh Kumar
` (56 preceding siblings ...)
2013-10-03 14:58 ` [PATCH V2 Resend 57/92] cpufreq: omap: " Viresh Kumar
@ 2013-10-03 14:58 ` Viresh Kumar
2013-10-03 14:58 ` [PATCH V2 Resend 59/92] cpufreq: pcc: " Viresh Kumar
` (32 subsequent siblings)
90 siblings, 0 replies; 112+ messages in thread
From: Viresh Kumar @ 2013-10-03 14:58 UTC (permalink / raw)
To: rjw; +Cc: cpufreq, linux-pm, Viresh Kumar, David S. Miller
Many common initializations of struct policy are moved to core now and hence
this driver doesn't need to do it. This patch removes such code.
Most recent of those changes is to call ->get() in the core after calling
->init().
Cc: David S. Miller <davem@davemloft.net>
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
---
drivers/cpufreq/p4-clockmod.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/drivers/cpufreq/p4-clockmod.c b/drivers/cpufreq/p4-clockmod.c
index 4fe6d4c..6164c1c 100644
--- a/drivers/cpufreq/p4-clockmod.c
+++ b/drivers/cpufreq/p4-clockmod.c
@@ -230,7 +230,6 @@ static int cpufreq_p4_cpu_init(struct cpufreq_policy *policy)
/* the transition latency is set to be 1 higher than the maximum
* transition latency of the ondemand governor */
policy->cpuinfo.transition_latency = 10000001;
- policy->cur = stock_freq;
return cpufreq_table_validate_and_show(policy, &p4clockmod_table[0]);
}
--
1.7.12.rc2.18.g61b472e
^ permalink raw reply related [flat|nested] 112+ messages in thread
* [PATCH V2 Resend 59/92] cpufreq: pcc: don't initialize part of policy that is set by core too
2013-10-03 14:57 [PATCH V2 Resend 00/92] CPUFreq Cleanup Series: Part II Viresh Kumar
` (57 preceding siblings ...)
2013-10-03 14:58 ` [PATCH V2 Resend 58/92] cpufreq: p4: " Viresh Kumar
@ 2013-10-03 14:58 ` Viresh Kumar
2013-10-03 14:58 ` [PATCH V2 Resend 60/92] cpufreq: pmac: " Viresh Kumar
` (31 subsequent siblings)
90 siblings, 0 replies; 112+ messages in thread
From: Viresh Kumar @ 2013-10-03 14:58 UTC (permalink / raw)
To: rjw; +Cc: cpufreq, linux-pm, Viresh Kumar
Many common initializations of struct policy are moved to core now and hence
this driver doesn't need to do it. This patch removes such code.
Most recent of those changes is to call ->get() in the core after calling
->init().
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
---
drivers/cpufreq/pcc-cpufreq.c | 7 -------
1 file changed, 7 deletions(-)
diff --git a/drivers/cpufreq/pcc-cpufreq.c b/drivers/cpufreq/pcc-cpufreq.c
index 70438de..c265fd1 100644
--- a/drivers/cpufreq/pcc-cpufreq.c
+++ b/drivers/cpufreq/pcc-cpufreq.c
@@ -559,13 +559,6 @@ static int pcc_cpufreq_cpu_init(struct cpufreq_policy *policy)
ioread32(&pcch_hdr->nominal) * 1000;
policy->min = policy->cpuinfo.min_freq =
ioread32(&pcch_hdr->minimum_frequency) * 1000;
- policy->cur = pcc_get_freq(cpu);
-
- if (!policy->cur) {
- pr_debug("init: Unable to get current CPU frequency\n");
- result = -EINVAL;
- goto out;
- }
pr_debug("init: policy->max is %d, policy->min is %d\n",
policy->max, policy->min);
--
1.7.12.rc2.18.g61b472e
^ permalink raw reply related [flat|nested] 112+ messages in thread
* [PATCH V2 Resend 60/92] cpufreq: pmac: don't initialize part of policy that is set by core too
2013-10-03 14:57 [PATCH V2 Resend 00/92] CPUFreq Cleanup Series: Part II Viresh Kumar
` (58 preceding siblings ...)
2013-10-03 14:58 ` [PATCH V2 Resend 59/92] cpufreq: pcc: " Viresh Kumar
@ 2013-10-03 14:58 ` Viresh Kumar
2013-10-03 14:58 ` [PATCH V2 Resend 61/92] cpufreq: powernow: " Viresh Kumar
` (30 subsequent siblings)
90 siblings, 0 replies; 112+ messages in thread
From: Viresh Kumar @ 2013-10-03 14:58 UTC (permalink / raw)
To: rjw; +Cc: cpufreq, linux-pm, Viresh Kumar
Many common initializations of struct policy are moved to core now and hence
this driver doesn't need to do it. This patch removes such code.
Most recent of those changes is to call ->get() in the core after calling
->init().
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
---
drivers/cpufreq/pmac32-cpufreq.c | 1 -
drivers/cpufreq/pmac64-cpufreq.c | 1 -
2 files changed, 2 deletions(-)
diff --git a/drivers/cpufreq/pmac32-cpufreq.c b/drivers/cpufreq/pmac32-cpufreq.c
index 8715ab9..672b7f4 100644
--- a/drivers/cpufreq/pmac32-cpufreq.c
+++ b/drivers/cpufreq/pmac32-cpufreq.c
@@ -396,7 +396,6 @@ static int pmac_cpufreq_cpu_init(struct cpufreq_policy *policy)
return -ENODEV;
policy->cpuinfo.transition_latency = transition_latency;
- policy->cur = cur_freq;
return cpufreq_table_validate_and_show(policy, pmac_cpu_freqs);
}
diff --git a/drivers/cpufreq/pmac64-cpufreq.c b/drivers/cpufreq/pmac64-cpufreq.c
index e853b85..79e40c9 100644
--- a/drivers/cpufreq/pmac64-cpufreq.c
+++ b/drivers/cpufreq/pmac64-cpufreq.c
@@ -348,7 +348,6 @@ static unsigned int g5_cpufreq_get_speed(unsigned int cpu)
static int g5_cpufreq_cpu_init(struct cpufreq_policy *policy)
{
policy->cpuinfo.transition_latency = transition_latency;
- policy->cur = g5_cpu_freqs[g5_query_freq()].frequency;
/* secondary CPUs are tied to the primary one by the
* cpufreq core if in the secondary policy we tell it that
* it actually must be one policy together with all others. */
--
1.7.12.rc2.18.g61b472e
^ permalink raw reply related [flat|nested] 112+ messages in thread
* [PATCH V2 Resend 61/92] cpufreq: powernow: don't initialize part of policy that is set by core too
2013-10-03 14:57 [PATCH V2 Resend 00/92] CPUFreq Cleanup Series: Part II Viresh Kumar
` (59 preceding siblings ...)
2013-10-03 14:58 ` [PATCH V2 Resend 60/92] cpufreq: pmac: " Viresh Kumar
@ 2013-10-03 14:58 ` Viresh Kumar
2013-10-03 14:58 ` [PATCH V2 Resend 62/92] cpufreq: ppc: " Viresh Kumar
` (29 subsequent siblings)
90 siblings, 0 replies; 112+ messages in thread
From: Viresh Kumar @ 2013-10-03 14:58 UTC (permalink / raw)
To: rjw; +Cc: cpufreq, linux-pm, Viresh Kumar
Many common initializations of struct policy are moved to core now and hence
this driver doesn't need to do it. This patch removes such code.
Most recent of those changes is to call ->get() in the core after calling
->init().
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
---
drivers/cpufreq/powernow-k6.c | 1 -
drivers/cpufreq/powernow-k7.c | 2 --
drivers/cpufreq/powernow-k8.c | 3 ---
3 files changed, 6 deletions(-)
diff --git a/drivers/cpufreq/powernow-k6.c b/drivers/cpufreq/powernow-k6.c
index ff05d28..eda1702 100644
--- a/drivers/cpufreq/powernow-k6.c
+++ b/drivers/cpufreq/powernow-k6.c
@@ -151,7 +151,6 @@ static int powernow_k6_cpu_init(struct cpufreq_policy *policy)
/* cpuinfo and default policy values */
policy->cpuinfo.transition_latency = 200000;
- policy->cur = busfreq * max_multiplier;
return cpufreq_table_validate_and_show(policy, clock_ratio);
}
diff --git a/drivers/cpufreq/powernow-k7.c b/drivers/cpufreq/powernow-k7.c
index 14cd98f..44d345b 100644
--- a/drivers/cpufreq/powernow-k7.c
+++ b/drivers/cpufreq/powernow-k7.c
@@ -673,8 +673,6 @@ static int powernow_cpu_init(struct cpufreq_policy *policy)
policy->cpuinfo.transition_latency =
cpufreq_scale(2000000UL, fsb, latency);
- policy->cur = powernow_get(0);
-
return cpufreq_table_validate_and_show(policy, powernow_table);
}
diff --git a/drivers/cpufreq/powernow-k8.c b/drivers/cpufreq/powernow-k8.c
index 1e6f68a..298beb7 100644
--- a/drivers/cpufreq/powernow-k8.c
+++ b/drivers/cpufreq/powernow-k8.c
@@ -1141,9 +1141,6 @@ static int powernowk8_cpu_init(struct cpufreq_policy *pol)
cpumask_copy(pol->cpus, cpu_core_mask(pol->cpu));
data->available_cores = pol->cpus;
- pol->cur = find_khz_freq_from_fid(data->currfid);
- pr_debug("policy current frequency %d kHz\n", pol->cur);
-
/* min/max the cpu is capable of */
if (cpufreq_table_validate_and_show(pol, data->powernow_table)) {
printk(KERN_ERR FW_BUG PFX "invalid powernow_table\n");
--
1.7.12.rc2.18.g61b472e
^ permalink raw reply related [flat|nested] 112+ messages in thread
* [PATCH V2 Resend 62/92] cpufreq: ppc: don't initialize part of policy that is set by core too
2013-10-03 14:57 [PATCH V2 Resend 00/92] CPUFreq Cleanup Series: Part II Viresh Kumar
` (60 preceding siblings ...)
2013-10-03 14:58 ` [PATCH V2 Resend 61/92] cpufreq: powernow: " Viresh Kumar
@ 2013-10-03 14:58 ` Viresh Kumar
2013-10-03 14:58 ` [PATCH V2 Resend 63/92] cpufreq: pxa: " Viresh Kumar
` (28 subsequent siblings)
90 siblings, 0 replies; 112+ messages in thread
From: Viresh Kumar @ 2013-10-03 14:58 UTC (permalink / raw)
To: rjw; +Cc: cpufreq, linux-pm, Viresh Kumar
Many common initializations of struct policy are moved to core now and hence
this driver doesn't need to do it. This patch removes such code.
Most recent of those changes is to call ->get() in the core after calling
->init().
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
---
drivers/cpufreq/ppc-corenet-cpufreq.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/drivers/cpufreq/ppc-corenet-cpufreq.c b/drivers/cpufreq/ppc-corenet-cpufreq.c
index befd489..a0f562c 100644
--- a/drivers/cpufreq/ppc-corenet-cpufreq.c
+++ b/drivers/cpufreq/ppc-corenet-cpufreq.c
@@ -217,8 +217,6 @@ static int corenet_cpufreq_cpu_init(struct cpufreq_policy *policy)
per_cpu(cpu_data, i) = data;
policy->cpuinfo.transition_latency = CPUFREQ_ETERNAL;
- policy->cur = corenet_cpufreq_get_speed(policy->cpu);
-
of_node_put(np);
return 0;
--
1.7.12.rc2.18.g61b472e
^ permalink raw reply related [flat|nested] 112+ messages in thread
* [PATCH V2 Resend 63/92] cpufreq: pxa: don't initialize part of policy that is set by core too
2013-10-03 14:57 [PATCH V2 Resend 00/92] CPUFreq Cleanup Series: Part II Viresh Kumar
` (61 preceding siblings ...)
2013-10-03 14:58 ` [PATCH V2 Resend 62/92] cpufreq: ppc: " Viresh Kumar
@ 2013-10-03 14:58 ` Viresh Kumar
2013-10-03 14:58 ` [PATCH V2 Resend 64/92] cpufreq: s3c: " Viresh Kumar
` (27 subsequent siblings)
90 siblings, 0 replies; 112+ messages in thread
From: Viresh Kumar @ 2013-10-03 14:58 UTC (permalink / raw)
To: rjw; +Cc: cpufreq, linux-pm, Viresh Kumar, Eric Miao
Many common initializations of struct policy are moved to core now and hence
this driver doesn't need to do it. This patch removes such code.
Most recent of those changes is to call ->get() in the core after calling
->init().
Cc: Eric Miao <eric.y.miao@gmail.com>
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
---
drivers/cpufreq/pxa2xx-cpufreq.c | 2 --
drivers/cpufreq/pxa3xx-cpufreq.c | 7 +++----
2 files changed, 3 insertions(+), 6 deletions(-)
diff --git a/drivers/cpufreq/pxa2xx-cpufreq.c b/drivers/cpufreq/pxa2xx-cpufreq.c
index 82905fe..29aca57 100644
--- a/drivers/cpufreq/pxa2xx-cpufreq.c
+++ b/drivers/cpufreq/pxa2xx-cpufreq.c
@@ -397,8 +397,6 @@ static int pxa_cpufreq_init(struct cpufreq_policy *policy)
/* set default policy and cpuinfo */
policy->cpuinfo.transition_latency = 1000; /* FIXME: 1 ms, assumed */
- policy->cur = get_clk_frequency_khz(0); /* current freq */
- policy->min = policy->max = policy->cur;
/* Generate pxa25x the run cpufreq_frequency_table struct */
for (i = 0; i < NUM_PXA25x_RUN_FREQS; i++) {
diff --git a/drivers/cpufreq/pxa3xx-cpufreq.c b/drivers/cpufreq/pxa3xx-cpufreq.c
index ae3ac08..47fbee4 100644
--- a/drivers/cpufreq/pxa3xx-cpufreq.c
+++ b/drivers/cpufreq/pxa3xx-cpufreq.c
@@ -201,11 +201,10 @@ static int pxa3xx_cpufreq_init(struct cpufreq_policy *policy)
int ret = -EINVAL;
/* set default policy and cpuinfo */
- policy->cpuinfo.min_freq = 104000;
- policy->cpuinfo.max_freq = (cpu_is_pxa320()) ? 806000 : 624000;
+ policy->min = policy->cpuinfo.min_freq = 104000;
+ policy->max = policy->cpuinfo.max_freq =
+ (cpu_is_pxa320()) ? 806000 : 624000;
policy->cpuinfo.transition_latency = 1000; /* FIXME: 1 ms, assumed */
- policy->max = pxa3xx_get_clk_frequency_khz(0);
- policy->cur = policy->min = policy->max;
if (cpu_is_pxa300() || cpu_is_pxa310())
ret = setup_freqs_table(policy, pxa300_freqs,
--
1.7.12.rc2.18.g61b472e
^ permalink raw reply related [flat|nested] 112+ messages in thread
* [PATCH V2 Resend 64/92] cpufreq: s3c: don't initialize part of policy that is set by core too
2013-10-03 14:57 [PATCH V2 Resend 00/92] CPUFreq Cleanup Series: Part II Viresh Kumar
` (62 preceding siblings ...)
2013-10-03 14:58 ` [PATCH V2 Resend 63/92] cpufreq: pxa: " Viresh Kumar
@ 2013-10-03 14:58 ` Viresh Kumar
2013-10-03 14:58 ` [PATCH V2 Resend 65/92] cpufreq: s5pv210: " Viresh Kumar
` (26 subsequent siblings)
90 siblings, 0 replies; 112+ messages in thread
From: Viresh Kumar @ 2013-10-03 14:58 UTC (permalink / raw)
To: rjw; +Cc: cpufreq, linux-pm, Viresh Kumar, Kukjin Kim
Many common initializations of struct policy are moved to core now and hence
this driver doesn't need to do it. This patch removes such code.
Most recent of those changes is to call ->get() in the core after calling
->init().
Cc: Kukjin Kim <kgene.kim@samsung.com>
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
---
drivers/cpufreq/s3c2416-cpufreq.c | 2 --
drivers/cpufreq/s3c24xx-cpufreq.c | 5 -----
drivers/cpufreq/s3c64xx-cpufreq.c | 2 --
3 files changed, 9 deletions(-)
diff --git a/drivers/cpufreq/s3c2416-cpufreq.c b/drivers/cpufreq/s3c2416-cpufreq.c
index 8c57f10..22c4c2d 100644
--- a/drivers/cpufreq/s3c2416-cpufreq.c
+++ b/drivers/cpufreq/s3c2416-cpufreq.c
@@ -476,8 +476,6 @@ static int __init s3c2416_cpufreq_driver_init(struct cpufreq_policy *policy)
freq++;
}
- policy->cur = clk_get_rate(s3c_freq->armclk) / 1000;
-
/* Datasheet says PLL stabalisation time must be at least 300us,
* so but add some fudge. (reference in LOCKCON0 register description)
*/
diff --git a/drivers/cpufreq/s3c24xx-cpufreq.c b/drivers/cpufreq/s3c24xx-cpufreq.c
index 027dec1..e0fbaef 100644
--- a/drivers/cpufreq/s3c24xx-cpufreq.c
+++ b/drivers/cpufreq/s3c24xx-cpufreq.c
@@ -378,11 +378,6 @@ static int s3c_cpufreq_init(struct cpufreq_policy *policy)
if (policy->cpu != 0)
return -EINVAL;
- policy->cur = s3c_cpufreq_get(0);
- policy->min = policy->cpuinfo.min_freq = 0;
- policy->max = policy->cpuinfo.max_freq = cpu_cur.info->max.fclk / 1000;
- policy->governor = CPUFREQ_DEFAULT_GOVERNOR;
-
/* feed the latency information from the cpu driver */
policy->cpuinfo.transition_latency = cpu_cur.info->latency;
diff --git a/drivers/cpufreq/s3c64xx-cpufreq.c b/drivers/cpufreq/s3c64xx-cpufreq.c
index 99fbc49..a66cfa3 100644
--- a/drivers/cpufreq/s3c64xx-cpufreq.c
+++ b/drivers/cpufreq/s3c64xx-cpufreq.c
@@ -235,8 +235,6 @@ static int s3c64xx_cpufreq_driver_init(struct cpufreq_policy *policy)
freq++;
}
- policy->cur = clk_get_rate(armclk) / 1000;
-
/* Datasheet says PLL stabalisation time (if we were to use
* the PLLs, which we don't currently) is ~300us worst case,
* but add some fudge.
--
1.7.12.rc2.18.g61b472e
^ permalink raw reply related [flat|nested] 112+ messages in thread
* [PATCH V2 Resend 65/92] cpufreq: s5pv210: don't initialize part of policy that is set by core too
2013-10-03 14:57 [PATCH V2 Resend 00/92] CPUFreq Cleanup Series: Part II Viresh Kumar
` (63 preceding siblings ...)
2013-10-03 14:58 ` [PATCH V2 Resend 64/92] cpufreq: s3c: " Viresh Kumar
@ 2013-10-03 14:58 ` Viresh Kumar
2013-10-03 14:59 ` [PATCH V2 Resend 66/92] cpufreq: sa11x0: " Viresh Kumar
` (25 subsequent siblings)
90 siblings, 0 replies; 112+ messages in thread
From: Viresh Kumar @ 2013-10-03 14:58 UTC (permalink / raw)
To: rjw; +Cc: cpufreq, linux-pm, Viresh Kumar, Kukjin Kim
Many common initializations of struct policy are moved to core now and hence
this driver doesn't need to do it. This patch removes such code.
Most recent of those changes is to call ->get() in the core after calling
->init().
Cc: Kukjin Kim <kgene.kim@samsung.com>
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
---
drivers/cpufreq/s5pv210-cpufreq.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/drivers/cpufreq/s5pv210-cpufreq.c b/drivers/cpufreq/s5pv210-cpufreq.c
index 0eafc52..30d9bb7 100644
--- a/drivers/cpufreq/s5pv210-cpufreq.c
+++ b/drivers/cpufreq/s5pv210-cpufreq.c
@@ -543,8 +543,6 @@ static int __init s5pv210_cpu_init(struct cpufreq_policy *policy)
s5pv210_dram_conf[1].refresh = (__raw_readl(S5P_VA_DMC1 + 0x30) * 1000);
s5pv210_dram_conf[1].freq = clk_get_rate(dmc1_clk);
- policy->cur = policy->min = policy->max = s5pv210_getspeed(0);
-
policy->cpuinfo.transition_latency = 40000;
return cpufreq_table_validate_and_show(policy, s5pv210_freq_table);
--
1.7.12.rc2.18.g61b472e
^ permalink raw reply related [flat|nested] 112+ messages in thread
* [PATCH V2 Resend 66/92] cpufreq: sa11x0: don't initialize part of policy that is set by core too
2013-10-03 14:57 [PATCH V2 Resend 00/92] CPUFreq Cleanup Series: Part II Viresh Kumar
` (64 preceding siblings ...)
2013-10-03 14:58 ` [PATCH V2 Resend 65/92] cpufreq: s5pv210: " Viresh Kumar
@ 2013-10-03 14:59 ` Viresh Kumar
2013-10-03 14:59 ` [PATCH V2 Resend 67/92] cpufreq: sc520_freq: " Viresh Kumar
` (24 subsequent siblings)
90 siblings, 0 replies; 112+ messages in thread
From: Viresh Kumar @ 2013-10-03 14:59 UTC (permalink / raw)
To: rjw; +Cc: cpufreq, linux-pm, Viresh Kumar, Russell King
Many common initializations of struct policy are moved to core now and hence
this driver doesn't need to do it. This patch removes such code.
Most recent of those changes is to call ->get() in the core after calling
->init().
Cc: Russell King <linux@arm.linux.org.uk>
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
---
drivers/cpufreq/sa1100-cpufreq.c | 1 -
drivers/cpufreq/sa1110-cpufreq.c | 1 -
2 files changed, 2 deletions(-)
diff --git a/drivers/cpufreq/sa1100-cpufreq.c b/drivers/cpufreq/sa1100-cpufreq.c
index 80a4fde..a1d1bb7 100644
--- a/drivers/cpufreq/sa1100-cpufreq.c
+++ b/drivers/cpufreq/sa1100-cpufreq.c
@@ -220,7 +220,6 @@ static int __init sa1100_cpu_init(struct cpufreq_policy *policy)
{
if (policy->cpu != 0)
return -EINVAL;
- policy->cur = sa11x0_getspeed(0);
policy->cpuinfo.transition_latency = CPUFREQ_ETERNAL;
return cpufreq_table_validate_and_show(policy, sa11x0_freq_table);
diff --git a/drivers/cpufreq/sa1110-cpufreq.c b/drivers/cpufreq/sa1110-cpufreq.c
index a38d904..9da940e 100644
--- a/drivers/cpufreq/sa1110-cpufreq.c
+++ b/drivers/cpufreq/sa1110-cpufreq.c
@@ -334,7 +334,6 @@ static int __init sa1110_cpu_init(struct cpufreq_policy *policy)
{
if (policy->cpu != 0)
return -EINVAL;
- policy->cur = sa11x0_getspeed(0);
policy->cpuinfo.transition_latency = CPUFREQ_ETERNAL;
return cpufreq_table_validate_and_show(policy, sa11x0_freq_table);
--
1.7.12.rc2.18.g61b472e
^ permalink raw reply related [flat|nested] 112+ messages in thread
* [PATCH V2 Resend 67/92] cpufreq: sc520_freq: don't initialize part of policy that is set by core too
2013-10-03 14:57 [PATCH V2 Resend 00/92] CPUFreq Cleanup Series: Part II Viresh Kumar
` (65 preceding siblings ...)
2013-10-03 14:59 ` [PATCH V2 Resend 66/92] cpufreq: sa11x0: " Viresh Kumar
@ 2013-10-03 14:59 ` Viresh Kumar
2013-10-03 14:59 ` [PATCH V2 Resend 68/92] cpufreq: sh: " Viresh Kumar
` (23 subsequent siblings)
90 siblings, 0 replies; 112+ messages in thread
From: Viresh Kumar @ 2013-10-03 14:59 UTC (permalink / raw)
To: rjw; +Cc: cpufreq, linux-pm, Viresh Kumar
Many common initializations of struct policy are moved to core now and hence
this driver doesn't need to do it. This patch removes such code.
Most recent of those changes is to call ->get() in the core after calling
->init().
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
---
drivers/cpufreq/sc520_freq.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/drivers/cpufreq/sc520_freq.c b/drivers/cpufreq/sc520_freq.c
index 8556225..9047ab1 100644
--- a/drivers/cpufreq/sc520_freq.c
+++ b/drivers/cpufreq/sc520_freq.c
@@ -109,7 +109,6 @@ static int sc520_freq_cpu_init(struct cpufreq_policy *policy)
/* cpuinfo and default policy values */
policy->cpuinfo.transition_latency = 1000000; /* 1ms */
- policy->cur = sc520_freq_get_cpu_frequency(0);
return cpufreq_table_validate_and_show(policy, sc520_freq_table);
}
--
1.7.12.rc2.18.g61b472e
^ permalink raw reply related [flat|nested] 112+ messages in thread
* [PATCH V2 Resend 68/92] cpufreq: sh: don't initialize part of policy that is set by core too
2013-10-03 14:57 [PATCH V2 Resend 00/92] CPUFreq Cleanup Series: Part II Viresh Kumar
` (66 preceding siblings ...)
2013-10-03 14:59 ` [PATCH V2 Resend 67/92] cpufreq: sc520_freq: " Viresh Kumar
@ 2013-10-03 14:59 ` Viresh Kumar
2013-10-03 14:59 ` [PATCH V2 Resend 69/92] cpufreq: spear: " Viresh Kumar
` (22 subsequent siblings)
90 siblings, 0 replies; 112+ messages in thread
From: Viresh Kumar @ 2013-10-03 14:59 UTC (permalink / raw)
To: rjw; +Cc: cpufreq, linux-pm, Viresh Kumar, Paul Mundt, linux-sh
Many common initializations of struct policy are moved to core now and hence
this driver doesn't need to do it. This patch removes such code.
Most recent of those changes is to call ->get() in the core after calling
->init().
Cc: Paul Mundt <lethal@linux-sh.org>
Cc: linux-sh@vger.kernel.org
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
---
drivers/cpufreq/sh-cpufreq.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/drivers/cpufreq/sh-cpufreq.c b/drivers/cpufreq/sh-cpufreq.c
index 91c6446..018348b 100644
--- a/drivers/cpufreq/sh-cpufreq.c
+++ b/drivers/cpufreq/sh-cpufreq.c
@@ -114,8 +114,6 @@ static int sh_cpufreq_cpu_init(struct cpufreq_policy *policy)
return PTR_ERR(cpuclk);
}
- policy->cur = sh_cpufreq_get(cpu);
-
freq_table = cpuclk->nr_freqs ? cpuclk->freq_table : NULL;
if (freq_table) {
int result;
--
1.7.12.rc2.18.g61b472e
^ permalink raw reply related [flat|nested] 112+ messages in thread
* [PATCH V2 Resend 69/92] cpufreq: spear: don't initialize part of policy that is set by core too
2013-10-03 14:57 [PATCH V2 Resend 00/92] CPUFreq Cleanup Series: Part II Viresh Kumar
` (67 preceding siblings ...)
2013-10-03 14:59 ` [PATCH V2 Resend 68/92] cpufreq: sh: " Viresh Kumar
@ 2013-10-03 14:59 ` Viresh Kumar
2013-10-03 14:59 ` [PATCH V2 Resend 70/92] cpufreq: speedstep: " Viresh Kumar
` (21 subsequent siblings)
90 siblings, 0 replies; 112+ messages in thread
From: Viresh Kumar @ 2013-10-03 14:59 UTC (permalink / raw)
To: rjw; +Cc: cpufreq, linux-pm, Viresh Kumar, spear-devel
Many common initializations of struct policy are moved to core now and hence
this driver doesn't need to do it. This patch removes such code.
Most recent of those changes is to call ->get() in the core after calling
->init().
Cc: spear-devel@list.st.com
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
---
drivers/cpufreq/spear-cpufreq.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/drivers/cpufreq/spear-cpufreq.c b/drivers/cpufreq/spear-cpufreq.c
index 796b1db..34f04f4 100644
--- a/drivers/cpufreq/spear-cpufreq.c
+++ b/drivers/cpufreq/spear-cpufreq.c
@@ -180,8 +180,6 @@ static int spear_cpufreq_init(struct cpufreq_policy *policy)
}
policy->cpuinfo.transition_latency = spear_cpufreq.transition_latency;
- policy->cur = spear_cpufreq_get(0);
-
cpumask_setall(policy->cpus);
return 0;
--
1.7.12.rc2.18.g61b472e
^ permalink raw reply related [flat|nested] 112+ messages in thread
* [PATCH V2 Resend 70/92] cpufreq: speedstep: don't initialize part of policy that is set by core too
2013-10-03 14:57 [PATCH V2 Resend 00/92] CPUFreq Cleanup Series: Part II Viresh Kumar
` (68 preceding siblings ...)
2013-10-03 14:59 ` [PATCH V2 Resend 69/92] cpufreq: spear: " Viresh Kumar
@ 2013-10-03 14:59 ` Viresh Kumar
2013-10-03 14:59 ` [PATCH V2 Resend 71/92] cpufreq: tegra: " Viresh Kumar
` (20 subsequent siblings)
90 siblings, 0 replies; 112+ messages in thread
From: Viresh Kumar @ 2013-10-03 14:59 UTC (permalink / raw)
To: rjw; +Cc: cpufreq, linux-pm, Viresh Kumar, David S. Miller
Many common initializations of struct policy are moved to core now and hence
this driver doesn't need to do it. This patch removes such code.
Most recent of those changes is to call ->get() in the core after calling
->init().
Cc: David S. Miller <davem@davemloft.net>
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
---
drivers/cpufreq/speedstep-centrino.c | 5 -----
drivers/cpufreq/speedstep-ich.c | 15 +--------------
drivers/cpufreq/speedstep-smi.c | 13 -------------
3 files changed, 1 insertion(+), 32 deletions(-)
diff --git a/drivers/cpufreq/speedstep-centrino.c b/drivers/cpufreq/speedstep-centrino.c
index c7c14ae..6b882c7 100644
--- a/drivers/cpufreq/speedstep-centrino.c
+++ b/drivers/cpufreq/speedstep-centrino.c
@@ -343,7 +343,6 @@ static unsigned int get_cur_freq(unsigned int cpu)
static int centrino_cpu_init(struct cpufreq_policy *policy)
{
struct cpuinfo_x86 *cpu = &cpu_data(policy->cpu);
- unsigned freq;
unsigned l, h;
int i;
@@ -394,12 +393,8 @@ static int centrino_cpu_init(struct cpufreq_policy *policy)
}
}
- freq = get_cur_freq(policy->cpu);
policy->cpuinfo.transition_latency = 10000;
/* 10uS transition latency */
- policy->cur = freq;
-
- pr_debug("centrino_cpu_init: cur=%dkHz\n", policy->cur);
return cpufreq_table_validate_and_show(policy,
per_cpu(centrino_model, policy->cpu)->op_points);
diff --git a/drivers/cpufreq/speedstep-ich.c b/drivers/cpufreq/speedstep-ich.c
index 929a4f0..1a8b01b 100644
--- a/drivers/cpufreq/speedstep-ich.c
+++ b/drivers/cpufreq/speedstep-ich.c
@@ -308,7 +308,7 @@ static void get_freqs_on_cpu(void *_get_freqs)
static int speedstep_cpu_init(struct cpufreq_policy *policy)
{
- unsigned int policy_cpu, speed;
+ unsigned int policy_cpu;
struct get_freqs gf;
/* only run on CPU to be set, or on its sibling */
@@ -323,19 +323,6 @@ static int speedstep_cpu_init(struct cpufreq_policy *policy)
if (gf.ret)
return gf.ret;
- /* get current speed setting */
- speed = speedstep_get(policy_cpu);
- if (!speed)
- return -EIO;
-
- pr_debug("currently at %s speed setting - %i MHz\n",
- (speed == speedstep_freqs[SPEEDSTEP_LOW].frequency)
- ? "low" : "high",
- (speed / 1000));
-
- /* cpuinfo and default policy values */
- policy->cur = speed;
-
return cpufreq_table_validate_and_show(policy, speedstep_freqs);
}
diff --git a/drivers/cpufreq/speedstep-smi.c b/drivers/cpufreq/speedstep-smi.c
index b3dfba0..a02b649 100644
--- a/drivers/cpufreq/speedstep-smi.c
+++ b/drivers/cpufreq/speedstep-smi.c
@@ -267,7 +267,6 @@ static int speedstep_target(struct cpufreq_policy *policy,
static int speedstep_cpu_init(struct cpufreq_policy *policy)
{
int result;
- unsigned int speed, state;
unsigned int *low, *high;
/* capability check */
@@ -303,19 +302,7 @@ static int speedstep_cpu_init(struct cpufreq_policy *policy)
pr_debug("workaround worked.\n");
}
- /* get current speed setting */
- state = speedstep_get_state();
- speed = speedstep_freqs[state].frequency;
-
- pr_debug("currently at %s speed setting - %i MHz\n",
- (speed == speedstep_freqs[SPEEDSTEP_LOW].frequency)
- ? "low" : "high",
- (speed / 1000));
-
- /* cpuinfo and default policy values */
policy->cpuinfo.transition_latency = CPUFREQ_ETERNAL;
- policy->cur = speed;
-
return cpufreq_table_validate_and_show(policy, speedstep_freqs);
}
--
1.7.12.rc2.18.g61b472e
^ permalink raw reply related [flat|nested] 112+ messages in thread
* [PATCH V2 Resend 71/92] cpufreq: tegra: don't initialize part of policy that is set by core too
2013-10-03 14:57 [PATCH V2 Resend 00/92] CPUFreq Cleanup Series: Part II Viresh Kumar
` (69 preceding siblings ...)
2013-10-03 14:59 ` [PATCH V2 Resend 70/92] cpufreq: speedstep: " Viresh Kumar
@ 2013-10-03 14:59 ` Viresh Kumar
2013-10-03 14:59 ` [PATCH V2 Resend 72/92] cpufreq: unicore2: " Viresh Kumar
` (19 subsequent siblings)
90 siblings, 0 replies; 112+ messages in thread
From: Viresh Kumar @ 2013-10-03 14:59 UTC (permalink / raw)
To: rjw; +Cc: cpufreq, linux-pm, Viresh Kumar, Stephen Warren
Many common initializations of struct policy are moved to core now and hence
this driver doesn't need to do it. This patch removes such code.
Most recent of those changes is to call ->get() in the core after calling
->init().
Cc: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
---
drivers/cpufreq/tegra-cpufreq.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/cpufreq/tegra-cpufreq.c b/drivers/cpufreq/tegra-cpufreq.c
index c36a8e7..9c32b23 100644
--- a/drivers/cpufreq/tegra-cpufreq.c
+++ b/drivers/cpufreq/tegra-cpufreq.c
@@ -211,8 +211,7 @@ static int tegra_cpu_init(struct cpufreq_policy *policy)
clk_prepare_enable(cpu_clk);
cpufreq_table_validate_and_show(policy, freq_table);
- policy->cur = tegra_getspeed(policy->cpu);
- target_cpu_speed[policy->cpu] = policy->cur;
+ target_cpu_speed[policy->cpu] = tegra_getspeed(policy->cpu);
/* FIXME: what's the actual transition time? */
policy->cpuinfo.transition_latency = 300 * 1000;
--
1.7.12.rc2.18.g61b472e
^ permalink raw reply related [flat|nested] 112+ messages in thread
* [PATCH V2 Resend 72/92] cpufreq: unicore2: don't initialize part of policy that is set by core too
2013-10-03 14:57 [PATCH V2 Resend 00/92] CPUFreq Cleanup Series: Part II Viresh Kumar
` (70 preceding siblings ...)
2013-10-03 14:59 ` [PATCH V2 Resend 71/92] cpufreq: tegra: " Viresh Kumar
@ 2013-10-03 14:59 ` Viresh Kumar
2013-10-03 14:59 ` [PATCH V2 Resend 73/92] cpufreq: create cpufreq_generic_init() routine Viresh Kumar
` (18 subsequent siblings)
90 siblings, 0 replies; 112+ messages in thread
From: Viresh Kumar @ 2013-10-03 14:59 UTC (permalink / raw)
To: rjw; +Cc: cpufreq, linux-pm, Viresh Kumar
Many common initializations of struct policy are moved to core now and hence
this driver doesn't need to do it. This patch removes such code.
Most recent of those changes is to call ->get() in the core after calling
->init().
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
---
drivers/cpufreq/unicore2-cpufreq.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/drivers/cpufreq/unicore2-cpufreq.c b/drivers/cpufreq/unicore2-cpufreq.c
index b225f04..79ca32e 100644
--- a/drivers/cpufreq/unicore2-cpufreq.c
+++ b/drivers/cpufreq/unicore2-cpufreq.c
@@ -68,7 +68,6 @@ static int __init ucv2_cpu_init(struct cpufreq_policy *policy)
{
if (policy->cpu != 0)
return -EINVAL;
- policy->cur = ucv2_getspeed(0);
policy->min = policy->cpuinfo.min_freq = 250000;
policy->max = policy->cpuinfo.max_freq = 1000000;
policy->cpuinfo.transition_latency = CPUFREQ_ETERNAL;
--
1.7.12.rc2.18.g61b472e
^ permalink raw reply related [flat|nested] 112+ messages in thread
* [PATCH V2 Resend 73/92] cpufreq: create cpufreq_generic_init() routine
2013-10-03 14:57 [PATCH V2 Resend 00/92] CPUFreq Cleanup Series: Part II Viresh Kumar
` (71 preceding siblings ...)
2013-10-03 14:59 ` [PATCH V2 Resend 72/92] cpufreq: unicore2: " Viresh Kumar
@ 2013-10-03 14:59 ` Viresh Kumar
2013-10-03 14:59 ` [PATCH V2 Resend 74/92] cpufreq: remove CONFIG_CPU_FREQ_TABLE Viresh Kumar
` (17 subsequent siblings)
90 siblings, 0 replies; 112+ messages in thread
From: Viresh Kumar @ 2013-10-03 14:59 UTC (permalink / raw)
To: rjw; +Cc: cpufreq, linux-pm, Viresh Kumar
Many CPUFreq drivers for SMP system (where all cores share same clock lines), do
similar stuff in their ->init() part.
This patch creates a generic routine in cpufreq core which can be used by these
so that we can remove some redundant code.
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
---
drivers/cpufreq/Kconfig | 1 +
drivers/cpufreq/cpufreq.c | 31 +++++++++++++++++++++++++++++++
include/linux/cpufreq.h | 3 +++
3 files changed, 35 insertions(+)
diff --git a/drivers/cpufreq/Kconfig b/drivers/cpufreq/Kconfig
index 534fcb8..2d06754 100644
--- a/drivers/cpufreq/Kconfig
+++ b/drivers/cpufreq/Kconfig
@@ -2,6 +2,7 @@ menu "CPU Frequency scaling"
config CPU_FREQ
bool "CPU Frequency scaling"
+ select CPU_FREQ_TABLE
help
CPU Frequency scaling allows you to change the clock speed of
CPUs on the fly. This is a nice method to save power, because
diff --git a/drivers/cpufreq/cpufreq.c b/drivers/cpufreq/cpufreq.c
index 1a944f7..ff70e0b 100644
--- a/drivers/cpufreq/cpufreq.c
+++ b/drivers/cpufreq/cpufreq.c
@@ -183,6 +183,37 @@ u64 get_cpu_idle_time(unsigned int cpu, u64 *wall, int io_busy)
}
EXPORT_SYMBOL_GPL(get_cpu_idle_time);
+/*
+ * This is a generic cpufreq init() routine which can be used by cpufreq
+ * drivers of SMP systems. It will do following:
+ * - validate & show freq table passed
+ * - set policies transition latency
+ * - policy->cpus with all possible CPUs
+ */
+int cpufreq_generic_init(struct cpufreq_policy *policy,
+ struct cpufreq_frequency_table *table,
+ unsigned int transition_latency)
+{
+ int ret;
+
+ ret = cpufreq_table_validate_and_show(policy, table);
+ if (ret) {
+ pr_err("%s: invalid frequency table: %d\n", __func__, ret);
+ return ret;
+ }
+
+ policy->cpuinfo.transition_latency = transition_latency;
+
+ /*
+ * The driver only supports the SMP configuartion where all processors
+ * share the clock and voltage and clock.
+ */
+ cpumask_setall(policy->cpus);
+
+ return 0;
+}
+EXPORT_SYMBOL_GPL(cpufreq_generic_init);
+
struct cpufreq_policy *cpufreq_cpu_get(unsigned int cpu)
{
struct cpufreq_policy *policy = NULL;
diff --git a/include/linux/cpufreq.h b/include/linux/cpufreq.h
index c808809..d0d0b50 100644
--- a/include/linux/cpufreq.h
+++ b/include/linux/cpufreq.h
@@ -415,6 +415,9 @@ void cpufreq_frequency_table_put_attr(unsigned int cpu);
int cpufreq_table_validate_and_show(struct cpufreq_policy *policy,
struct cpufreq_frequency_table *table);
+int cpufreq_generic_init(struct cpufreq_policy *policy,
+ struct cpufreq_frequency_table *table,
+ unsigned int transition_latency);
static inline int cpufreq_generic_exit(struct cpufreq_policy *policy)
{
cpufreq_frequency_table_put_attr(policy->cpu);
--
1.7.12.rc2.18.g61b472e
^ permalink raw reply related [flat|nested] 112+ messages in thread
* [PATCH V2 Resend 74/92] cpufreq: remove CONFIG_CPU_FREQ_TABLE
2013-10-03 14:57 [PATCH V2 Resend 00/92] CPUFreq Cleanup Series: Part II Viresh Kumar
` (72 preceding siblings ...)
2013-10-03 14:59 ` [PATCH V2 Resend 73/92] cpufreq: create cpufreq_generic_init() routine Viresh Kumar
@ 2013-10-03 14:59 ` Viresh Kumar
2013-10-03 14:59 ` [PATCH V2 Resend 75/92] cpufreq: cpu0: use cpufreq_generic_init() routine Viresh Kumar
` (16 subsequent siblings)
90 siblings, 0 replies; 112+ messages in thread
From: Viresh Kumar @ 2013-10-03 14:59 UTC (permalink / raw)
To: rjw; +Cc: cpufreq, linux-pm, Viresh Kumar
CONFIG_CPU_FREQ_TABLE will be always enabled when cpufreq framework is used, as
cpufreq core depends on it. So, we don't need this CONFIG option anymore as it
is not configurable. Remove CONFIG_CPU_FREQ_TABLE and update its users.
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
---
arch/arm/mach-davinci/Kconfig | 1 -
arch/arm/mach-pxa/Kconfig | 3 ---
arch/arm/mach-ux500/Kconfig | 1 -
arch/blackfin/Kconfig | 1 -
arch/cris/Kconfig | 2 --
drivers/cpufreq/Kconfig | 12 ------------
drivers/cpufreq/Kconfig.arm | 11 -----------
drivers/cpufreq/Kconfig.powerpc | 6 ------
drivers/cpufreq/Kconfig.x86 | 13 -------------
drivers/cpufreq/Makefile | 5 +----
drivers/cpufreq/cpufreq.c | 2 --
drivers/thermal/Kconfig | 1 -
12 files changed, 1 insertion(+), 57 deletions(-)
diff --git a/arch/arm/mach-davinci/Kconfig b/arch/arm/mach-davinci/Kconfig
index e026b19..a075b3e 100644
--- a/arch/arm/mach-davinci/Kconfig
+++ b/arch/arm/mach-davinci/Kconfig
@@ -40,7 +40,6 @@ 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
diff --git a/arch/arm/mach-pxa/Kconfig b/arch/arm/mach-pxa/Kconfig
index a842711..96100db 100644
--- a/arch/arm/mach-pxa/Kconfig
+++ b/arch/arm/mach-pxa/Kconfig
@@ -615,14 +615,12 @@ 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
@@ -635,7 +633,6 @@ config CPU_PXA26x
config PXA3xx
bool
select CPU_XSC3
- select CPU_FREQ_TABLE if CPU_FREQ
help
Select code specific to PXA3xx variants
diff --git a/arch/arm/mach-ux500/Kconfig b/arch/arm/mach-ux500/Kconfig
index 99a28d6..7a3fc1a 100644
--- a/arch/arm/mach-ux500/Kconfig
+++ b/arch/arm/mach-ux500/Kconfig
@@ -34,7 +34,6 @@ config UX500_SOC_COMMON
config UX500_SOC_DB8500
bool
- select CPU_FREQ_TABLE if CPU_FREQ
select MFD_DB8500_PRCMU
select PINCTRL_DB8500
select PINCTRL_DB8540
diff --git a/arch/blackfin/Kconfig b/arch/blackfin/Kconfig
index f78c9a2..eb382ae 100644
--- a/arch/blackfin/Kconfig
+++ b/arch/blackfin/Kconfig
@@ -1429,7 +1429,6 @@ source "drivers/cpufreq/Kconfig"
config BFIN_CPU_FREQ
bool
depends on CPU_FREQ
- select CPU_FREQ_TABLE
default y
config CPU_VOLTAGE
diff --git a/arch/cris/Kconfig b/arch/cris/Kconfig
index 02380be..9c957c8 100644
--- a/arch/cris/Kconfig
+++ b/arch/cris/Kconfig
@@ -130,13 +130,11 @@ 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.
diff --git a/drivers/cpufreq/Kconfig b/drivers/cpufreq/Kconfig
index 2d06754..38093e2 100644
--- a/drivers/cpufreq/Kconfig
+++ b/drivers/cpufreq/Kconfig
@@ -2,7 +2,6 @@ menu "CPU Frequency scaling"
config CPU_FREQ
bool "CPU Frequency scaling"
- select CPU_FREQ_TABLE
help
CPU Frequency scaling allows you to change the clock speed of
CPUs on the fly. This is a nice method to save power, because
@@ -18,15 +17,11 @@ config CPU_FREQ
if CPU_FREQ
-config CPU_FREQ_TABLE
- tristate
-
config CPU_FREQ_GOV_COMMON
bool
config CPU_FREQ_STAT
tristate "CPU frequency translation statistics"
- select CPU_FREQ_TABLE
default y
help
This driver exports CPU frequency statistics information through sysfs
@@ -144,7 +139,6 @@ config CPU_FREQ_GOV_USERSPACE
config CPU_FREQ_GOV_ONDEMAND
tristate "'ondemand' cpufreq policy governor"
- select CPU_FREQ_TABLE
select CPU_FREQ_GOV_COMMON
help
'ondemand' - This driver adds a dynamic cpufreq policy governor.
@@ -188,7 +182,6 @@ config CPU_FREQ_GOV_CONSERVATIVE
config GENERIC_CPUFREQ_CPU0
tristate "Generic CPU0 cpufreq driver"
depends on HAVE_CLK && REGULATOR && PM_OPP && OF
- select CPU_FREQ_TABLE
help
This adds a generic cpufreq driver for CPU0 frequency management.
It supports both uniprocessor (UP) and symmetric multiprocessor (SMP)
@@ -224,7 +217,6 @@ depends on IA64
config IA64_ACPI_CPUFREQ
tristate "ACPI Processor P-States driver"
- select CPU_FREQ_TABLE
depends on ACPI_PROCESSOR
help
This driver adds a CPUFreq driver which utilizes the ACPI
@@ -241,7 +233,6 @@ depends on MIPS
config LOONGSON2_CPUFREQ
tristate "Loongson2 CPUFreq Driver"
- select CPU_FREQ_TABLE
help
This option adds a CPUFreq driver for loongson processors which
support software configurable cpu frequency.
@@ -263,7 +254,6 @@ menu "SPARC CPU frequency scaling drivers"
depends on SPARC64
config SPARC_US3_CPUFREQ
tristate "UltraSPARC-III CPU Frequency driver"
- select CPU_FREQ_TABLE
help
This adds the CPUFreq driver for UltraSPARC-III processors.
@@ -273,7 +263,6 @@ config SPARC_US3_CPUFREQ
config SPARC_US2E_CPUFREQ
tristate "UltraSPARC-IIe CPU Frequency driver"
- select CPU_FREQ_TABLE
help
This adds the CPUFreq driver for UltraSPARC-IIe processors.
@@ -286,7 +275,6 @@ menu "SH CPU Frequency scaling"
depends on SUPERH
config SH_CPU_FREQ
tristate "SuperH CPU Frequency driver"
- select CPU_FREQ_TABLE
help
This adds the cpufreq driver for SuperH. Any CPU that supports
clock rate rounding through the clock framework can use this
diff --git a/drivers/cpufreq/Kconfig.arm b/drivers/cpufreq/Kconfig.arm
index 0fa204b..701ec95 100644
--- a/drivers/cpufreq/Kconfig.arm
+++ b/drivers/cpufreq/Kconfig.arm
@@ -5,7 +5,6 @@
config ARM_BIG_LITTLE_CPUFREQ
tristate "Generic ARM big LITTLE CPUfreq driver"
depends on ARM_CPU_TOPOLOGY && PM_OPP && HAVE_CLK
- select CPU_FREQ_TABLE
help
This enables the Generic CPUfreq driver for ARM big.LITTLE platforms.
@@ -18,7 +17,6 @@ config ARM_DT_BL_CPUFREQ
config ARM_EXYNOS_CPUFREQ
bool
- select CPU_FREQ_TABLE
config ARM_EXYNOS4210_CPUFREQ
bool "SAMSUNG EXYNOS4210"
@@ -58,7 +56,6 @@ config ARM_EXYNOS5440_CPUFREQ
depends on SOC_EXYNOS5440
depends on HAVE_CLK && PM_OPP && OF
default y
- select CPU_FREQ_TABLE
help
This adds the CPUFreq driver for Samsung EXYNOS5440
SoC. The nature of exynos5440 clock controller is
@@ -85,7 +82,6 @@ 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.
@@ -101,7 +97,6 @@ config ARM_INTEGRATOR
config ARM_KIRKWOOD_CPUFREQ
def_bool ARCH_KIRKWOOD && OF
- select CPU_FREQ_TABLE
help
This adds the CPUFreq driver for Marvell Kirkwood
SoCs.
@@ -110,7 +105,6 @@ config ARM_OMAP2PLUS_CPUFREQ
bool "TI OMAP2+"
depends on ARCH_OMAP2PLUS
default ARCH_OMAP2PLUS
- select CPU_FREQ_TABLE
config ARM_S3C_CPUFREQ
bool
@@ -165,7 +159,6 @@ config ARM_S3C2412_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
@@ -196,7 +189,6 @@ config ARM_S3C2440_CPUFREQ
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.
@@ -206,7 +198,6 @@ config ARM_S3C64XX_CPUFREQ
config ARM_S5PV210_CPUFREQ
bool "Samsung S5PV210 and S5PC110"
depends on CPU_S5PV210
- select CPU_FREQ_TABLE
default y
help
This adds the CPUFreq driver for Samsung S5PV210 and
@@ -223,7 +214,6 @@ config ARM_SA1110_CPUFREQ
config ARM_SPEAR_CPUFREQ
bool "SPEAr CPUFreq support"
depends on PLAT_SPEAR
- select CPU_FREQ_TABLE
default y
help
This adds the CPUFreq driver support for SPEAr SOCs.
@@ -231,7 +221,6 @@ config ARM_SPEAR_CPUFREQ
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/Kconfig.powerpc b/drivers/cpufreq/Kconfig.powerpc
index 25ca9db..ca0021a 100644
--- a/drivers/cpufreq/Kconfig.powerpc
+++ b/drivers/cpufreq/Kconfig.powerpc
@@ -1,7 +1,6 @@
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.
@@ -20,7 +19,6 @@ config CPU_FREQ_CBE_PMI
config CPU_FREQ_MAPLE
bool "Support for Maple 970FX Evaluation Board"
depends on PPC_MAPLE
- select CPU_FREQ_TABLE
help
This adds support for frequency switching on Maple 970FX
Evaluation Board and compatible boards (IBM JS2x blades).
@@ -28,7 +26,6 @@ config CPU_FREQ_MAPLE
config PPC_CORENET_CPUFREQ
tristate "CPU frequency scaling driver for Freescale E500MC SoCs"
depends on PPC_E500MC && OF && COMMON_CLK
- select CPU_FREQ_TABLE
select CLK_PPC_CORENET
help
This adds the CPUFreq driver support for Freescale e500mc,
@@ -38,7 +35,6 @@ config PPC_CORENET_CPUFREQ
config CPU_FREQ_PMAC
bool "Support for Apple PowerBooks"
depends on ADB_PMU && PPC32
- select CPU_FREQ_TABLE
help
This adds support for frequency switching on Apple PowerBooks,
this currently includes some models of iBook & Titanium
@@ -47,7 +43,6 @@ config CPU_FREQ_PMAC
config CPU_FREQ_PMAC64
bool "Support for some Apple G5s"
depends on PPC_PMAC && PPC64
- select CPU_FREQ_TABLE
help
This adds support for frequency switching on Apple iMac G5,
and some of the more recent desktop G5 machines as well.
@@ -55,7 +50,6 @@ config CPU_FREQ_PMAC64
config PPC_PASEMI_CPUFREQ
bool "Support for PA Semi PWRficient"
depends on PPC_PASEMI
- select CPU_FREQ_TABLE
default y
help
This adds the support for frequency switching on PA Semi
diff --git a/drivers/cpufreq/Kconfig.x86 b/drivers/cpufreq/Kconfig.x86
index e2b6eab..6897ad8 100644
--- a/drivers/cpufreq/Kconfig.x86
+++ b/drivers/cpufreq/Kconfig.x86
@@ -31,7 +31,6 @@ config X86_PCC_CPUFREQ
config X86_ACPI_CPUFREQ
tristate "ACPI Processor P-States driver"
- select CPU_FREQ_TABLE
depends on ACPI_PROCESSOR
help
This driver adds a CPUFreq driver which utilizes the ACPI
@@ -60,7 +59,6 @@ config X86_ACPI_CPUFREQ_CPB
config ELAN_CPUFREQ
tristate "AMD Elan SC400 and SC410"
- select CPU_FREQ_TABLE
depends on MELAN
---help---
This adds the CPUFreq driver for AMD Elan SC400 and SC410
@@ -76,7 +74,6 @@ config ELAN_CPUFREQ
config SC520_CPUFREQ
tristate "AMD Elan SC520"
- select CPU_FREQ_TABLE
depends on MELAN
---help---
This adds the CPUFreq driver for AMD Elan SC520 processor.
@@ -88,7 +85,6 @@ config SC520_CPUFREQ
config X86_POWERNOW_K6
tristate "AMD Mobile K6-2/K6-3 PowerNow!"
- select CPU_FREQ_TABLE
depends on X86_32
help
This adds the CPUFreq driver for mobile AMD K6-2+ and mobile
@@ -100,7 +96,6 @@ config X86_POWERNOW_K6
config X86_POWERNOW_K7
tristate "AMD Mobile Athlon/Duron PowerNow!"
- select CPU_FREQ_TABLE
depends on X86_32
help
This adds the CPUFreq driver for mobile AMD K7 mobile processors.
@@ -118,7 +113,6 @@ config X86_POWERNOW_K7_ACPI
config X86_POWERNOW_K8
tristate "AMD Opteron/Athlon64 PowerNow!"
- select CPU_FREQ_TABLE
depends on ACPI && ACPI_PROCESSOR && X86_ACPI_CPUFREQ
help
This adds the CPUFreq driver for K8/early Opteron/Athlon64 processors.
@@ -132,7 +126,6 @@ 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
@@ -160,7 +153,6 @@ config X86_GX_SUSPMOD
config X86_SPEEDSTEP_CENTRINO
tristate "Intel Enhanced SpeedStep (deprecated)"
- select CPU_FREQ_TABLE
select X86_SPEEDSTEP_CENTRINO_TABLE if X86_32
depends on X86_32 || (X86_64 && ACPI_PROCESSOR)
help
@@ -190,7 +182,6 @@ config X86_SPEEDSTEP_CENTRINO_TABLE
config X86_SPEEDSTEP_ICH
tristate "Intel Speedstep on ICH-M chipsets (ioport interface)"
- select CPU_FREQ_TABLE
depends on X86_32
help
This adds the CPUFreq driver for certain mobile Intel Pentium III
@@ -204,7 +195,6 @@ config X86_SPEEDSTEP_ICH
config X86_SPEEDSTEP_SMI
tristate "Intel SpeedStep on 440BX/ZX/MX chipsets (SMI interface)"
- select CPU_FREQ_TABLE
depends on X86_32
help
This adds the CPUFreq driver for certain mobile Intel Pentium III
@@ -217,7 +207,6 @@ config X86_SPEEDSTEP_SMI
config X86_P4_CLOCKMOD
tristate "Intel Pentium 4 clock modulation"
- select CPU_FREQ_TABLE
help
This adds the CPUFreq driver for Intel Pentium 4 / XEON
processors. When enabled it will lower CPU temperature by skipping
@@ -259,7 +248,6 @@ config X86_LONGRUN
config X86_LONGHAUL
tristate "VIA Cyrix III Longhaul"
- select CPU_FREQ_TABLE
depends on X86_32 && ACPI_PROCESSOR
help
This adds the CPUFreq driver for VIA Samuel/CyrixIII,
@@ -272,7 +260,6 @@ config X86_LONGHAUL
config X86_E_POWERSAVER
tristate "VIA C7 Enhanced PowerSaver (DANGEROUS)"
- select CPU_FREQ_TABLE
depends on X86_32 && ACPI_PROCESSOR
help
This adds the CPUFreq driver for VIA C7 processors. However, this driver
diff --git a/drivers/cpufreq/Makefile b/drivers/cpufreq/Makefile
index ad5866c..b7948bb 100644
--- a/drivers/cpufreq/Makefile
+++ b/drivers/cpufreq/Makefile
@@ -1,5 +1,5 @@
# CPUfreq core
-obj-$(CONFIG_CPU_FREQ) += cpufreq.o
+obj-$(CONFIG_CPU_FREQ) += cpufreq.o freq_table.o
# CPUfreq stats
obj-$(CONFIG_CPU_FREQ_STAT) += cpufreq_stats.o
@@ -11,9 +11,6 @@ obj-$(CONFIG_CPU_FREQ_GOV_ONDEMAND) += cpufreq_ondemand.o
obj-$(CONFIG_CPU_FREQ_GOV_CONSERVATIVE) += cpufreq_conservative.o
obj-$(CONFIG_CPU_FREQ_GOV_COMMON) += cpufreq_governor.o
-# CPUfreq cross-arch helpers
-obj-$(CONFIG_CPU_FREQ_TABLE) += freq_table.o
-
obj-$(CONFIG_GENERIC_CPUFREQ_CPU0) += cpufreq-cpu0.o
##################################################################################
diff --git a/drivers/cpufreq/cpufreq.c b/drivers/cpufreq/cpufreq.c
index ff70e0b..8f0d920 100644
--- a/drivers/cpufreq/cpufreq.c
+++ b/drivers/cpufreq/cpufreq.c
@@ -997,9 +997,7 @@ static void update_policy_cpu(struct cpufreq_policy *policy, unsigned int cpu)
up_write(&per_cpu(cpu_policy_rwsem, policy->last_cpu));
-#ifdef CONFIG_CPU_FREQ_TABLE
cpufreq_frequency_table_update_policy_cpu(policy);
-#endif
blocking_notifier_call_chain(&cpufreq_policy_notifier_list,
CPUFREQ_UPDATE_POLICY_CPU, policy);
}
diff --git a/drivers/thermal/Kconfig b/drivers/thermal/Kconfig
index dbfc390..5ef5967 100644
--- a/drivers/thermal/Kconfig
+++ b/drivers/thermal/Kconfig
@@ -78,7 +78,6 @@ config THERMAL_GOV_USER_SPACE
config CPU_THERMAL
bool "generic cpu cooling support"
depends on CPU_FREQ
- select CPU_FREQ_TABLE
help
This implements the generic cpu cooling mechanism through frequency
reduction. An ACPI version of this already exists
--
1.7.12.rc2.18.g61b472e
^ permalink raw reply related [flat|nested] 112+ messages in thread
* [PATCH V2 Resend 75/92] cpufreq: cpu0: use cpufreq_generic_init() routine
2013-10-03 14:57 [PATCH V2 Resend 00/92] CPUFreq Cleanup Series: Part II Viresh Kumar
` (73 preceding siblings ...)
2013-10-03 14:59 ` [PATCH V2 Resend 74/92] cpufreq: remove CONFIG_CPU_FREQ_TABLE Viresh Kumar
@ 2013-10-03 14:59 ` Viresh Kumar
2013-10-03 14:59 ` [PATCH V2 Resend 76/92] cpufreq: cris: " Viresh Kumar
` (15 subsequent siblings)
90 siblings, 0 replies; 112+ messages in thread
From: Viresh Kumar @ 2013-10-03 14:59 UTC (permalink / raw)
To: rjw; +Cc: cpufreq, linux-pm, Viresh Kumar, Shawn Guo
Use generic cpufreq_generic_init() routine instead of replicating the same code
here.
Cc: Shawn Guo <shawn.guo@linaro.org>
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
---
drivers/cpufreq/cpufreq-cpu0.c | 19 +------------------
1 file changed, 1 insertion(+), 18 deletions(-)
diff --git a/drivers/cpufreq/cpufreq-cpu0.c b/drivers/cpufreq/cpufreq-cpu0.c
index 69c880f..5f57acf 100644
--- a/drivers/cpufreq/cpufreq-cpu0.c
+++ b/drivers/cpufreq/cpufreq-cpu0.c
@@ -122,24 +122,7 @@ post_notify:
static int cpu0_cpufreq_init(struct cpufreq_policy *policy)
{
- int ret;
-
- ret = cpufreq_table_validate_and_show(policy, freq_table);
- if (ret) {
- pr_err("invalid frequency table: %d\n", ret);
- return ret;
- }
-
- policy->cpuinfo.transition_latency = transition_latency;
-
- /*
- * The driver only supports the SMP configuartion where all processors
- * share the clock and voltage and clock. Use cpufreq affected_cpus
- * interface to have all CPUs scaled together.
- */
- cpumask_setall(policy->cpus);
-
- return 0;
+ return cpufreq_generic_init(policy, freq_table, transition_latency);
}
static struct cpufreq_driver cpu0_cpufreq_driver = {
--
1.7.12.rc2.18.g61b472e
^ permalink raw reply related [flat|nested] 112+ messages in thread
* [PATCH V2 Resend 76/92] cpufreq: cris: use cpufreq_generic_init() routine
2013-10-03 14:57 [PATCH V2 Resend 00/92] CPUFreq Cleanup Series: Part II Viresh Kumar
` (74 preceding siblings ...)
2013-10-03 14:59 ` [PATCH V2 Resend 75/92] cpufreq: cpu0: use cpufreq_generic_init() routine Viresh Kumar
@ 2013-10-03 14:59 ` Viresh Kumar
2013-10-03 15:27 ` Jesper Nilsson
2013-10-03 14:59 ` [PATCH V2 Resend 77/92] cpufreq: davinci: " Viresh Kumar
` (14 subsequent siblings)
90 siblings, 1 reply; 112+ messages in thread
From: Viresh Kumar @ 2013-10-03 14:59 UTC (permalink / raw)
To: rjw
Cc: cpufreq, linux-pm, Viresh Kumar, Jesper Nilsson, Mikael Starvik,
linux-cris-kernel
Use generic cpufreq_generic_init() routine instead of replicating the same code
here.
Cc: Jesper Nilsson <jesper.nilsson@axis.com>
Cc: Mikael Starvik <starvik@axis.com>
Cc: linux-cris-kernel@axis.com
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
---
drivers/cpufreq/cris-artpec3-cpufreq.c | 6 +-----
drivers/cpufreq/cris-etraxfs-cpufreq.c | 5 +----
2 files changed, 2 insertions(+), 9 deletions(-)
diff --git a/drivers/cpufreq/cris-artpec3-cpufreq.c b/drivers/cpufreq/cris-artpec3-cpufreq.c
index 4d88e4f..05fdc7e 100644
--- a/drivers/cpufreq/cris-artpec3-cpufreq.c
+++ b/drivers/cpufreq/cris-artpec3-cpufreq.c
@@ -71,13 +71,9 @@ static int cris_freq_target(struct cpufreq_policy *policy,
static int cris_freq_cpu_init(struct cpufreq_policy *policy)
{
- /* cpuinfo and default policy values */
- policy->cpuinfo.transition_latency = 1000000; /* 1ms */
-
- return cpufreq_table_validate_and_show(policy, cris_freq_table);
+ return cpufreq_generic_init(policy, cris_freq_table, 1000000);
}
-
static struct cpufreq_driver cris_freq_driver = {
.get = cris_freq_get_cpu_frequency,
.verify = cpufreq_generic_frequency_table_verify,
diff --git a/drivers/cpufreq/cris-etraxfs-cpufreq.c b/drivers/cpufreq/cris-etraxfs-cpufreq.c
index f7d2d49..fac2b26 100644
--- a/drivers/cpufreq/cris-etraxfs-cpufreq.c
+++ b/drivers/cpufreq/cris-etraxfs-cpufreq.c
@@ -70,10 +70,7 @@ static int cris_freq_target(struct cpufreq_policy *policy,
static int cris_freq_cpu_init(struct cpufreq_policy *policy)
{
- /* cpuinfo and default policy values */
- policy->cpuinfo.transition_latency = 1000000; /* 1ms */
-
- return cpufreq_table_validate_and_show(policy, cris_freq_table);
+ return cpufreq_generic_init(policy, cris_freq_table, 1000000);
}
static struct cpufreq_driver cris_freq_driver = {
--
1.7.12.rc2.18.g61b472e
^ permalink raw reply related [flat|nested] 112+ messages in thread
* [PATCH V2 Resend 77/92] cpufreq: davinci: use cpufreq_generic_init() routine
2013-10-03 14:57 [PATCH V2 Resend 00/92] CPUFreq Cleanup Series: Part II Viresh Kumar
` (75 preceding siblings ...)
2013-10-03 14:59 ` [PATCH V2 Resend 76/92] cpufreq: cris: " Viresh Kumar
@ 2013-10-03 14:59 ` Viresh Kumar
2013-10-03 14:59 ` [PATCH V2 Resend 78/92] cpufreq: dbx500: " Viresh Kumar
` (13 subsequent siblings)
90 siblings, 0 replies; 112+ messages in thread
From: Viresh Kumar @ 2013-10-03 14:59 UTC (permalink / raw)
To: rjw; +Cc: cpufreq, linux-pm, Viresh Kumar, Sekhar Nori
Use generic cpufreq_generic_init() routine instead of replicating the same code
here.
Cc: Sekhar Nori <nsekhar@ti.com>
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
---
drivers/cpufreq/davinci-cpufreq.c | 10 +---------
1 file changed, 1 insertion(+), 9 deletions(-)
diff --git a/drivers/cpufreq/davinci-cpufreq.c b/drivers/cpufreq/davinci-cpufreq.c
index 7762efc..f3373e6 100644
--- a/drivers/cpufreq/davinci-cpufreq.c
+++ b/drivers/cpufreq/davinci-cpufreq.c
@@ -138,21 +138,13 @@ static int davinci_cpu_init(struct cpufreq_policy *policy)
return result;
}
- result = cpufreq_table_validate_and_show(policy, freq_table);
- if (result) {
- pr_err("%s: cpufreq_table_validate_and_show() failed",
- __func__);
- return result;
- }
-
/*
* Time measurement across the target() function yields ~1500-1800us
* time taken with no drivers on notification list.
* Setting the latency to 2000 us to accommodate addition of drivers
* to pre/post change notification list.
*/
- policy->cpuinfo.transition_latency = 2000 * 1000;
- return 0;
+ return cpufreq_generic_init(policy, freq_table, 2000 * 1000);
}
static struct cpufreq_driver davinci_driver = {
--
1.7.12.rc2.18.g61b472e
^ permalink raw reply related [flat|nested] 112+ messages in thread
* [PATCH V2 Resend 78/92] cpufreq: dbx500: use cpufreq_generic_init() routine
2013-10-03 14:57 [PATCH V2 Resend 00/92] CPUFreq Cleanup Series: Part II Viresh Kumar
` (76 preceding siblings ...)
2013-10-03 14:59 ` [PATCH V2 Resend 77/92] cpufreq: davinci: " Viresh Kumar
@ 2013-10-03 14:59 ` Viresh Kumar
2013-10-03 14:59 ` [PATCH V2 Resend 79/92] cpufreq: exynos: " Viresh Kumar
` (12 subsequent siblings)
90 siblings, 0 replies; 112+ messages in thread
From: Viresh Kumar @ 2013-10-03 14:59 UTC (permalink / raw)
To: rjw; +Cc: cpufreq, linux-pm, Viresh Kumar
Use generic cpufreq_generic_init() routine instead of replicating the same code
here.
Acked-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
---
drivers/cpufreq/dbx500-cpufreq.c | 21 +--------------------
1 file changed, 1 insertion(+), 20 deletions(-)
diff --git a/drivers/cpufreq/dbx500-cpufreq.c b/drivers/cpufreq/dbx500-cpufreq.c
index ae1aa60..a60f769 100644
--- a/drivers/cpufreq/dbx500-cpufreq.c
+++ b/drivers/cpufreq/dbx500-cpufreq.c
@@ -74,26 +74,7 @@ static unsigned int dbx500_cpufreq_getspeed(unsigned int cpu)
static int dbx500_cpufreq_init(struct cpufreq_policy *policy)
{
- int res;
-
- /* get policy fields based on the table */
- res = cpufreq_table_validate_and_show(policy, freq_table);
- if (res) {
- pr_err("dbx500-cpufreq: Failed to read policy table\n");
- return res;
- }
-
- /*
- * FIXME : Need to take time measurement across the target()
- * function with no/some/all drivers in the notification
- * list.
- */
- policy->cpuinfo.transition_latency = 20 * 1000; /* in ns */
-
- /* policy sharing between dual CPUs */
- cpumask_setall(policy->cpus);
-
- return 0;
+ return cpufreq_generic_init(policy, freq_table, 20 * 1000);
}
static struct cpufreq_driver dbx500_cpufreq_driver = {
--
1.7.12.rc2.18.g61b472e
^ permalink raw reply related [flat|nested] 112+ messages in thread
* [PATCH V2 Resend 79/92] cpufreq: exynos: use cpufreq_generic_init() routine
2013-10-03 14:57 [PATCH V2 Resend 00/92] CPUFreq Cleanup Series: Part II Viresh Kumar
` (77 preceding siblings ...)
2013-10-03 14:59 ` [PATCH V2 Resend 78/92] cpufreq: dbx500: " Viresh Kumar
@ 2013-10-03 14:59 ` Viresh Kumar
2013-10-03 14:59 ` [PATCH V2 Resend 80/92] cpufreq: imx6q: " Viresh Kumar
` (11 subsequent siblings)
90 siblings, 0 replies; 112+ messages in thread
From: Viresh Kumar @ 2013-10-03 14:59 UTC (permalink / raw)
To: rjw; +Cc: cpufreq, linux-pm, Viresh Kumar
Use generic cpufreq_generic_init() routine instead of replicating the same code
here.
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
---
drivers/cpufreq/exynos-cpufreq.c | 7 +------
drivers/cpufreq/exynos5440-cpufreq.c | 14 ++------------
2 files changed, 3 insertions(+), 18 deletions(-)
diff --git a/drivers/cpufreq/exynos-cpufreq.c b/drivers/cpufreq/exynos-cpufreq.c
index 5244086..b96fcc8 100644
--- a/drivers/cpufreq/exynos-cpufreq.c
+++ b/drivers/cpufreq/exynos-cpufreq.c
@@ -241,12 +241,7 @@ static struct notifier_block exynos_cpufreq_nb = {
static int exynos_cpufreq_cpu_init(struct cpufreq_policy *policy)
{
- /* set the transition latency value */
- policy->cpuinfo.transition_latency = 100000;
-
- cpumask_setall(policy->cpus);
-
- return cpufreq_table_validate_and_show(policy, exynos_info->freq_table);
+ return cpufreq_generic_init(policy, exynos_info->freq_table, 100000);
}
static struct cpufreq_driver exynos_driver = {
diff --git a/drivers/cpufreq/exynos5440-cpufreq.c b/drivers/cpufreq/exynos5440-cpufreq.c
index 9b7fdec..06b73e8 100644
--- a/drivers/cpufreq/exynos5440-cpufreq.c
+++ b/drivers/cpufreq/exynos5440-cpufreq.c
@@ -318,18 +318,8 @@ static void exynos_sort_descend_freq_table(void)
static int exynos_cpufreq_cpu_init(struct cpufreq_policy *policy)
{
- int ret;
-
- ret = cpufreq_table_validate_and_show(policy, dvfs_info->freq_table);
- if (ret) {
- dev_err(dvfs_info->dev, "Invalid frequency table: %d\n", ret);
- return ret;
- }
-
- policy->cpuinfo.transition_latency = dvfs_info->latency;
- cpumask_setall(policy->cpus);
-
- return 0;
+ return cpufreq_generic_init(policy, dvfs_info->freq_table,
+ dvfs_info->latency);
}
static struct cpufreq_driver exynos_driver = {
--
1.7.12.rc2.18.g61b472e
^ permalink raw reply related [flat|nested] 112+ messages in thread
* [PATCH V2 Resend 80/92] cpufreq: imx6q: use cpufreq_generic_init() routine
2013-10-03 14:57 [PATCH V2 Resend 00/92] CPUFreq Cleanup Series: Part II Viresh Kumar
` (78 preceding siblings ...)
2013-10-03 14:59 ` [PATCH V2 Resend 79/92] cpufreq: exynos: " Viresh Kumar
@ 2013-10-03 14:59 ` Viresh Kumar
2013-10-03 14:59 ` [PATCH V2 Resend 81/92] cpufreq: kirkwood: " Viresh Kumar
` (10 subsequent siblings)
90 siblings, 0 replies; 112+ messages in thread
From: Viresh Kumar @ 2013-10-03 14:59 UTC (permalink / raw)
To: rjw; +Cc: cpufreq, linux-pm, Viresh Kumar
Use generic cpufreq_generic_init() routine instead of replicating the same code
here.
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
---
drivers/cpufreq/imx6q-cpufreq.c | 13 +------------
1 file changed, 1 insertion(+), 12 deletions(-)
diff --git a/drivers/cpufreq/imx6q-cpufreq.c b/drivers/cpufreq/imx6q-cpufreq.c
index 9d22dfa..d81062f 100644
--- a/drivers/cpufreq/imx6q-cpufreq.c
+++ b/drivers/cpufreq/imx6q-cpufreq.c
@@ -154,18 +154,7 @@ post_notify:
static int imx6q_cpufreq_init(struct cpufreq_policy *policy)
{
- int ret;
-
- ret = cpufreq_table_validate_and_show(policy, freq_table);
- if (ret) {
- dev_err(cpu_dev, "invalid frequency table: %d\n", ret);
- return ret;
- }
-
- policy->cpuinfo.transition_latency = transition_latency;
- cpumask_setall(policy->cpus);
-
- return 0;
+ return cpufreq_generic_init(policy, freq_table, transition_latency);
}
static struct cpufreq_driver imx6q_cpufreq_driver = {
--
1.7.12.rc2.18.g61b472e
^ permalink raw reply related [flat|nested] 112+ messages in thread
* [PATCH V2 Resend 81/92] cpufreq: kirkwood: use cpufreq_generic_init() routine
2013-10-03 14:57 [PATCH V2 Resend 00/92] CPUFreq Cleanup Series: Part II Viresh Kumar
` (79 preceding siblings ...)
2013-10-03 14:59 ` [PATCH V2 Resend 80/92] cpufreq: imx6q: " Viresh Kumar
@ 2013-10-03 14:59 ` Viresh Kumar
2013-10-03 14:59 ` [PATCH V2 Resend 82/92] cpufreq: loongson2: " Viresh Kumar
` (9 subsequent siblings)
90 siblings, 0 replies; 112+ messages in thread
From: Viresh Kumar @ 2013-10-03 14:59 UTC (permalink / raw)
To: rjw; +Cc: cpufreq, linux-pm, Viresh Kumar
Use generic cpufreq_generic_init() routine instead of replicating the same code
here.
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
---
drivers/cpufreq/kirkwood-cpufreq.c | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/drivers/cpufreq/kirkwood-cpufreq.c b/drivers/cpufreq/kirkwood-cpufreq.c
index dc434c4..fff8653 100644
--- a/drivers/cpufreq/kirkwood-cpufreq.c
+++ b/drivers/cpufreq/kirkwood-cpufreq.c
@@ -120,10 +120,7 @@ static int kirkwood_cpufreq_target(struct cpufreq_policy *policy,
/* Module init and exit code */
static int kirkwood_cpufreq_cpu_init(struct cpufreq_policy *policy)
{
- /* cpuinfo and default policy values */
- policy->cpuinfo.transition_latency = 5000; /* 5uS */
-
- return cpufreq_table_validate_and_show(policy, kirkwood_freq_table);
+ return cpufreq_generic_init(policy, kirkwood_freq_table, 5000);
}
static struct cpufreq_driver kirkwood_cpufreq_driver = {
--
1.7.12.rc2.18.g61b472e
^ permalink raw reply related [flat|nested] 112+ messages in thread
* [PATCH V2 Resend 82/92] cpufreq: loongson2: use cpufreq_generic_init() routine
2013-10-03 14:57 [PATCH V2 Resend 00/92] CPUFreq Cleanup Series: Part II Viresh Kumar
` (80 preceding siblings ...)
2013-10-03 14:59 ` [PATCH V2 Resend 81/92] cpufreq: kirkwood: " Viresh Kumar
@ 2013-10-03 14:59 ` Viresh Kumar
2013-10-03 14:59 ` [PATCH V2 Resend 83/92] cpufreq: maple: " Viresh Kumar
` (8 subsequent siblings)
90 siblings, 0 replies; 112+ messages in thread
From: Viresh Kumar @ 2013-10-03 14:59 UTC (permalink / raw)
To: rjw; +Cc: cpufreq, linux-pm, Viresh Kumar
Use generic cpufreq_generic_init() routine instead of replicating the same code
here. This driver wasn't setting transition_latency and so is getting set to 0
by default. Lets mark it explicitly by calling the generic routine with
transition_latency as 0.
Acked-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
---
drivers/cpufreq/loongson2_cpufreq.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/cpufreq/loongson2_cpufreq.c b/drivers/cpufreq/loongson2_cpufreq.c
index dd4f3e4..2c8ec8e 100644
--- a/drivers/cpufreq/loongson2_cpufreq.c
+++ b/drivers/cpufreq/loongson2_cpufreq.c
@@ -131,8 +131,7 @@ static int loongson2_cpufreq_cpu_init(struct cpufreq_policy *policy)
return ret;
}
- return cpufreq_table_validate_and_show(policy,
- &loongson2_clockmod_table[0]);
+ return cpufreq_generic_init(policy, &loongson2_clockmod_table[0], 0);
}
static int loongson2_cpufreq_exit(struct cpufreq_policy *policy)
--
1.7.12.rc2.18.g61b472e
^ permalink raw reply related [flat|nested] 112+ messages in thread
* [PATCH V2 Resend 83/92] cpufreq: maple: use cpufreq_generic_init() routine
2013-10-03 14:57 [PATCH V2 Resend 00/92] CPUFreq Cleanup Series: Part II Viresh Kumar
` (81 preceding siblings ...)
2013-10-03 14:59 ` [PATCH V2 Resend 82/92] cpufreq: loongson2: " Viresh Kumar
@ 2013-10-03 14:59 ` Viresh Kumar
2013-10-03 14:59 ` [PATCH V2 Resend 84/92] cpufreq: omap: " Viresh Kumar
` (7 subsequent siblings)
90 siblings, 0 replies; 112+ messages in thread
From: Viresh Kumar @ 2013-10-03 14:59 UTC (permalink / raw)
To: rjw; +Cc: cpufreq, linux-pm, Viresh Kumar
Use generic cpufreq_generic_init() routine instead of replicating the same code
here.
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
---
drivers/cpufreq/maple-cpufreq.c | 9 +--------
1 file changed, 1 insertion(+), 8 deletions(-)
diff --git a/drivers/cpufreq/maple-cpufreq.c b/drivers/cpufreq/maple-cpufreq.c
index 1c0cec1..eb1e176 100644
--- a/drivers/cpufreq/maple-cpufreq.c
+++ b/drivers/cpufreq/maple-cpufreq.c
@@ -165,16 +165,9 @@ static unsigned int maple_cpufreq_get_speed(unsigned int cpu)
static int maple_cpufreq_cpu_init(struct cpufreq_policy *policy)
{
- policy->cpuinfo.transition_latency = 12000;
- /* secondary CPUs are tied to the primary one by the
- * cpufreq core if in the secondary policy we tell it that
- * it actually must be one policy together with all others. */
- cpumask_setall(policy->cpus);
-
- return cpufreq_table_validate_and_show(policy, maple_cpu_freqs);
+ return cpufreq_generic_init(policy, maple_cpu_freqs, 12000);
}
-
static struct cpufreq_driver maple_cpufreq_driver = {
.name = "maple",
.flags = CPUFREQ_CONST_LOOPS,
--
1.7.12.rc2.18.g61b472e
^ permalink raw reply related [flat|nested] 112+ messages in thread
* [PATCH V2 Resend 84/92] cpufreq: omap: use cpufreq_generic_init() routine
2013-10-03 14:57 [PATCH V2 Resend 00/92] CPUFreq Cleanup Series: Part II Viresh Kumar
` (82 preceding siblings ...)
2013-10-03 14:59 ` [PATCH V2 Resend 83/92] cpufreq: maple: " Viresh Kumar
@ 2013-10-03 14:59 ` Viresh Kumar
2013-10-03 14:59 ` [PATCH V2 Resend 85/92] cpufreq: pasemi: " Viresh Kumar
` (6 subsequent siblings)
90 siblings, 0 replies; 112+ messages in thread
From: Viresh Kumar @ 2013-10-03 14:59 UTC (permalink / raw)
To: rjw; +Cc: cpufreq, linux-pm, Viresh Kumar, Santosh Shilimkar
Use generic cpufreq_generic_init() routine instead of replicating the same code
here.
This also rearranges the code a bit to make it more sensible. Also removes some
unnecessary checks.
Cc: Santosh Shilimkar <santosh.shilimkar@ti.com>
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
---
drivers/cpufreq/omap-cpufreq.c | 41 +++++++++++------------------------------
1 file changed, 11 insertions(+), 30 deletions(-)
diff --git a/drivers/cpufreq/omap-cpufreq.c b/drivers/cpufreq/omap-cpufreq.c
index a8c3f90..58b2200 100644
--- a/drivers/cpufreq/omap-cpufreq.c
+++ b/drivers/cpufreq/omap-cpufreq.c
@@ -160,50 +160,31 @@ static inline void freq_table_free(void)
static int omap_cpu_init(struct cpufreq_policy *policy)
{
- int result = 0;
+ int result;
mpu_clk = clk_get(NULL, "cpufreq_ck");
if (IS_ERR(mpu_clk))
return PTR_ERR(mpu_clk);
- if (policy->cpu >= NR_CPUS) {
- result = -EINVAL;
- goto fail_ck;
- }
-
- if (!freq_table)
+ if (!freq_table) {
result = opp_init_cpufreq_table(mpu_dev, &freq_table);
-
- if (result) {
- dev_err(mpu_dev, "%s: cpu%d: failed creating freq table[%d]\n",
+ if (result) {
+ dev_err(mpu_dev,
+ "%s: cpu%d: failed creating freq table[%d]\n",
__func__, policy->cpu, result);
- goto fail_ck;
+ goto fail;
+ }
}
atomic_inc_return(&freq_table_users);
- result = cpufreq_table_validate_and_show(policy, freq_table);
- if (result)
- goto fail_table;
-
- /*
- * On OMAP SMP configuartion, both processors share the voltage
- * and clock. So both CPUs needs to be scaled together and hence
- * needs software co-ordination. Use cpufreq affected_cpus
- * interface to handle this scenario. Additional is_smp() check
- * is to keep SMP_ON_UP build working.
- */
- if (is_smp())
- cpumask_setall(policy->cpus);
-
/* FIXME: what's the actual transition time? */
- policy->cpuinfo.transition_latency = 300 * 1000;
-
- return 0;
+ result = cpufreq_generic_init(policy, freq_table, 300 * 1000);
+ if (!result)
+ return 0;
-fail_table:
freq_table_free();
-fail_ck:
+fail:
clk_put(mpu_clk);
return result;
}
--
1.7.12.rc2.18.g61b472e
^ permalink raw reply related [flat|nested] 112+ messages in thread
* [PATCH V2 Resend 85/92] cpufreq: pasemi: use cpufreq_generic_init() routine
2013-10-03 14:57 [PATCH V2 Resend 00/92] CPUFreq Cleanup Series: Part II Viresh Kumar
` (83 preceding siblings ...)
2013-10-03 14:59 ` [PATCH V2 Resend 84/92] cpufreq: omap: " Viresh Kumar
@ 2013-10-03 14:59 ` Viresh Kumar
2013-10-03 14:59 ` [PATCH V2 Resend 86/92] cpufreq: pmac32: " Viresh Kumar
` (5 subsequent siblings)
90 siblings, 0 replies; 112+ messages in thread
From: Viresh Kumar @ 2013-10-03 14:59 UTC (permalink / raw)
To: rjw; +Cc: cpufreq, linux-pm, Viresh Kumar
Use generic cpufreq_generic_init() routine instead of replicating the same code
here.
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
---
drivers/cpufreq/pasemi-cpufreq.c | 9 +--------
1 file changed, 1 insertion(+), 8 deletions(-)
diff --git a/drivers/cpufreq/pasemi-cpufreq.c b/drivers/cpufreq/pasemi-cpufreq.c
index 16f2508..1cca332 100644
--- a/drivers/cpufreq/pasemi-cpufreq.c
+++ b/drivers/cpufreq/pasemi-cpufreq.c
@@ -204,20 +204,13 @@ static int pas_cpufreq_cpu_init(struct cpufreq_policy *policy)
pr_debug("%d: %d\n", i, pas_freqs[i].frequency);
}
- policy->cpuinfo.transition_latency = get_gizmo_latency();
-
cur_astate = get_cur_astate(policy->cpu);
pr_debug("current astate is at %d\n",cur_astate);
policy->cur = pas_freqs[cur_astate].frequency;
- cpumask_copy(policy->cpus, cpu_online_mask);
-
ppc_proc_freq = policy->cur * 1000ul;
- /* this ensures that policy->cpuinfo_min and policy->cpuinfo_max
- * are set correctly
- */
- return cpufreq_table_validate_and_show(policy, pas_freqs);
+ return cpufreq_generic_init(policy, pas_freqs, get_gizmo_latency());
out_unmap_sdcpwr:
iounmap(sdcpwr_mapbase);
--
1.7.12.rc2.18.g61b472e
^ permalink raw reply related [flat|nested] 112+ messages in thread
* [PATCH V2 Resend 86/92] cpufreq: pmac32: use cpufreq_generic_init() routine
2013-10-03 14:57 [PATCH V2 Resend 00/92] CPUFreq Cleanup Series: Part II Viresh Kumar
` (84 preceding siblings ...)
2013-10-03 14:59 ` [PATCH V2 Resend 85/92] cpufreq: pasemi: " Viresh Kumar
@ 2013-10-03 14:59 ` Viresh Kumar
2013-10-03 14:59 ` [PATCH V2 Resend 87/92] cpufreq: pmac64: " Viresh Kumar
` (4 subsequent siblings)
90 siblings, 0 replies; 112+ messages in thread
From: Viresh Kumar @ 2013-10-03 14:59 UTC (permalink / raw)
To: rjw; +Cc: cpufreq, linux-pm, Viresh Kumar, Benjamin Herrenschmidt
Use generic cpufreq_generic_init() routine instead of replicating the same code
here.
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
---
drivers/cpufreq/pmac32-cpufreq.c | 7 +------
1 file changed, 1 insertion(+), 6 deletions(-)
diff --git a/drivers/cpufreq/pmac32-cpufreq.c b/drivers/cpufreq/pmac32-cpufreq.c
index 672b7f4..6eac1e2 100644
--- a/drivers/cpufreq/pmac32-cpufreq.c
+++ b/drivers/cpufreq/pmac32-cpufreq.c
@@ -392,12 +392,7 @@ static int pmac_cpufreq_target( struct cpufreq_policy *policy,
static int pmac_cpufreq_cpu_init(struct cpufreq_policy *policy)
{
- if (policy->cpu != 0)
- return -ENODEV;
-
- policy->cpuinfo.transition_latency = transition_latency;
-
- return cpufreq_table_validate_and_show(policy, pmac_cpu_freqs);
+ return cpufreq_generic_init(policy, pmac_cpu_freqs, transition_latency);
}
static u32 read_gpio(struct device_node *np)
--
1.7.12.rc2.18.g61b472e
^ permalink raw reply related [flat|nested] 112+ messages in thread
* [PATCH V2 Resend 87/92] cpufreq: pmac64: use cpufreq_generic_init() routine
2013-10-03 14:57 [PATCH V2 Resend 00/92] CPUFreq Cleanup Series: Part II Viresh Kumar
` (85 preceding siblings ...)
2013-10-03 14:59 ` [PATCH V2 Resend 86/92] cpufreq: pmac32: " Viresh Kumar
@ 2013-10-03 14:59 ` Viresh Kumar
2013-10-03 14:59 ` [PATCH V2 Resend 88/92] cpufreq: s3c: " Viresh Kumar
` (3 subsequent siblings)
90 siblings, 0 replies; 112+ messages in thread
From: Viresh Kumar @ 2013-10-03 14:59 UTC (permalink / raw)
To: rjw; +Cc: cpufreq, linux-pm, Viresh Kumar
Use generic cpufreq_generic_init() routine instead of replicating the same code
here.
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
---
drivers/cpufreq/pmac64-cpufreq.c | 9 +--------
1 file changed, 1 insertion(+), 8 deletions(-)
diff --git a/drivers/cpufreq/pmac64-cpufreq.c b/drivers/cpufreq/pmac64-cpufreq.c
index 79e40c9..b977b9a 100644
--- a/drivers/cpufreq/pmac64-cpufreq.c
+++ b/drivers/cpufreq/pmac64-cpufreq.c
@@ -347,16 +347,9 @@ static unsigned int g5_cpufreq_get_speed(unsigned int cpu)
static int g5_cpufreq_cpu_init(struct cpufreq_policy *policy)
{
- policy->cpuinfo.transition_latency = transition_latency;
- /* secondary CPUs are tied to the primary one by the
- * cpufreq core if in the secondary policy we tell it that
- * it actually must be one policy together with all others. */
- cpumask_copy(policy->cpus, cpu_online_mask);
-
- return cpufreq_table_validate_and_show(policy, g5_cpu_freqs);
+ return cpufreq_generic_init(policy, g5_cpu_freqs, transition_latency);
}
-
static struct cpufreq_driver g5_cpufreq_driver = {
.name = "powermac",
.flags = CPUFREQ_CONST_LOOPS,
--
1.7.12.rc2.18.g61b472e
^ permalink raw reply related [flat|nested] 112+ messages in thread
* [PATCH V2 Resend 88/92] cpufreq: s3c: use cpufreq_generic_init() routine
2013-10-03 14:57 [PATCH V2 Resend 00/92] CPUFreq Cleanup Series: Part II Viresh Kumar
` (86 preceding siblings ...)
2013-10-03 14:59 ` [PATCH V2 Resend 87/92] cpufreq: pmac64: " Viresh Kumar
@ 2013-10-03 14:59 ` Viresh Kumar
2013-10-03 14:59 ` [PATCH V2 Resend 89/92] cpufreq: s5pv210: " Viresh Kumar
` (2 subsequent siblings)
90 siblings, 0 replies; 112+ messages in thread
From: Viresh Kumar @ 2013-10-03 14:59 UTC (permalink / raw)
To: rjw; +Cc: cpufreq, linux-pm, Viresh Kumar
Use generic cpufreq_generic_init() routine instead of replicating the same code
here.
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
---
drivers/cpufreq/s3c2416-cpufreq.c | 6 ++----
drivers/cpufreq/s3c24xx-cpufreq.c | 13 +------------
drivers/cpufreq/s3c64xx-cpufreq.c | 5 ++---
3 files changed, 5 insertions(+), 19 deletions(-)
diff --git a/drivers/cpufreq/s3c2416-cpufreq.c b/drivers/cpufreq/s3c2416-cpufreq.c
index 22c4c2d..26a35d1 100644
--- a/drivers/cpufreq/s3c2416-cpufreq.c
+++ b/drivers/cpufreq/s3c2416-cpufreq.c
@@ -479,10 +479,8 @@ static int __init s3c2416_cpufreq_driver_init(struct cpufreq_policy *policy)
/* Datasheet says PLL stabalisation time must be at least 300us,
* so but add some fudge. (reference in LOCKCON0 register description)
*/
- policy->cpuinfo.transition_latency = (500 * 1000) +
- s3c_freq->regulator_latency;
-
- ret = cpufreq_table_validate_and_show(policy, s3c_freq->freq_table);
+ ret = cpufreq_generic_init(policy, s3c_freq->freq_table,
+ (500 * 1000) + s3c_freq->regulator_latency);
if (ret)
goto err_freq_table;
diff --git a/drivers/cpufreq/s3c24xx-cpufreq.c b/drivers/cpufreq/s3c24xx-cpufreq.c
index e0fbaef..4850882 100644
--- a/drivers/cpufreq/s3c24xx-cpufreq.c
+++ b/drivers/cpufreq/s3c24xx-cpufreq.c
@@ -373,18 +373,7 @@ struct clk *s3c_cpufreq_clk_get(struct device *dev, const char *name)
static int s3c_cpufreq_init(struct cpufreq_policy *policy)
{
- printk(KERN_INFO "%s: initialising policy %p\n", __func__, policy);
-
- if (policy->cpu != 0)
- return -EINVAL;
-
- /* feed the latency information from the cpu driver */
- policy->cpuinfo.transition_latency = cpu_cur.info->latency;
-
- if (ftab)
- return cpufreq_table_validate_and_show(policy, ftab);
-
- return 0;
+ return cpufreq_generic_init(policy, ftab, cpu_cur.info->latency);
}
static int __init s3c_cpufreq_initclks(void)
diff --git a/drivers/cpufreq/s3c64xx-cpufreq.c b/drivers/cpufreq/s3c64xx-cpufreq.c
index a66cfa3..16dc315 100644
--- a/drivers/cpufreq/s3c64xx-cpufreq.c
+++ b/drivers/cpufreq/s3c64xx-cpufreq.c
@@ -239,9 +239,8 @@ static int s3c64xx_cpufreq_driver_init(struct cpufreq_policy *policy)
* the PLLs, which we don't currently) is ~300us worst case,
* but add some fudge.
*/
- policy->cpuinfo.transition_latency = (500 * 1000) + regulator_latency;
-
- ret = cpufreq_table_validate_and_show(policy, s3c64xx_freq_table);
+ ret = cpufreq_generic_init(policy, s3c64xx_freq_table,
+ (500 * 1000) + regulator_latency);
if (ret != 0) {
pr_err("Failed to configure frequency table: %d\n",
ret);
--
1.7.12.rc2.18.g61b472e
^ permalink raw reply related [flat|nested] 112+ messages in thread
* [PATCH V2 Resend 89/92] cpufreq: s5pv210: use cpufreq_generic_init() routine
2013-10-03 14:57 [PATCH V2 Resend 00/92] CPUFreq Cleanup Series: Part II Viresh Kumar
` (87 preceding siblings ...)
2013-10-03 14:59 ` [PATCH V2 Resend 88/92] cpufreq: s3c: " Viresh Kumar
@ 2013-10-03 14:59 ` Viresh Kumar
2013-10-03 15:12 ` [PATCH V2 Resend 90/92] cpufreq: sa11x0: " Viresh Kumar
2013-10-11 13:27 ` [PATCH V2 Resend 00/92] CPUFreq Cleanup Series: Part II Rafael J. Wysocki
90 siblings, 0 replies; 112+ messages in thread
From: Viresh Kumar @ 2013-10-03 14:59 UTC (permalink / raw)
To: rjw; +Cc: cpufreq, linux-pm, Viresh Kumar
Use generic cpufreq_generic_init() routine instead of replicating the same code
here.
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
---
drivers/cpufreq/s5pv210-cpufreq.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/drivers/cpufreq/s5pv210-cpufreq.c b/drivers/cpufreq/s5pv210-cpufreq.c
index 30d9bb7..600b4f4 100644
--- a/drivers/cpufreq/s5pv210-cpufreq.c
+++ b/drivers/cpufreq/s5pv210-cpufreq.c
@@ -543,9 +543,7 @@ static int __init s5pv210_cpu_init(struct cpufreq_policy *policy)
s5pv210_dram_conf[1].refresh = (__raw_readl(S5P_VA_DMC1 + 0x30) * 1000);
s5pv210_dram_conf[1].freq = clk_get_rate(dmc1_clk);
- policy->cpuinfo.transition_latency = 40000;
-
- return cpufreq_table_validate_and_show(policy, s5pv210_freq_table);
+ return cpufreq_generic_init(policy, s5pv210_freq_table, 40000);
out_dmc1:
clk_put(dmc0_clk);
--
1.7.12.rc2.18.g61b472e
^ permalink raw reply related [flat|nested] 112+ messages in thread
* [PATCH V2 Resend 90/92] cpufreq: sa11x0: use cpufreq_generic_init() routine
2013-10-03 14:57 [PATCH V2 Resend 00/92] CPUFreq Cleanup Series: Part II Viresh Kumar
` (88 preceding siblings ...)
2013-10-03 14:59 ` [PATCH V2 Resend 89/92] cpufreq: s5pv210: " Viresh Kumar
@ 2013-10-03 15:12 ` Viresh Kumar
2013-10-03 15:12 ` [PATCH V2 Resend 91/92] cpufreq: spear: " Viresh Kumar
2013-10-03 15:12 ` [PATCH V2 Resend 92/92] cpufreq: tegra: " Viresh Kumar
2013-10-11 13:27 ` [PATCH V2 Resend 00/92] CPUFreq Cleanup Series: Part II Rafael J. Wysocki
90 siblings, 2 replies; 112+ messages in thread
From: Viresh Kumar @ 2013-10-03 15:12 UTC (permalink / raw)
To: rjw; +Cc: cpufreq, linux-pm, Viresh Kumar
Use generic cpufreq_generic_init() routine instead of replicating the same code
here.
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
---
drivers/cpufreq/sa1100-cpufreq.c | 6 +-----
drivers/cpufreq/sa1110-cpufreq.c | 6 +-----
2 files changed, 2 insertions(+), 10 deletions(-)
diff --git a/drivers/cpufreq/sa1100-cpufreq.c b/drivers/cpufreq/sa1100-cpufreq.c
index a1d1bb7..b282cea 100644
--- a/drivers/cpufreq/sa1100-cpufreq.c
+++ b/drivers/cpufreq/sa1100-cpufreq.c
@@ -218,11 +218,7 @@ static int sa1100_target(struct cpufreq_policy *policy,
static int __init sa1100_cpu_init(struct cpufreq_policy *policy)
{
- if (policy->cpu != 0)
- return -EINVAL;
- policy->cpuinfo.transition_latency = CPUFREQ_ETERNAL;
-
- return cpufreq_table_validate_and_show(policy, sa11x0_freq_table);
+ return cpufreq_generic_init(policy, sa11x0_freq_table, CPUFREQ_ETERNAL);
}
static struct cpufreq_driver sa1100_driver __refdata = {
diff --git a/drivers/cpufreq/sa1110-cpufreq.c b/drivers/cpufreq/sa1110-cpufreq.c
index 9da940e..bca04c0 100644
--- a/drivers/cpufreq/sa1110-cpufreq.c
+++ b/drivers/cpufreq/sa1110-cpufreq.c
@@ -332,11 +332,7 @@ static int sa1110_target(struct cpufreq_policy *policy,
static int __init sa1110_cpu_init(struct cpufreq_policy *policy)
{
- if (policy->cpu != 0)
- return -EINVAL;
- policy->cpuinfo.transition_latency = CPUFREQ_ETERNAL;
-
- return cpufreq_table_validate_and_show(policy, sa11x0_freq_table);
+ return cpufreq_generic_init(policy, sa11x0_freq_table, CPUFREQ_ETERNAL);
}
/* sa1110_driver needs __refdata because it must remain after init registers
--
1.7.12.rc2.18.g61b472e
^ permalink raw reply related [flat|nested] 112+ messages in thread
* [PATCH V2 Resend 91/92] cpufreq: spear: use cpufreq_generic_init() routine
2013-10-03 15:12 ` [PATCH V2 Resend 90/92] cpufreq: sa11x0: " Viresh Kumar
@ 2013-10-03 15:12 ` Viresh Kumar
2013-10-03 15:12 ` [PATCH V2 Resend 92/92] cpufreq: tegra: " Viresh Kumar
1 sibling, 0 replies; 112+ messages in thread
From: Viresh Kumar @ 2013-10-03 15:12 UTC (permalink / raw)
To: rjw; +Cc: cpufreq, linux-pm, Viresh Kumar
Use generic cpufreq_generic_init() routine instead of replicating the same code
here.
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
---
drivers/cpufreq/spear-cpufreq.c | 14 ++------------
1 file changed, 2 insertions(+), 12 deletions(-)
diff --git a/drivers/cpufreq/spear-cpufreq.c b/drivers/cpufreq/spear-cpufreq.c
index 34f04f4..8841366 100644
--- a/drivers/cpufreq/spear-cpufreq.c
+++ b/drivers/cpufreq/spear-cpufreq.c
@@ -171,18 +171,8 @@ static int spear_cpufreq_target(struct cpufreq_policy *policy,
static int spear_cpufreq_init(struct cpufreq_policy *policy)
{
- int ret;
-
- ret = cpufreq_table_validate_and_show(policy, spear_cpufreq.freq_tbl);
- if (ret) {
- pr_err("cpufreq_table_validate_and_show() failed");
- return ret;
- }
-
- policy->cpuinfo.transition_latency = spear_cpufreq.transition_latency;
- cpumask_setall(policy->cpus);
-
- return 0;
+ return cpufreq_generic_init(policy, spear_cpufreq.freq_tbl,
+ spear_cpufreq.transition_latency);
}
static struct cpufreq_driver spear_cpufreq_driver = {
--
1.7.12.rc2.18.g61b472e
^ permalink raw reply related [flat|nested] 112+ messages in thread
* [PATCH V2 Resend 92/92] cpufreq: tegra: use cpufreq_generic_init() routine
2013-10-03 15:12 ` [PATCH V2 Resend 90/92] cpufreq: sa11x0: " Viresh Kumar
2013-10-03 15:12 ` [PATCH V2 Resend 91/92] cpufreq: spear: " Viresh Kumar
@ 2013-10-03 15:12 ` Viresh Kumar
1 sibling, 0 replies; 112+ messages in thread
From: Viresh Kumar @ 2013-10-03 15:12 UTC (permalink / raw)
To: rjw; +Cc: cpufreq, linux-pm, Viresh Kumar
Use generic cpufreq_generic_init() routine instead of replicating the same code
here.
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
---
drivers/cpufreq/tegra-cpufreq.c | 13 +++++++++----
1 file changed, 9 insertions(+), 4 deletions(-)
diff --git a/drivers/cpufreq/tegra-cpufreq.c b/drivers/cpufreq/tegra-cpufreq.c
index 9c32b23..32483ef 100644
--- a/drivers/cpufreq/tegra-cpufreq.c
+++ b/drivers/cpufreq/tegra-cpufreq.c
@@ -204,19 +204,23 @@ static struct notifier_block tegra_cpu_pm_notifier = {
static int tegra_cpu_init(struct cpufreq_policy *policy)
{
+ int ret;
+
if (policy->cpu >= NUM_CPUS)
return -EINVAL;
clk_prepare_enable(emc_clk);
clk_prepare_enable(cpu_clk);
- cpufreq_table_validate_and_show(policy, freq_table);
target_cpu_speed[policy->cpu] = tegra_getspeed(policy->cpu);
/* FIXME: what's the actual transition time? */
- policy->cpuinfo.transition_latency = 300 * 1000;
-
- cpumask_copy(policy->cpus, cpu_possible_mask);
+ ret = cpufreq_generic_init(policy, freq_table, 300 * 1000);
+ if (ret) {
+ clk_disable_unprepare(cpu_clk);
+ clk_disable_unprepare(emc_clk);
+ return ret;
+ }
if (policy->cpu == 0)
register_pm_notifier(&tegra_cpu_pm_notifier);
@@ -227,6 +231,7 @@ static int tegra_cpu_init(struct cpufreq_policy *policy)
static int tegra_cpu_exit(struct cpufreq_policy *policy)
{
cpufreq_frequency_table_put_attr(policy->cpu);
+ clk_disable_unprepare(cpu_clk);
clk_disable_unprepare(emc_clk);
return 0;
}
--
1.7.12.rc2.18.g61b472e
^ permalink raw reply related [flat|nested] 112+ messages in thread
* Re: [PATCH V2 Resend 07/92] cpufreq: cris: Use generic cpufreq routines
2013-10-03 14:58 ` [PATCH V2 Resend 07/92] cpufreq: cris: " Viresh Kumar
@ 2013-10-03 15:25 ` Jesper Nilsson
2013-10-03 15:46 ` Viresh Kumar
0 siblings, 1 reply; 112+ messages in thread
From: Jesper Nilsson @ 2013-10-03 15:25 UTC (permalink / raw)
To: Viresh Kumar
Cc: rjw@sisk.pl, cpufreq@vger.kernel.org, linux-pm@vger.kernel.org,
Jesper Nilsson, Mikael Starvik, linux-cris-kernel
On Thu, Oct 03, 2013 at 04:58:01PM +0200, Viresh Kumar wrote:
> Most of the CPUFreq drivers do similar things in .exit() and .verify() routines
> and .attr. So its better if we have generic routines for them which can be used
> by cpufreq drivers then.
>
> This patch uses these generic routines for this driver.
You should already have gotten my Acked-by: for this series, but here it is again:
Acked-by: Jesper Nilsson <jesper.nilsson@axis.com>
> Cc: Mikael Starvik <starvik@axis.com>
> Cc: linux-cris-kernel@axis.com
> Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
> ---
> drivers/cpufreq/cris-artpec3-cpufreq.c | 23 +++--------------------
> drivers/cpufreq/cris-etraxfs-cpufreq.c | 22 +++-------------------
> 2 files changed, 6 insertions(+), 39 deletions(-)
>
> diff --git a/drivers/cpufreq/cris-artpec3-cpufreq.c b/drivers/cpufreq/cris-artpec3-cpufreq.c
> index 444fd96..d26f4e4 100644
> --- a/drivers/cpufreq/cris-artpec3-cpufreq.c
> +++ b/drivers/cpufreq/cris-artpec3-cpufreq.c
> @@ -54,11 +54,6 @@ static void cris_freq_set_cpu_state(struct cpufreq_policy *policy,
> cpufreq_notify_transition(policy, &freqs, CPUFREQ_POSTCHANGE);
> };
>
> -static int cris_freq_verify(struct cpufreq_policy *policy)
> -{
> - return cpufreq_frequency_table_verify(policy, &cris_freq_table[0]);
> -}
> -
> static int cris_freq_target(struct cpufreq_policy *policy,
> unsigned int target_freq,
> unsigned int relation)
> @@ -84,26 +79,14 @@ static int cris_freq_cpu_init(struct cpufreq_policy *policy)
> }
>
>
> -static int cris_freq_cpu_exit(struct cpufreq_policy *policy)
> -{
> - cpufreq_frequency_table_put_attr(policy->cpu);
> - return 0;
> -}
> -
> -
> -static struct freq_attr *cris_freq_attr[] = {
> - &cpufreq_freq_attr_scaling_available_freqs,
> - NULL,
> -};
> -
> static struct cpufreq_driver cris_freq_driver = {
> .get = cris_freq_get_cpu_frequency,
> - .verify = cris_freq_verify,
> + .verify = cpufreq_generic_frequency_table_verify,
> .target = cris_freq_target,
> .init = cris_freq_cpu_init,
> - .exit = cris_freq_cpu_exit,
> + .exit = cpufreq_generic_exit,
> .name = "cris_freq",
> - .attr = cris_freq_attr,
> + .attr = cpufreq_generic_attr,
> };
>
> static int __init cris_freq_init(void)
> diff --git a/drivers/cpufreq/cris-etraxfs-cpufreq.c b/drivers/cpufreq/cris-etraxfs-cpufreq.c
> index 428395e..d384e63 100644
> --- a/drivers/cpufreq/cris-etraxfs-cpufreq.c
> +++ b/drivers/cpufreq/cris-etraxfs-cpufreq.c
> @@ -54,11 +54,6 @@ static void cris_freq_set_cpu_state(struct cpufreq_policy *policy,
> cpufreq_notify_transition(policy, &freqs, CPUFREQ_POSTCHANGE);
> };
>
> -static int cris_freq_verify(struct cpufreq_policy *policy)
> -{
> - return cpufreq_frequency_table_verify(policy, &cris_freq_table[0]);
> -}
> -
> static int cris_freq_target(struct cpufreq_policy *policy,
> unsigned int target_freq, unsigned int relation)
> {
> @@ -82,25 +77,14 @@ static int cris_freq_cpu_init(struct cpufreq_policy *policy)
> return cpufreq_table_validate_and_show(policy, cris_freq_table);
> }
>
> -static int cris_freq_cpu_exit(struct cpufreq_policy *policy)
> -{
> - cpufreq_frequency_table_put_attr(policy->cpu);
> - return 0;
> -}
> -
> -static struct freq_attr *cris_freq_attr[] = {
> - &cpufreq_freq_attr_scaling_available_freqs,
> - NULL,
> -};
> -
> static struct cpufreq_driver cris_freq_driver = {
> .get = cris_freq_get_cpu_frequency,
> - .verify = cris_freq_verify,
> + .verify = cpufreq_generic_frequency_table_verify,
> .target = cris_freq_target,
> .init = cris_freq_cpu_init,
> - .exit = cris_freq_cpu_exit,
> + .exit = cpufreq_generic_exit,
> .name = "cris_freq",
> - .attr = cris_freq_attr,
> + .attr = cpufreq_generic_attr,
> };
>
> static int __init cris_freq_init(void)
> --
> 1.7.12.rc2.18.g61b472e
/^JN - Jesper Nilsson
--
Jesper Nilsson -- jesper.nilsson@axis.com
^ permalink raw reply [flat|nested] 112+ messages in thread
* Re: [PATCH V2 Resend 43/92] cpufreq: cris: don't initialize part of policy that is set by core too
2013-10-03 14:58 ` [PATCH V2 Resend 43/92] cpufreq: cris: " Viresh Kumar
@ 2013-10-03 15:27 ` Jesper Nilsson
0 siblings, 0 replies; 112+ messages in thread
From: Jesper Nilsson @ 2013-10-03 15:27 UTC (permalink / raw)
To: Viresh Kumar
Cc: rjw@sisk.pl, cpufreq@vger.kernel.org, linux-pm@vger.kernel.org,
Jesper Nilsson, Mikael Starvik, linux-cris-kernel
On Thu, Oct 03, 2013 at 04:58:37PM +0200, Viresh Kumar wrote:
> Many common initializations of struct policy are moved to core now and hence
> this driver doesn't need to do it. This patch removes such code.
>
> Most recent of those changes is to call ->get() in the core after calling
> ->init().
You should already have gotten my Acked-by: for this series, but here it is again:
Acked-by: Jesper Nilsson <jesper.nilsson@axis.com>
> Cc: Mikael Starvik <starvik@axis.com>
> Cc: linux-cris-kernel@axis.com
> Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
> ---
> drivers/cpufreq/cris-artpec3-cpufreq.c | 1 -
> drivers/cpufreq/cris-etraxfs-cpufreq.c | 1 -
> 2 files changed, 2 deletions(-)
>
> diff --git a/drivers/cpufreq/cris-artpec3-cpufreq.c b/drivers/cpufreq/cris-artpec3-cpufreq.c
> index d26f4e4..4d88e4f 100644
> --- a/drivers/cpufreq/cris-artpec3-cpufreq.c
> +++ b/drivers/cpufreq/cris-artpec3-cpufreq.c
> @@ -73,7 +73,6 @@ static int cris_freq_cpu_init(struct cpufreq_policy *policy)
> {
> /* cpuinfo and default policy values */
> policy->cpuinfo.transition_latency = 1000000; /* 1ms */
> - policy->cur = cris_freq_get_cpu_frequency(0);
>
> return cpufreq_table_validate_and_show(policy, cris_freq_table);
> }
> diff --git a/drivers/cpufreq/cris-etraxfs-cpufreq.c b/drivers/cpufreq/cris-etraxfs-cpufreq.c
> index d384e63..f7d2d49 100644
> --- a/drivers/cpufreq/cris-etraxfs-cpufreq.c
> +++ b/drivers/cpufreq/cris-etraxfs-cpufreq.c
> @@ -72,7 +72,6 @@ static int cris_freq_cpu_init(struct cpufreq_policy *policy)
> {
> /* cpuinfo and default policy values */
> policy->cpuinfo.transition_latency = 1000000; /* 1ms */
> - policy->cur = cris_freq_get_cpu_frequency(0);
>
> return cpufreq_table_validate_and_show(policy, cris_freq_table);
> }
> --
> 1.7.12.rc2.18.g61b472e
/^JN - Jesper Nilsson
--
Jesper Nilsson -- jesper.nilsson@axis.com
^ permalink raw reply [flat|nested] 112+ messages in thread
* Re: [PATCH V2 Resend 76/92] cpufreq: cris: use cpufreq_generic_init() routine
2013-10-03 14:59 ` [PATCH V2 Resend 76/92] cpufreq: cris: " Viresh Kumar
@ 2013-10-03 15:27 ` Jesper Nilsson
0 siblings, 0 replies; 112+ messages in thread
From: Jesper Nilsson @ 2013-10-03 15:27 UTC (permalink / raw)
To: Viresh Kumar
Cc: rjw@sisk.pl, cpufreq@vger.kernel.org, linux-pm@vger.kernel.org,
Jesper Nilsson, Mikael Starvik, linux-cris-kernel
On Thu, Oct 03, 2013 at 04:59:10PM +0200, Viresh Kumar wrote:
> Use generic cpufreq_generic_init() routine instead of replicating the same code
> here.
You should already have gotten my Acked-by: for this series, but here it is again:
Acked-by: Jesper Nilsson <jesper.nilsson@axis.com>
> Cc: Mikael Starvik <starvik@axis.com>
> Cc: linux-cris-kernel@axis.com
> Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
> ---
> drivers/cpufreq/cris-artpec3-cpufreq.c | 6 +-----
> drivers/cpufreq/cris-etraxfs-cpufreq.c | 5 +----
> 2 files changed, 2 insertions(+), 9 deletions(-)
>
> diff --git a/drivers/cpufreq/cris-artpec3-cpufreq.c b/drivers/cpufreq/cris-artpec3-cpufreq.c
> index 4d88e4f..05fdc7e 100644
> --- a/drivers/cpufreq/cris-artpec3-cpufreq.c
> +++ b/drivers/cpufreq/cris-artpec3-cpufreq.c
> @@ -71,13 +71,9 @@ static int cris_freq_target(struct cpufreq_policy *policy,
>
> static int cris_freq_cpu_init(struct cpufreq_policy *policy)
> {
> - /* cpuinfo and default policy values */
> - policy->cpuinfo.transition_latency = 1000000; /* 1ms */
> -
> - return cpufreq_table_validate_and_show(policy, cris_freq_table);
> + return cpufreq_generic_init(policy, cris_freq_table, 1000000);
> }
>
> -
> static struct cpufreq_driver cris_freq_driver = {
> .get = cris_freq_get_cpu_frequency,
> .verify = cpufreq_generic_frequency_table_verify,
> diff --git a/drivers/cpufreq/cris-etraxfs-cpufreq.c b/drivers/cpufreq/cris-etraxfs-cpufreq.c
> index f7d2d49..fac2b26 100644
> --- a/drivers/cpufreq/cris-etraxfs-cpufreq.c
> +++ b/drivers/cpufreq/cris-etraxfs-cpufreq.c
> @@ -70,10 +70,7 @@ static int cris_freq_target(struct cpufreq_policy *policy,
>
> static int cris_freq_cpu_init(struct cpufreq_policy *policy)
> {
> - /* cpuinfo and default policy values */
> - policy->cpuinfo.transition_latency = 1000000; /* 1ms */
> -
> - return cpufreq_table_validate_and_show(policy, cris_freq_table);
> + return cpufreq_generic_init(policy, cris_freq_table, 1000000);
> }
>
> static struct cpufreq_driver cris_freq_driver = {
> --
> 1.7.12.rc2.18.g61b472e
/^JN - Jesper Nilsson
--
Jesper Nilsson -- jesper.nilsson@axis.com
^ permalink raw reply [flat|nested] 112+ messages in thread
* Re: [PATCH V2 Resend 07/92] cpufreq: cris: Use generic cpufreq routines
2013-10-03 15:25 ` Jesper Nilsson
@ 2013-10-03 15:46 ` Viresh Kumar
0 siblings, 0 replies; 112+ messages in thread
From: Viresh Kumar @ 2013-10-03 15:46 UTC (permalink / raw)
To: Jesper Nilsson
Cc: rjw@sisk.pl, cpufreq@vger.kernel.org, linux-pm@vger.kernel.org,
Jesper Nilsson, Mikael Starvik, linux-cris-kernel
On 3 October 2013 20:55, Jesper Nilsson <jesper.nilsson@axis.com> wrote:
> On Thu, Oct 03, 2013 at 04:58:01PM +0200, Viresh Kumar wrote:
>> Most of the CPUFreq drivers do similar things in .exit() and .verify() routines
>> and .attr. So its better if we have generic routines for them which can be used
>> by cpufreq drivers then.
>>
>> This patch uses these generic routines for this driver.
>
> You should already have gotten my Acked-by: for this series, but here it is again:
Yeah.. So sorry for missing those :(
^ permalink raw reply [flat|nested] 112+ messages in thread
* RE: [PATCH V2 Resend 27/92] cpufreq: s3cx4xx: Use generic cpufreq routines
2013-10-03 14:58 ` [PATCH V2 Resend 27/92] cpufreq: s3cx4xx: " Viresh Kumar
@ 2013-10-05 2:27 ` Kukjin Kim
2013-10-07 2:59 ` Viresh Kumar
0 siblings, 1 reply; 112+ messages in thread
From: Kukjin Kim @ 2013-10-05 2:27 UTC (permalink / raw)
To: 'Viresh Kumar', rjw; +Cc: cpufreq, linux-pm
Viresh Kumar wrote:
>
> Most of the CPUFreq drivers do similar things in .exit() and .verify()
> routines
> and .attr. So its better if we have generic routines for them which can be
> used
> by cpufreq drivers then.
>
> This patch uses these generic routines for this driver.
>
> Cc: Kukjin Kim <kgene.kim@samsung.com>
Acked-by: Kukjin Kim <kgene.kim@samsung.com>
BTW, would be helpful to me if you could add regarding maintainers in cc on
the common stuff of this changes :-)
Thanks,
Kukjin
> Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
> ---
> drivers/cpufreq/s3c2416-cpufreq.c | 19 ++-----------------
> drivers/cpufreq/s3c24xx-cpufreq.c | 9 ---------
> drivers/cpufreq/s3c64xx-cpufreq.c | 10 +---------
> 3 files changed, 3 insertions(+), 35 deletions(-)
^ permalink raw reply [flat|nested] 112+ messages in thread
* RE: [PATCH V2 Resend 28/92] cpufreq: s5pv210: Use generic cpufreq routines
2013-10-03 14:58 ` [PATCH V2 Resend 28/92] cpufreq: s5pv210: " Viresh Kumar
@ 2013-10-05 2:28 ` Kukjin Kim
0 siblings, 0 replies; 112+ messages in thread
From: Kukjin Kim @ 2013-10-05 2:28 UTC (permalink / raw)
To: 'Viresh Kumar', rjw; +Cc: cpufreq, linux-pm
Viresh Kumar wrote:
>
> Most of the CPUFreq drivers do similar things in .exit() and .verify()
> routines
> and .attr. So its better if we have generic routines for them which can be
> used
> by cpufreq drivers then.
>
> This patch uses these generic routines for this driver.
>
> Cc: Kukjin Kim <kgene.kim@samsung.com>
Acked-by: Kukjin Kim <kgene.kim@samsung.com>
Thanks,
Kukjin
> Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
> ---
> drivers/cpufreq/s5pv210-cpufreq.c | 10 +---------
> 1 file changed, 1 insertion(+), 9 deletions(-)
^ permalink raw reply [flat|nested] 112+ messages in thread
* Re: [PATCH V2 Resend 41/92] cpufreq: cpu0: don't initialize part of policy that is set by core too
2013-10-03 14:58 ` [PATCH V2 Resend 41/92] cpufreq: cpu0: " Viresh Kumar
@ 2013-10-05 8:00 ` Shawn Guo
0 siblings, 0 replies; 112+ messages in thread
From: Shawn Guo @ 2013-10-05 8:00 UTC (permalink / raw)
To: Viresh Kumar; +Cc: rjw, cpufreq, linux-pm
On Thu, Oct 03, 2013 at 08:28:35PM +0530, Viresh Kumar wrote:
> Many common initializations of struct policy are moved to core now and hence
> this driver doesn't need to do it. This patch removes such code.
>
> Most recent of those changes is to call ->get() in the core after calling
> ->init().
>
> Cc: Shawn Guo <shawn.guo@linaro.org>
> Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
For cpu0 and imx6q changes,
Acked-by: Shawn Guo <shawn.guo@linaro.org>
^ permalink raw reply [flat|nested] 112+ messages in thread
* Re: [PATCH V2 Resend 27/92] cpufreq: s3cx4xx: Use generic cpufreq routines
2013-10-05 2:27 ` Kukjin Kim
@ 2013-10-07 2:59 ` Viresh Kumar
0 siblings, 0 replies; 112+ messages in thread
From: Viresh Kumar @ 2013-10-07 2:59 UTC (permalink / raw)
To: Kukjin Kim; +Cc: rjw, cpufreq, linux-pm
On 05/10/2013, Kukjin Kim <kgene@kernel.org> wrote:
> Viresh Kumar wrote:
>>
>> Most of the CPUFreq drivers do similar things in .exit() and .verify()
>> routines
>> and .attr. So its better if we have generic routines for them which can
>> be
>> used
>> by cpufreq drivers then.
>>
>> This patch uses these generic routines for this driver.
>>
>> Cc: Kukjin Kim <kgene.kim@samsung.com>
>
> Acked-by: Kukjin Kim <kgene.kim@samsung.com>
>
> BTW, would be helpful to me if you could add regarding maintainers in cc on
> the common stuff of this changes :-)
I forgot to add --supress-cc while sending these patches.. These
weren't out for review, but for applying.. :)
I have already sent the common stuff cc'd to all maintainers earlier..
^ permalink raw reply [flat|nested] 112+ messages in thread
* Re: [PATCH V2 Resend 37/92] cpufreq: acpi: don't initialize part of policy that is set by core too
2013-10-03 14:58 ` [PATCH V2 Resend 37/92] cpufreq: acpi: don't initialize part of policy that is set by core too Viresh Kumar
@ 2013-10-11 12:51 ` Rafael J. Wysocki
2013-10-11 14:37 ` Viresh Kumar
0 siblings, 1 reply; 112+ messages in thread
From: Rafael J. Wysocki @ 2013-10-11 12:51 UTC (permalink / raw)
To: Viresh Kumar; +Cc: cpufreq, linux-pm, ACPI Devel Maling List
On Thursday, October 03, 2013 08:28:31 PM Viresh Kumar wrote:
> Many common initializations of struct policy are moved to core now and hence
> this driver doesn't need to do it. This patch removes such code.
>
> Most recent of those changes is to call ->get() in the core after calling
> ->init().
>
> Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
> ---
> drivers/cpufreq/acpi-cpufreq.c | 1 -
> 1 file changed, 1 deletion(-)
>
> diff --git a/drivers/cpufreq/acpi-cpufreq.c b/drivers/cpufreq/acpi-cpufreq.c
> index 94a5a1d..a8dac7b 100644
> --- a/drivers/cpufreq/acpi-cpufreq.c
> +++ b/drivers/cpufreq/acpi-cpufreq.c
> @@ -842,7 +842,6 @@ static int acpi_cpufreq_cpu_init(struct cpufreq_policy *policy)
> break;
> case ACPI_ADR_SPACE_FIXED_HARDWARE:
> acpi_cpufreq_driver.get = get_cur_freq_on_cpu;
> - policy->cur = get_cur_freq_on_cpu(cpu);
> break;
> default:
> break;
I'm wondering what happens if space_id is ACPI_ADR_SPACE_SYSTEM_IO? I suppose
that the core will set policy->cur first and then it will be overwritten here?
--
I speak only for myself.
Rafael J. Wysocki, Intel Open Source Technology Center.
^ permalink raw reply [flat|nested] 112+ messages in thread
* Re: [PATCH V2 Resend 00/92] CPUFreq Cleanup Series: Part II
2013-10-03 14:57 [PATCH V2 Resend 00/92] CPUFreq Cleanup Series: Part II Viresh Kumar
` (89 preceding siblings ...)
2013-10-03 15:12 ` [PATCH V2 Resend 90/92] cpufreq: sa11x0: " Viresh Kumar
@ 2013-10-11 13:27 ` Rafael J. Wysocki
2013-10-11 13:57 ` Viresh Kumar
90 siblings, 1 reply; 112+ messages in thread
From: Rafael J. Wysocki @ 2013-10-11 13:27 UTC (permalink / raw)
To: Viresh Kumar; +Cc: cpufreq, linux-pm
On Thursday, October 03, 2013 08:27:54 PM Viresh Kumar wrote:
> Hi Rafael,
>
> As discussed earlier, Part I is now part of your linux-next branch and so
> sending Part II for inclusion in bleeding-edge..
>
> These are mostly oriented towards using generic .attr, .init(), .exit() and
> .verify() and are so clubbed together.
>
> These doesn't conflict mostly with the other 11 cpufreq core cleanup patches
> that are floating around:
> http://www.spinics.net/lists/cpufreq/msg07920.html
>
> Only a minor conflict with following patch of that series for arm_big_little.c
> file:
> http://www.spinics.net/lists/cpufreq/msg07929.html
>
> You can resolve it easily, pretty straight forward.
>
> These are based of your linux-next branch:
> ba93c78 Merge branch 'pm-cpufreq-next' into linux-next
So I've just added this to bleeding-edge, but I have a couple complaints.
First off, this is three patch sets in one. The first part is the generic
.attr(), exit() and .verify() one, the second part is the duplicated
initialization and the third one is about cpufreq_generic_init(). They
really should have been posted and reviewed separately.
And while I'm basically OK with the first and the third part, I'm concerned
about the second one, because it has potential to introduce some subtle
initialization issues (initializing something twice is not a bug per se,
although it is inefficient, but failing to initialize that or initializing it
with an incorrect value *is* a bug).
Second, can you please make your own patch sets apply on top of each other
next time?
Besides, I'm not going to apply any patchset with more than 40 patches in it
in one go any more unless I'm seriously convinced that this is the only way
to go.
Thanks!
--
I speak only for myself.
Rafael J. Wysocki, Intel Open Source Technology Center.
^ permalink raw reply [flat|nested] 112+ messages in thread
* Re: [PATCH V2 Resend 00/92] CPUFreq Cleanup Series: Part II
2013-10-11 13:27 ` [PATCH V2 Resend 00/92] CPUFreq Cleanup Series: Part II Rafael J. Wysocki
@ 2013-10-11 13:57 ` Viresh Kumar
2013-10-11 22:17 ` Rafael J. Wysocki
0 siblings, 1 reply; 112+ messages in thread
From: Viresh Kumar @ 2013-10-11 13:57 UTC (permalink / raw)
To: Rafael J. Wysocki; +Cc: cpufreq, linux-pm
On 11/10/2013, Rafael J. Wysocki <rjw@rjwysocki.net> wrote:
> So I've just added this to bleeding-edge, but I have a couple complaints.
Thanks..
> First off, this is three patch sets in one. The first part is the generic
> .attr(), exit() and .verify() one, the second part is the duplicated
> initialization and the third one is about cpufreq_generic_init(). They
> really should have been posted and reviewed separately.
They were posted and reviewed separately earlier.. Only this time
I have merged them together for applying..
> And while I'm basically OK with the first and the third part, I'm concerned
> about the second one, because it has potential to introduce some subtle
> initialization issues (initializing something twice is not a bug per se,
> although it is inefficient, but failing to initialize that or initializing
> it
> with an incorrect value *is* a bug).
I agree.. Lets see if it breaks anything... I will get it fixed as soon as
possible.. (BTW, there was a fixup for the last series that you missed
to apply: fixup! cpufreq: sa11x0: Expose frequency table)
> Second, can you please make your own patch sets apply on top of each other
> next time?
I wasn't sure if you are going to apply the 11 patch patchset before
this one or not.. and hence have applied it directly on top of linux-next..
> Besides, I'm not going to apply any patchset with more than 40 patches in
> it
> in one go any more unless I'm seriously convinced that this is the only way
> to go.
Okay.. I will take care of this next time..
^ permalink raw reply [flat|nested] 112+ messages in thread
* Re: [PATCH V2 Resend 37/92] cpufreq: acpi: don't initialize part of policy that is set by core too
2013-10-11 12:51 ` Rafael J. Wysocki
@ 2013-10-11 14:37 ` Viresh Kumar
2013-10-11 21:16 ` Rafael J. Wysocki
0 siblings, 1 reply; 112+ messages in thread
From: Viresh Kumar @ 2013-10-11 14:37 UTC (permalink / raw)
To: Rafael J. Wysocki; +Cc: cpufreq, linux-pm, ACPI Devel Maling List
On 11/10/2013, Rafael J. Wysocki <rjw@rjwysocki.net> wrote:
> On Thursday, October 03, 2013 08:28:31 PM Viresh Kumar wrote:
>> Many common initializations of struct policy are moved to core now and
>> hence
>> this driver doesn't need to do it. This patch removes such code.
>>
>> Most recent of those changes is to call ->get() in the core after calling
>> ->init().
>>
>> Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
>> ---
>> drivers/cpufreq/acpi-cpufreq.c | 1 -
>> 1 file changed, 1 deletion(-)
>>
>> diff --git a/drivers/cpufreq/acpi-cpufreq.c
>> b/drivers/cpufreq/acpi-cpufreq.c
>> index 94a5a1d..a8dac7b 100644
>> --- a/drivers/cpufreq/acpi-cpufreq.c
>> +++ b/drivers/cpufreq/acpi-cpufreq.c
>> @@ -842,7 +842,6 @@ static int acpi_cpufreq_cpu_init(struct cpufreq_policy
>> *policy)
>> break;
>> case ACPI_ADR_SPACE_FIXED_HARDWARE:
>> acpi_cpufreq_driver.get = get_cur_freq_on_cpu;
>> - policy->cur = get_cur_freq_on_cpu(cpu);
>> break;
>> default:
>> break;
>
> I'm wondering what happens if space_id is ACPI_ADR_SPACE_SYSTEM_IO? I
> suppose
> that the core will set policy->cur first and then it will be overwritten
> here?
No. First ->init() is called and then core sets policy->cur. And it sets
it only if there is a valid ->get() available.. Which wouldn't be available
in case of ACPI_ADR_SPACE_SYSTEM_IO..
^ permalink raw reply [flat|nested] 112+ messages in thread
* Re: [PATCH V2 Resend 37/92] cpufreq: acpi: don't initialize part of policy that is set by core too
2013-10-11 14:37 ` Viresh Kumar
@ 2013-10-11 21:16 ` Rafael J. Wysocki
0 siblings, 0 replies; 112+ messages in thread
From: Rafael J. Wysocki @ 2013-10-11 21:16 UTC (permalink / raw)
To: Viresh Kumar; +Cc: cpufreq, linux-pm, ACPI Devel Maling List
On Friday, October 11, 2013 08:07:37 PM Viresh Kumar wrote:
> On 11/10/2013, Rafael J. Wysocki <rjw@rjwysocki.net> wrote:
> > On Thursday, October 03, 2013 08:28:31 PM Viresh Kumar wrote:
> >> Many common initializations of struct policy are moved to core now and
> >> hence
> >> this driver doesn't need to do it. This patch removes such code.
> >>
> >> Most recent of those changes is to call ->get() in the core after calling
> >> ->init().
> >>
> >> Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
> >> ---
> >> drivers/cpufreq/acpi-cpufreq.c | 1 -
> >> 1 file changed, 1 deletion(-)
> >>
> >> diff --git a/drivers/cpufreq/acpi-cpufreq.c
> >> b/drivers/cpufreq/acpi-cpufreq.c
> >> index 94a5a1d..a8dac7b 100644
> >> --- a/drivers/cpufreq/acpi-cpufreq.c
> >> +++ b/drivers/cpufreq/acpi-cpufreq.c
> >> @@ -842,7 +842,6 @@ static int acpi_cpufreq_cpu_init(struct cpufreq_policy
> >> *policy)
> >> break;
> >> case ACPI_ADR_SPACE_FIXED_HARDWARE:
> >> acpi_cpufreq_driver.get = get_cur_freq_on_cpu;
> >> - policy->cur = get_cur_freq_on_cpu(cpu);
> >> break;
> >> default:
> >> break;
> >
> > I'm wondering what happens if space_id is ACPI_ADR_SPACE_SYSTEM_IO? I
> > suppose
> > that the core will set policy->cur first and then it will be overwritten
> > here?
>
> No. First ->init() is called and then core sets policy->cur. And it sets
> it only if there is a valid ->get() available.. Which wouldn't be available
> in case of ACPI_ADR_SPACE_SYSTEM_IO..
OK
Care to send a patch adding a comment under the ACPI_ADR_SPACE_SYSTEM_IO case
explaining that policy->cur it sets won't be clobbered by the core because etc.?
--
I speak only for myself.
Rafael J. Wysocki, Intel Open Source Technology Center.
^ permalink raw reply [flat|nested] 112+ messages in thread
* Re: [PATCH V2 Resend 00/92] CPUFreq Cleanup Series: Part II
2013-10-11 13:57 ` Viresh Kumar
@ 2013-10-11 22:17 ` Rafael J. Wysocki
2013-10-12 1:25 ` Viresh Kumar
0 siblings, 1 reply; 112+ messages in thread
From: Rafael J. Wysocki @ 2013-10-11 22:17 UTC (permalink / raw)
To: Viresh Kumar; +Cc: cpufreq, linux-pm
On Friday, October 11, 2013 07:27:44 PM Viresh Kumar wrote:
> On 11/10/2013, Rafael J. Wysocki <rjw@rjwysocki.net> wrote:
> > So I've just added this to bleeding-edge, but I have a couple complaints.
>
> Thanks..
>
> > First off, this is three patch sets in one. The first part is the generic
> > .attr(), exit() and .verify() one, the second part is the duplicated
> > initialization and the third one is about cpufreq_generic_init(). They
> > really should have been posted and reviewed separately.
>
> They were posted and reviewed separately earlier.. Only this time
> I have merged them together for applying..
>
> > And while I'm basically OK with the first and the third part, I'm concerned
> > about the second one, because it has potential to introduce some subtle
> > initialization issues (initializing something twice is not a bug per se,
> > although it is inefficient, but failing to initialize that or initializing
> > it
> > with an incorrect value *is* a bug).
>
> I agree.. Lets see if it breaks anything... I will get it fixed as soon as
> possible.. (BTW, there was a fixup for the last series that you missed
> to apply: fixup! cpufreq: sa11x0: Expose frequency table)
Any links?
^ permalink raw reply [flat|nested] 112+ messages in thread
* Re: [PATCH V2 Resend 00/92] CPUFreq Cleanup Series: Part II
2013-10-11 22:17 ` Rafael J. Wysocki
@ 2013-10-12 1:25 ` Viresh Kumar
2013-10-12 13:46 ` Rafael J. Wysocki
0 siblings, 1 reply; 112+ messages in thread
From: Viresh Kumar @ 2013-10-12 1:25 UTC (permalink / raw)
To: Rafael J. Wysocki; +Cc: cpufreq, linux-pm
[-- Attachment #1: Type: text/plain, Size: 1373 bytes --]
On 12/10/2013, Rafael J. Wysocki <rjw@rjwysocki.net> wrote:
> On Friday, October 11, 2013 07:27:44 PM Viresh Kumar wrote:
>> On 11/10/2013, Rafael J. Wysocki <rjw@rjwysocki.net> wrote:
>> > So I've just added this to bleeding-edge, but I have a couple
>> > complaints.
>>
>> Thanks..
>>
>> > First off, this is three patch sets in one. The first part is the
>> > generic
>> > .attr(), exit() and .verify() one, the second part is the duplicated
>> > initialization and the third one is about cpufreq_generic_init(). They
>> > really should have been posted and reviewed separately.
>>
>> They were posted and reviewed separately earlier.. Only this time
>> I have merged them together for applying..
>>
>> > And while I'm basically OK with the first and the third part, I'm
>> > concerned
>> > about the second one, because it has potential to introduce some subtle
>> > initialization issues (initializing something twice is not a bug per
>> > se,
>> > although it is inefficient, but failing to initialize that or
>> > initializing
>> > it
>> > with an incorrect value *is* a bug).
>>
>> I agree.. Lets see if it breaks anything... I will get it fixed as soon
>> as
>> possible.. (BTW, there was a fixup for the last series that you missed
>> to apply: fixup! cpufreq: sa11x0: Expose frequency table)
>
> Any links?
https://lkml.org/lkml/2013/10/4/7
Attached again..
[-- Attachment #2: 0001-fixup-cpufreq-sa11x0-Expose-frequency-table.patch --]
[-- Type: text/x-patch, Size: 1101 bytes --]
From d2e1eb969ebdb66e3cc199fbbbe2e2a1a8e2960b Mon Sep 17 00:00:00 2001
Message-Id: <d2e1eb969ebdb66e3cc199fbbbe2e2a1a8e2960b.1381541098.git.viresh.kumar@linaro.org>
From: Viresh Kumar <viresh.kumar@linaro.org>
Date: Fri, 4 Oct 2013 10:48:16 +0530
Subject: [PATCH] fixup! cpufreq: sa11x0: Expose frequency table
---
arch/arm/mach-sa1100/generic.h | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/arch/arm/mach-sa1100/generic.h b/arch/arm/mach-sa1100/generic.h
index f5214ce..2d9bee0 100644
--- a/arch/arm/mach-sa1100/generic.h
+++ b/arch/arm/mach-sa1100/generic.h
@@ -3,6 +3,7 @@
*
* Author: Nicolas Pitre
*/
+#include <linux/cpufreq.h>
#include <linux/reboot.h>
extern void sa1100_timer_init(void);
@@ -19,8 +20,6 @@ extern void sa11x0_init_late(void);
extern void sa1110_mb_enable(void);
extern void sa1110_mb_disable(void);
-struct cpufreq_policy;
-
extern struct cpufreq_frequency_table sa11x0_freq_table[];
extern unsigned int sa11x0_freq_to_ppcr(unsigned int khz);
extern int sa11x0_verify_speed(struct cpufreq_policy *policy);
--
1.7.12.rc2.18.g61b472e
^ permalink raw reply related [flat|nested] 112+ messages in thread
* Re: [PATCH V2 Resend 00/92] CPUFreq Cleanup Series: Part II
2013-10-12 1:25 ` Viresh Kumar
@ 2013-10-12 13:46 ` Rafael J. Wysocki
2013-10-12 15:22 ` Viresh Kumar
0 siblings, 1 reply; 112+ messages in thread
From: Rafael J. Wysocki @ 2013-10-12 13:46 UTC (permalink / raw)
To: Viresh Kumar; +Cc: cpufreq, linux-pm
On Saturday, October 12, 2013 06:55:59 AM Viresh Kumar wrote:
> On 12/10/2013, Rafael J. Wysocki <rjw@rjwysocki.net> wrote:
> > On Friday, October 11, 2013 07:27:44 PM Viresh Kumar wrote:
> >> On 11/10/2013, Rafael J. Wysocki <rjw@rjwysocki.net> wrote:
> >> > So I've just added this to bleeding-edge, but I have a couple
> >> > complaints.
> >>
> >> Thanks..
> >>
> >> > First off, this is three patch sets in one. The first part is the
> >> > generic
> >> > .attr(), exit() and .verify() one, the second part is the duplicated
> >> > initialization and the third one is about cpufreq_generic_init(). They
> >> > really should have been posted and reviewed separately.
> >>
> >> They were posted and reviewed separately earlier.. Only this time
> >> I have merged them together for applying..
> >>
> >> > And while I'm basically OK with the first and the third part, I'm
> >> > concerned
> >> > about the second one, because it has potential to introduce some subtle
> >> > initialization issues (initializing something twice is not a bug per
> >> > se,
> >> > although it is inefficient, but failing to initialize that or
> >> > initializing
> >> > it
> >> > with an incorrect value *is* a bug).
> >>
> >> I agree.. Lets see if it breaks anything... I will get it fixed as soon
> >> as
> >> possible.. (BTW, there was a fixup for the last series that you missed
> >> to apply: fixup! cpufreq: sa11x0: Expose frequency table)
> >
> > Any links?
>
> https://lkml.org/lkml/2013/10/4/7
OK, so which commit introduced the breakage?
--
I speak only for myself.
Rafael J. Wysocki, Intel Open Source Technology Center.
^ permalink raw reply [flat|nested] 112+ messages in thread
* Re: [PATCH V2 Resend 00/92] CPUFreq Cleanup Series: Part II
2013-10-12 13:46 ` Rafael J. Wysocki
@ 2013-10-12 15:22 ` Viresh Kumar
2013-10-12 20:30 ` Rafael J. Wysocki
0 siblings, 1 reply; 112+ messages in thread
From: Viresh Kumar @ 2013-10-12 15:22 UTC (permalink / raw)
To: Rafael J. Wysocki; +Cc: cpufreq, linux-pm
On 12/10/2013, Rafael J. Wysocki <rjw@rjwysocki.net> wrote:
> On Saturday, October 12, 2013 06:55:59 AM Viresh Kumar wrote:
>> On 12/10/2013, Rafael J. Wysocki <rjw@rjwysocki.net> wrote:
>> > On Friday, October 11, 2013 07:27:44 PM Viresh Kumar wrote:
>> >> On 11/10/2013, Rafael J. Wysocki <rjw@rjwysocki.net> wrote:
>> >> > So I've just added this to bleeding-edge, but I have a couple
>> >> > complaints.
>> >>
>> >> Thanks..
>> >>
>> >> > First off, this is three patch sets in one. The first part is the
>> >> > generic
>> >> > .attr(), exit() and .verify() one, the second part is the duplicated
>> >> > initialization and the third one is about cpufreq_generic_init().
>> >> > They
>> >> > really should have been posted and reviewed separately.
>> >>
>> >> They were posted and reviewed separately earlier.. Only this time
>> >> I have merged them together for applying..
>> >>
>> >> > And while I'm basically OK with the first and the third part, I'm
>> >> > concerned
>> >> > about the second one, because it has potential to introduce some
>> >> > subtle
>> >> > initialization issues (initializing something twice is not a bug per
>> >> > se,
>> >> > although it is inefficient, but failing to initialize that or
>> >> > initializing
>> >> > it
>> >> > with an incorrect value *is* a bug).
>> >>
>> >> I agree.. Lets see if it breaks anything... I will get it fixed as
>> >> soon
>> >> as
>> >> possible.. (BTW, there was a fixup for the last series that you missed
>> >> to apply: fixup! cpufreq: sa11x0: Expose frequency table)
>> >
>> > Any links?
>>
>> https://lkml.org/lkml/2013/10/4/7
>
> OK, so which commit introduced the breakage?
I thought you will pick it from the link :)
22c8b4f cpufreq: sa11x0: Expose frequency table
^ permalink raw reply [flat|nested] 112+ messages in thread
* Re: [PATCH V2 Resend 00/92] CPUFreq Cleanup Series: Part II
2013-10-12 15:22 ` Viresh Kumar
@ 2013-10-12 20:30 ` Rafael J. Wysocki
2013-10-13 0:41 ` Viresh Kumar
0 siblings, 1 reply; 112+ messages in thread
From: Rafael J. Wysocki @ 2013-10-12 20:30 UTC (permalink / raw)
To: Viresh Kumar; +Cc: cpufreq, linux-pm
On Saturday, October 12, 2013 08:52:33 PM Viresh Kumar wrote:
> On 12/10/2013, Rafael J. Wysocki <rjw@rjwysocki.net> wrote:
> > On Saturday, October 12, 2013 06:55:59 AM Viresh Kumar wrote:
> >> On 12/10/2013, Rafael J. Wysocki <rjw@rjwysocki.net> wrote:
> >> > On Friday, October 11, 2013 07:27:44 PM Viresh Kumar wrote:
> >> >> On 11/10/2013, Rafael J. Wysocki <rjw@rjwysocki.net> wrote:
> >> >> > So I've just added this to bleeding-edge, but I have a couple
> >> >> > complaints.
> >> >>
> >> >> Thanks..
> >> >>
> >> >> > First off, this is three patch sets in one. The first part is the
> >> >> > generic
> >> >> > .attr(), exit() and .verify() one, the second part is the duplicated
> >> >> > initialization and the third one is about cpufreq_generic_init().
> >> >> > They
> >> >> > really should have been posted and reviewed separately.
> >> >>
> >> >> They were posted and reviewed separately earlier.. Only this time
> >> >> I have merged them together for applying..
> >> >>
> >> >> > And while I'm basically OK with the first and the third part, I'm
> >> >> > concerned
> >> >> > about the second one, because it has potential to introduce some
> >> >> > subtle
> >> >> > initialization issues (initializing something twice is not a bug per
> >> >> > se,
> >> >> > although it is inefficient, but failing to initialize that or
> >> >> > initializing
> >> >> > it
> >> >> > with an incorrect value *is* a bug).
> >> >>
> >> >> I agree.. Lets see if it breaks anything... I will get it fixed as
> >> >> soon
> >> >> as
> >> >> possible.. (BTW, there was a fixup for the last series that you missed
> >> >> to apply: fixup! cpufreq: sa11x0: Expose frequency table)
> >> >
> >> > Any links?
> >>
> >> https://lkml.org/lkml/2013/10/4/7
> >
> > OK, so which commit introduced the breakage?
>
> I thought you will pick it from the link :)
>
> 22c8b4f cpufreq: sa11x0: Expose frequency table
Applied.
Next time please respin the original patch instead of posting "fixups",
because that is less than helpful.
Thanks!
--
I speak only for myself.
Rafael J. Wysocki, Intel Open Source Technology Center.
^ permalink raw reply [flat|nested] 112+ messages in thread
* Re: [PATCH V2 Resend 00/92] CPUFreq Cleanup Series: Part II
2013-10-12 20:30 ` Rafael J. Wysocki
@ 2013-10-13 0:41 ` Viresh Kumar
0 siblings, 0 replies; 112+ messages in thread
From: Viresh Kumar @ 2013-10-13 0:41 UTC (permalink / raw)
To: Rafael J. Wysocki; +Cc: cpufreq, linux-pm
On 13/10/2013, Rafael J. Wysocki <rjw@rjwysocki.net> wrote:
> Applied.
>
> Next time please respin the original patch instead of posting "fixups",
Sure
> because that is less than helpful.
I though you will merge it with offending commit and so posted fixup.
I will post separate commits in future and will leave this to you to merge
or apply separately.
Thanks.
^ permalink raw reply [flat|nested] 112+ messages in thread
end of thread, other threads:[~2013-10-13 0:41 UTC | newest]
Thread overview: 112+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-10-03 14:57 [PATCH V2 Resend 00/92] CPUFreq Cleanup Series: Part II Viresh Kumar
2013-10-03 14:57 ` [PATCH V2 Resend 01/92] cpufreq: define generic .attr, .exit() and .verify() routines Viresh Kumar
2013-10-03 14:57 ` [PATCH V2 Resend 02/92] cpufreq: acpi: Use generic cpufreq routines Viresh Kumar
2013-10-03 14:57 ` [PATCH V2 Resend 03/92] cpufreq: arm_big_little: " Viresh Kumar
2013-10-03 14:57 ` [PATCH V2 Resend 04/92] cpufreq: at32ap: " Viresh Kumar
2013-10-03 14:57 ` [PATCH V2 Resend 05/92] cpufreq: blackfin: " Viresh Kumar
2013-10-03 14:58 ` [PATCH V2 Resend 06/92] cpufreq: cpu0: " Viresh Kumar
2013-10-03 14:58 ` [PATCH V2 Resend 07/92] cpufreq: cris: " Viresh Kumar
2013-10-03 15:25 ` Jesper Nilsson
2013-10-03 15:46 ` Viresh Kumar
2013-10-03 14:58 ` [PATCH V2 Resend 08/92] cpufreq: davinci: " Viresh Kumar
2013-10-03 14:58 ` [PATCH V2 Resend 09/92] cpufreq: dbx500: " Viresh Kumar
2013-10-03 14:58 ` [PATCH V2 Resend 10/92] cpufreq: e_powersaver: " Viresh Kumar
2013-10-03 14:58 ` [PATCH V2 Resend 11/92] cpufreq: elanfreq: " Viresh Kumar
2013-10-03 14:58 ` [PATCH V2 Resend 12/92] cpufreq: exynos: " Viresh Kumar
2013-10-03 14:58 ` [PATCH V2 Resend 13/92] cpufreq: ia64-acpi: " Viresh Kumar
2013-10-03 14:58 ` [PATCH V2 Resend 14/92] cpufreq: imx6q: " Viresh Kumar
2013-10-03 14:58 ` [PATCH V2 Resend 15/92] cpufreq: kirkwood: " Viresh Kumar
2013-10-03 14:58 ` [PATCH V2 Resend 16/92] cpufreq: longhaul: " Viresh Kumar
2013-10-03 14:58 ` [PATCH V2 Resend 17/92] cpufreq: loongson2: " Viresh Kumar
2013-10-03 14:58 ` [PATCH V2 Resend 18/92] cpufreq: maple: " Viresh Kumar
2013-10-03 14:58 ` [PATCH V2 Resend 19/92] cpufreq: omap: " Viresh Kumar
2013-10-03 14:58 ` [PATCH V2 Resend 20/92] cpufreq: p4-clockmod: " Viresh Kumar
2013-10-03 14:58 ` [PATCH V2 Resend 21/92] cpufreq: pasemi: " Viresh Kumar
2013-10-03 14:58 ` [PATCH V2 Resend 22/92] cpufreq: pmac: " Viresh Kumar
2013-10-03 14:58 ` [PATCH V2 Resend 23/92] cpufreq: powernow: " Viresh Kumar
2013-10-03 14:58 ` [PATCH V2 Resend 24/92] cpufreq: ppc-corenet: " Viresh Kumar
2013-10-03 14:58 ` [PATCH V2 Resend 25/92] cpufreq: ppc_cbe: " Viresh Kumar
2013-10-03 14:58 ` [PATCH V2 Resend 26/92] cpufreq: pxa: " Viresh Kumar
2013-10-03 14:58 ` [PATCH V2 Resend 27/92] cpufreq: s3cx4xx: " Viresh Kumar
2013-10-05 2:27 ` Kukjin Kim
2013-10-07 2:59 ` Viresh Kumar
2013-10-03 14:58 ` [PATCH V2 Resend 28/92] cpufreq: s5pv210: " Viresh Kumar
2013-10-05 2:28 ` Kukjin Kim
2013-10-03 14:58 ` [PATCH V2 Resend 29/92] cpufreq: sa11x0: " Viresh Kumar
2013-10-03 14:58 ` [PATCH V2 Resend 30/92] cpufreq: sc520: " Viresh Kumar
2013-10-03 14:58 ` [PATCH V2 Resend 31/92] cpufreq: sh: " Viresh Kumar
2013-10-03 14:58 ` [PATCH V2 Resend 32/92] cpufreq: sparc: " Viresh Kumar
2013-10-03 14:58 ` [PATCH V2 Resend 33/92] cpufreq: spear: " Viresh Kumar
2013-10-03 14:58 ` [PATCH V2 Resend 34/92] cpufreq: speedstep: " Viresh Kumar
2013-10-03 14:58 ` [PATCH V2 Resend 35/92] cpufreq: tegra: " Viresh Kumar
2013-10-03 14:58 ` [PATCH V2 Resend 36/92] cpufreq: call cpufreq_driver->get() after calling ->init() Viresh Kumar
2013-10-03 14:58 ` [PATCH V2 Resend 37/92] cpufreq: acpi: don't initialize part of policy that is set by core too Viresh Kumar
2013-10-11 12:51 ` Rafael J. Wysocki
2013-10-11 14:37 ` Viresh Kumar
2013-10-11 21:16 ` Rafael J. Wysocki
2013-10-03 14:58 ` [PATCH V2 Resend 38/92] cpufreq: arm_big_little: " Viresh Kumar
2013-10-03 14:58 ` [PATCH V2 Resend 39/92] cpufreq: at32ap: " Viresh Kumar
2013-10-03 14:58 ` [PATCH V2 Resend 40/92] cpufreq: blackfin: " Viresh Kumar
2013-10-03 14:58 ` [PATCH V2 Resend 41/92] cpufreq: cpu0: " Viresh Kumar
2013-10-05 8:00 ` Shawn Guo
2013-10-03 14:58 ` [PATCH V2 Resend 42/92] cpufreq: nforce2: " Viresh Kumar
2013-10-03 14:58 ` [PATCH V2 Resend 43/92] cpufreq: cris: " Viresh Kumar
2013-10-03 15:27 ` Jesper Nilsson
2013-10-03 14:58 ` [PATCH V2 Resend 44/92] cpufreq: davinci: " Viresh Kumar
2013-10-03 14:58 ` [PATCH V2 Resend 45/92] cpufreq: dbx500: " Viresh Kumar
2013-10-03 14:58 ` [PATCH V2 Resend 46/92] cpufreq: e_powersaver: " Viresh Kumar
2013-10-03 14:58 ` [PATCH V2 Resend 47/92] cpufreq: elanfreq: " Viresh Kumar
2013-10-03 14:58 ` [PATCH V2 Resend 48/92] cpufreq: exynos: " Viresh Kumar
2013-10-03 14:58 ` [PATCH V2 Resend 49/92] cpufreq: gx: " Viresh Kumar
2013-10-03 14:58 ` [PATCH V2 Resend 50/92] cpufreq: ia64-acpi: " Viresh Kumar
2013-10-03 14:58 ` [PATCH V2 Resend 51/92] cpufreq: imx6q: " Viresh Kumar
2013-10-03 14:58 ` [PATCH V2 Resend 52/92] cpufreq: integrator: " Viresh Kumar
2013-10-03 14:58 ` [PATCH V2 Resend 53/92] cpufreq: kirkwood: " Viresh Kumar
2013-10-03 14:58 ` [PATCH V2 Resend 54/92] cpufreq: longhaul: " Viresh Kumar
2013-10-03 14:58 ` [PATCH V2 Resend 55/92] cpufreq: loongson2: " Viresh Kumar
2013-10-03 14:58 ` [PATCH V2 Resend 56/92] cpufreq: maple: " Viresh Kumar
2013-10-03 14:58 ` [PATCH V2 Resend 57/92] cpufreq: omap: " Viresh Kumar
2013-10-03 14:58 ` [PATCH V2 Resend 58/92] cpufreq: p4: " Viresh Kumar
2013-10-03 14:58 ` [PATCH V2 Resend 59/92] cpufreq: pcc: " Viresh Kumar
2013-10-03 14:58 ` [PATCH V2 Resend 60/92] cpufreq: pmac: " Viresh Kumar
2013-10-03 14:58 ` [PATCH V2 Resend 61/92] cpufreq: powernow: " Viresh Kumar
2013-10-03 14:58 ` [PATCH V2 Resend 62/92] cpufreq: ppc: " Viresh Kumar
2013-10-03 14:58 ` [PATCH V2 Resend 63/92] cpufreq: pxa: " Viresh Kumar
2013-10-03 14:58 ` [PATCH V2 Resend 64/92] cpufreq: s3c: " Viresh Kumar
2013-10-03 14:58 ` [PATCH V2 Resend 65/92] cpufreq: s5pv210: " Viresh Kumar
2013-10-03 14:59 ` [PATCH V2 Resend 66/92] cpufreq: sa11x0: " Viresh Kumar
2013-10-03 14:59 ` [PATCH V2 Resend 67/92] cpufreq: sc520_freq: " Viresh Kumar
2013-10-03 14:59 ` [PATCH V2 Resend 68/92] cpufreq: sh: " Viresh Kumar
2013-10-03 14:59 ` [PATCH V2 Resend 69/92] cpufreq: spear: " Viresh Kumar
2013-10-03 14:59 ` [PATCH V2 Resend 70/92] cpufreq: speedstep: " Viresh Kumar
2013-10-03 14:59 ` [PATCH V2 Resend 71/92] cpufreq: tegra: " Viresh Kumar
2013-10-03 14:59 ` [PATCH V2 Resend 72/92] cpufreq: unicore2: " Viresh Kumar
2013-10-03 14:59 ` [PATCH V2 Resend 73/92] cpufreq: create cpufreq_generic_init() routine Viresh Kumar
2013-10-03 14:59 ` [PATCH V2 Resend 74/92] cpufreq: remove CONFIG_CPU_FREQ_TABLE Viresh Kumar
2013-10-03 14:59 ` [PATCH V2 Resend 75/92] cpufreq: cpu0: use cpufreq_generic_init() routine Viresh Kumar
2013-10-03 14:59 ` [PATCH V2 Resend 76/92] cpufreq: cris: " Viresh Kumar
2013-10-03 15:27 ` Jesper Nilsson
2013-10-03 14:59 ` [PATCH V2 Resend 77/92] cpufreq: davinci: " Viresh Kumar
2013-10-03 14:59 ` [PATCH V2 Resend 78/92] cpufreq: dbx500: " Viresh Kumar
2013-10-03 14:59 ` [PATCH V2 Resend 79/92] cpufreq: exynos: " Viresh Kumar
2013-10-03 14:59 ` [PATCH V2 Resend 80/92] cpufreq: imx6q: " Viresh Kumar
2013-10-03 14:59 ` [PATCH V2 Resend 81/92] cpufreq: kirkwood: " Viresh Kumar
2013-10-03 14:59 ` [PATCH V2 Resend 82/92] cpufreq: loongson2: " Viresh Kumar
2013-10-03 14:59 ` [PATCH V2 Resend 83/92] cpufreq: maple: " Viresh Kumar
2013-10-03 14:59 ` [PATCH V2 Resend 84/92] cpufreq: omap: " Viresh Kumar
2013-10-03 14:59 ` [PATCH V2 Resend 85/92] cpufreq: pasemi: " Viresh Kumar
2013-10-03 14:59 ` [PATCH V2 Resend 86/92] cpufreq: pmac32: " Viresh Kumar
2013-10-03 14:59 ` [PATCH V2 Resend 87/92] cpufreq: pmac64: " Viresh Kumar
2013-10-03 14:59 ` [PATCH V2 Resend 88/92] cpufreq: s3c: " Viresh Kumar
2013-10-03 14:59 ` [PATCH V2 Resend 89/92] cpufreq: s5pv210: " Viresh Kumar
2013-10-03 15:12 ` [PATCH V2 Resend 90/92] cpufreq: sa11x0: " Viresh Kumar
2013-10-03 15:12 ` [PATCH V2 Resend 91/92] cpufreq: spear: " Viresh Kumar
2013-10-03 15:12 ` [PATCH V2 Resend 92/92] cpufreq: tegra: " Viresh Kumar
2013-10-11 13:27 ` [PATCH V2 Resend 00/92] CPUFreq Cleanup Series: Part II Rafael J. Wysocki
2013-10-11 13:57 ` Viresh Kumar
2013-10-11 22:17 ` Rafael J. Wysocki
2013-10-12 1:25 ` Viresh Kumar
2013-10-12 13:46 ` Rafael J. Wysocki
2013-10-12 15:22 ` Viresh Kumar
2013-10-12 20:30 ` Rafael J. Wysocki
2013-10-13 0:41 ` Viresh Kumar
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).