* [PATCH 0/5] CPUFreq: ARM big LITTLE Fixes
@ 2013-04-29 13:24 Viresh Kumar
2013-04-29 13:24 ` [PATCH 1/5] cpufreq: ARM big LITTLE: Select PM_OPP Viresh Kumar
` (5 more replies)
0 siblings, 6 replies; 7+ messages in thread
From: Viresh Kumar @ 2013-04-29 13:24 UTC (permalink / raw)
To: rjw
Cc: linaro-kernel, patches, cpufreq, linux-pm, linux-kernel,
robin.randhawa, Steve.Bannister, Liviu.Dudau,
charles.garcia-tobin, arvind.chauhan, linux-arm-kernel,
Viresh Kumar
Hi Rafael,
I know I am late for this merge window and you have already closed the gates :)
If you can still take them, its good, otherwise we will push this for v3.10-rc2.
These are minor fixes for ARM big LITTLE cpufreq driver. It doesn't impact any
other driver or cpufreq core and are fairly independent.
Viresh Kumar (5):
cpufreq: ARM big LITTLE: Select PM_OPP
cpufreq: ARM big LITTLE DT: Return correct transition latency
cpufreq: ARM big LITTLE DT: Return CPUFREQ_ETERNAL if clock-latency
isn't found
cpufreq: ARM big LITTLE: Move cpu_to_cluster() to arm_big_little.h
cpufreq: ARM big LITTLE: Improve print message
drivers/cpufreq/Kconfig.arm | 1 +
drivers/cpufreq/arm_big_little.c | 7 +------
drivers/cpufreq/arm_big_little.h | 5 +++++
drivers/cpufreq/arm_big_little_dt.c | 9 +++++----
4 files changed, 12 insertions(+), 10 deletions(-)
--
1.7.12.rc2.18.g61b472e
^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH 1/5] cpufreq: ARM big LITTLE: Select PM_OPP
2013-04-29 13:24 [PATCH 0/5] CPUFreq: ARM big LITTLE Fixes Viresh Kumar
@ 2013-04-29 13:24 ` Viresh Kumar
2013-04-29 13:24 ` [PATCH 2/5] cpufreq: ARM big LITTLE DT: Return correct transition latency Viresh Kumar
` (4 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: Viresh Kumar @ 2013-04-29 13:24 UTC (permalink / raw)
To: rjw
Cc: linaro-kernel, patches, cpufreq, linux-pm, linux-kernel,
robin.randhawa, Steve.Bannister, Liviu.Dudau,
charles.garcia-tobin, arvind.chauhan, linux-arm-kernel,
Viresh Kumar
ARM big LITTLE cpufreq driver uses opp layer for its functionality. Select it
in Kconfig.
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
---
drivers/cpufreq/Kconfig.arm | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/cpufreq/Kconfig.arm b/drivers/cpufreq/Kconfig.arm
index bce2195..797cbd2 100644
--- a/drivers/cpufreq/Kconfig.arm
+++ b/drivers/cpufreq/Kconfig.arm
@@ -5,6 +5,7 @@
config ARM_BIG_LITTLE_CPUFREQ
tristate
depends on ARM_CPU_TOPOLOGY
+ select PM_OPP
config ARM_DT_BL_CPUFREQ
tristate "Generic ARM big LITTLE CPUfreq driver probed via DT"
--
1.7.12.rc2.18.g61b472e
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH 2/5] cpufreq: ARM big LITTLE DT: Return correct transition latency
2013-04-29 13:24 [PATCH 0/5] CPUFreq: ARM big LITTLE Fixes Viresh Kumar
2013-04-29 13:24 ` [PATCH 1/5] cpufreq: ARM big LITTLE: Select PM_OPP Viresh Kumar
@ 2013-04-29 13:24 ` Viresh Kumar
2013-04-29 13:24 ` [PATCH 3/5] cpufreq: ARM big LITTLE DT: Return CPUFREQ_ETERNAL if clock-latency isn't found Viresh Kumar
` (3 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: Viresh Kumar @ 2013-04-29 13:24 UTC (permalink / raw)
To: rjw
Cc: linaro-kernel, patches, cpufreq, linux-pm, linux-kernel,
robin.randhawa, Steve.Bannister, Liviu.Dudau,
charles.garcia-tobin, arvind.chauhan, linux-arm-kernel,
Viresh Kumar
By mistake we are returning zero for successful call to
dt_get_transition_latency(), whereas we should return transition_latency.
Fix it.
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
---
drivers/cpufreq/arm_big_little_dt.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/cpufreq/arm_big_little_dt.c b/drivers/cpufreq/arm_big_little_dt.c
index 44be311..d5ae4d2 100644
--- a/drivers/cpufreq/arm_big_little_dt.c
+++ b/drivers/cpufreq/arm_big_little_dt.c
@@ -78,7 +78,7 @@ static int dt_get_transition_latency(struct device *cpu_dev)
of_node_put(np);
of_node_put(parent);
- return 0;
+ return transition_latency;
}
return -ENODEV;
--
1.7.12.rc2.18.g61b472e
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH 3/5] cpufreq: ARM big LITTLE DT: Return CPUFREQ_ETERNAL if clock-latency isn't found
2013-04-29 13:24 [PATCH 0/5] CPUFreq: ARM big LITTLE Fixes Viresh Kumar
2013-04-29 13:24 ` [PATCH 1/5] cpufreq: ARM big LITTLE: Select PM_OPP Viresh Kumar
2013-04-29 13:24 ` [PATCH 2/5] cpufreq: ARM big LITTLE DT: Return correct transition latency Viresh Kumar
@ 2013-04-29 13:24 ` Viresh Kumar
2013-04-29 13:24 ` [PATCH 4/5] cpufreq: ARM big LITTLE: Move cpu_to_cluster() to arm_big_little.h Viresh Kumar
` (2 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: Viresh Kumar @ 2013-04-29 13:24 UTC (permalink / raw)
To: rjw
Cc: linaro-kernel, patches, cpufreq, linux-pm, linux-kernel,
robin.randhawa, Steve.Bannister, Liviu.Dudau,
charles.garcia-tobin, arvind.chauhan, linux-arm-kernel,
Viresh Kumar
If "/cpus" node isn't found or "clock-latency" isn't defined we are returning
error currently. Lets return CPUFREQ_ETERNAL instead, so that we don't fail.
Flag appropriate messages to user in such cases.
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
---
drivers/cpufreq/arm_big_little_dt.c | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/drivers/cpufreq/arm_big_little_dt.c b/drivers/cpufreq/arm_big_little_dt.c
index d5ae4d2..173ed05 100644
--- a/drivers/cpufreq/arm_big_little_dt.c
+++ b/drivers/cpufreq/arm_big_little_dt.c
@@ -66,8 +66,8 @@ static int dt_get_transition_latency(struct device *cpu_dev)
parent = of_find_node_by_path("/cpus");
if (!parent) {
- pr_err("failed to find OF /cpus\n");
- return -ENOENT;
+ pr_info("Failed to find OF /cpus. Use CPUFREQ_ETERNAL transition latency\n");
+ return CPUFREQ_ETERNAL;
}
for_each_child_of_node(parent, np) {
@@ -81,7 +81,8 @@ static int dt_get_transition_latency(struct device *cpu_dev)
return transition_latency;
}
- return -ENODEV;
+ pr_info("clock-latency isn't found, use CPUFREQ_ETERNAL transition latency\n");
+ return CPUFREQ_ETERNAL;
}
static struct cpufreq_arm_bL_ops dt_bL_ops = {
--
1.7.12.rc2.18.g61b472e
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH 4/5] cpufreq: ARM big LITTLE: Move cpu_to_cluster() to arm_big_little.h
2013-04-29 13:24 [PATCH 0/5] CPUFreq: ARM big LITTLE Fixes Viresh Kumar
` (2 preceding siblings ...)
2013-04-29 13:24 ` [PATCH 3/5] cpufreq: ARM big LITTLE DT: Return CPUFREQ_ETERNAL if clock-latency isn't found Viresh Kumar
@ 2013-04-29 13:24 ` Viresh Kumar
2013-04-29 13:24 ` [PATCH 5/5] cpufreq: ARM big LITTLE: Improve print message Viresh Kumar
2013-05-02 21:19 ` [PATCH 0/5] CPUFreq: ARM big LITTLE Fixes Rafael J. Wysocki
5 siblings, 0 replies; 7+ messages in thread
From: Viresh Kumar @ 2013-04-29 13:24 UTC (permalink / raw)
To: rjw
Cc: linaro-kernel, patches, cpufreq, linux-pm, linux-kernel,
robin.randhawa, Steve.Bannister, Liviu.Dudau,
charles.garcia-tobin, arvind.chauhan, linux-arm-kernel,
Viresh Kumar
This routine can be used by glue drivers and so better to keep it in
arm_big_little.h file.
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
---
drivers/cpufreq/arm_big_little.c | 5 -----
drivers/cpufreq/arm_big_little.h | 5 +++++
2 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/drivers/cpufreq/arm_big_little.c b/drivers/cpufreq/arm_big_little.c
index dbdf677..fd7beed 100644
--- a/drivers/cpufreq/arm_big_little.c
+++ b/drivers/cpufreq/arm_big_little.c
@@ -40,11 +40,6 @@ static struct clk *clk[MAX_CLUSTERS];
static struct cpufreq_frequency_table *freq_table[MAX_CLUSTERS];
static atomic_t cluster_usage[MAX_CLUSTERS] = {ATOMIC_INIT(0), ATOMIC_INIT(0)};
-static int cpu_to_cluster(int cpu)
-{
- return topology_physical_package_id(cpu);
-}
-
static unsigned int bL_cpufreq_get(unsigned int cpu)
{
u32 cur_cluster = cpu_to_cluster(cpu);
diff --git a/drivers/cpufreq/arm_big_little.h b/drivers/cpufreq/arm_big_little.h
index 70f18fc..79b2ce1 100644
--- a/drivers/cpufreq/arm_big_little.h
+++ b/drivers/cpufreq/arm_big_little.h
@@ -34,6 +34,11 @@ struct cpufreq_arm_bL_ops {
int (*init_opp_table)(struct device *cpu_dev);
};
+static inline int cpu_to_cluster(int cpu)
+{
+ return topology_physical_package_id(cpu);
+}
+
int bL_cpufreq_register(struct cpufreq_arm_bL_ops *ops);
void bL_cpufreq_unregister(struct cpufreq_arm_bL_ops *ops);
--
1.7.12.rc2.18.g61b472e
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH 5/5] cpufreq: ARM big LITTLE: Improve print message
2013-04-29 13:24 [PATCH 0/5] CPUFreq: ARM big LITTLE Fixes Viresh Kumar
` (3 preceding siblings ...)
2013-04-29 13:24 ` [PATCH 4/5] cpufreq: ARM big LITTLE: Move cpu_to_cluster() to arm_big_little.h Viresh Kumar
@ 2013-04-29 13:24 ` Viresh Kumar
2013-05-02 21:19 ` [PATCH 0/5] CPUFreq: ARM big LITTLE Fixes Rafael J. Wysocki
5 siblings, 0 replies; 7+ messages in thread
From: Viresh Kumar @ 2013-04-29 13:24 UTC (permalink / raw)
To: rjw
Cc: linaro-kernel, patches, cpufreq, linux-pm, linux-kernel,
robin.randhawa, Steve.Bannister, Liviu.Dudau,
charles.garcia-tobin, arvind.chauhan, linux-arm-kernel,
Viresh Kumar
Print message at the end of driver->init() doesn't carry "cpufreq" string at all
and so is difficult to find in dmesg. Add function name in message to clearly
state where the message is coming from.
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
---
drivers/cpufreq/arm_big_little.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/cpufreq/arm_big_little.c b/drivers/cpufreq/arm_big_little.c
index fd7beed..5d7f53f 100644
--- a/drivers/cpufreq/arm_big_little.c
+++ b/drivers/cpufreq/arm_big_little.c
@@ -187,7 +187,7 @@ static int bL_cpufreq_init(struct cpufreq_policy *policy)
cpumask_copy(policy->cpus, topology_core_cpumask(policy->cpu));
- dev_info(cpu_dev, "CPU %d initialized\n", policy->cpu);
+ dev_info(cpu_dev, "%s: CPU %d initialized\n", __func__, policy->cpu);
return 0;
}
--
1.7.12.rc2.18.g61b472e
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH 0/5] CPUFreq: ARM big LITTLE Fixes
2013-04-29 13:24 [PATCH 0/5] CPUFreq: ARM big LITTLE Fixes Viresh Kumar
` (4 preceding siblings ...)
2013-04-29 13:24 ` [PATCH 5/5] cpufreq: ARM big LITTLE: Improve print message Viresh Kumar
@ 2013-05-02 21:19 ` Rafael J. Wysocki
5 siblings, 0 replies; 7+ messages in thread
From: Rafael J. Wysocki @ 2013-05-02 21:19 UTC (permalink / raw)
To: Viresh Kumar
Cc: linaro-kernel, patches, cpufreq, linux-pm, linux-kernel,
robin.randhawa, Steve.Bannister, Liviu.Dudau,
charles.garcia-tobin, arvind.chauhan, linux-arm-kernel
On Monday, April 29, 2013 06:54:43 PM Viresh Kumar wrote:
> Hi Rafael,
>
> I know I am late for this merge window and you have already closed the gates :)
> If you can still take them, its good, otherwise we will push this for v3.10-rc2.
>
> These are minor fixes for ARM big LITTLE cpufreq driver. It doesn't impact any
> other driver or cpufreq core and are fairly independent.
>
> Viresh Kumar (5):
> cpufreq: ARM big LITTLE: Select PM_OPP
> cpufreq: ARM big LITTLE DT: Return correct transition latency
> cpufreq: ARM big LITTLE DT: Return CPUFREQ_ETERNAL if clock-latency
> isn't found
> cpufreq: ARM big LITTLE: Move cpu_to_cluster() to arm_big_little.h
> cpufreq: ARM big LITTLE: Improve print message
>
> drivers/cpufreq/Kconfig.arm | 1 +
> drivers/cpufreq/arm_big_little.c | 7 +------
> drivers/cpufreq/arm_big_little.h | 5 +++++
> drivers/cpufreq/arm_big_little_dt.c | 9 +++++----
> 4 files changed, 12 insertions(+), 10 deletions(-)
All 5 queued up for the v3.10-rc2 push.
Thanks,
Rafael
--
I speak only for myself.
Rafael J. Wysocki, Intel Open Source Technology Center.
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2013-05-02 21:11 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-04-29 13:24 [PATCH 0/5] CPUFreq: ARM big LITTLE Fixes Viresh Kumar
2013-04-29 13:24 ` [PATCH 1/5] cpufreq: ARM big LITTLE: Select PM_OPP Viresh Kumar
2013-04-29 13:24 ` [PATCH 2/5] cpufreq: ARM big LITTLE DT: Return correct transition latency Viresh Kumar
2013-04-29 13:24 ` [PATCH 3/5] cpufreq: ARM big LITTLE DT: Return CPUFREQ_ETERNAL if clock-latency isn't found Viresh Kumar
2013-04-29 13:24 ` [PATCH 4/5] cpufreq: ARM big LITTLE: Move cpu_to_cluster() to arm_big_little.h Viresh Kumar
2013-04-29 13:24 ` [PATCH 5/5] cpufreq: ARM big LITTLE: Improve print message Viresh Kumar
2013-05-02 21:19 ` [PATCH 0/5] CPUFreq: ARM big LITTLE Fixes Rafael J. Wysocki
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).