Skip to contentSkip to conversation

cpufreq: Fix latency for cpufreq_info

PATCH In review Nicholas Krause 2 participants 3 messages Jul 14, 2014 CPU frequency scaling framework

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 cpufreq: Fix latency for cpufreq_info

This fixes the latency for the cpufreq policy to 1 million nanoseconds that calls the function pxa_cpu_init for the member of the structure called cpuinfo.transition_latency.

---
 drivers/cpufreq/pxa2xx-cpufreq.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/cpufreq/pxa2xx-cpufreq.c +1 -1
index e24269a..e08bb98 100644
@@ -372,7 +372,7 @@ static int pxa_cpufreq_init(struct cpufreq_policy *policy)
 	init_sdram_rows();
 
 	/* set default policy and cpuinfo */
-	policy->cpuinfo.transition_latency = 1000; /* FIXME: 1 ms, assumed */
+	policy->cpuinfo.transition_latency = 1000, 000;
 
 	/* Generate pxa25x the run cpufreq_frequency_table struct */
 	for (i = 0; i < NUM_PXA25x_RUN_FREQS; i++) {
Signature · 1 line
1.9.1
maintainer
#1 lore raw
Quoted 14 lines · Nicholas Krause

This fixes the latency for the cpufreq policy to 1 million nanoseconds that calls the function pxa_cpu_init for the member of the structure called cpuinfo.transition_latency.

---
 drivers/cpufreq/pxa2xx-cpufreq.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/cpufreq/pxa2xx-cpufreq.c +0 -0
index e24269a..e08bb98 100644

drivers/cpufreq/pxa2xx-cpufreq.c static int pxa_cpufreq_init(struct cpufreq_policy *policy) · line 375

Quoted 5 lines
drivers/cpufreq/pxa2xx-cpufreq.c +1 -1
@@ -372,7 +372,7 @@ static int pxa_cpufreq_init(struct cpufreq_policy *policy)
        init_sdram_rows();
 
        /* set default policy and cpuinfo */
-       policy->cpuinfo.transition_latency = 1000; /* FIXME: 1 ms, assumed */
+       policy->cpuinfo.transition_latency = 1000, 000;

Have you tried testing this at all? This patch wouldn't change anything. Still 1000 will get assigned to latency :)

Get rid of the comma.

#2 lore raw
Quoted 17 lines · Viresh Kumar
Quoted 16 lines · Nicholas Krause

This fixes the latency for the cpufreq policy to 1 million nanoseconds that calls the function pxa_cpu_init for the member of the structure called cpuinfo.transition_latency.

---
 drivers/cpufreq/pxa2xx-cpufreq.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/cpufreq/pxa2xx-cpufreq.c +0 -0
index e24269a..e08bb98 100644
@@ -372,7 +372,7 @@ static int pxa_cpufreq_init(struct cpufreq_policy *policy)
        init_sdram_rows();
 
Quoted 8 lines

drivers/cpufreq/pxa2xx-cpufreq.c static int pxa_cpufreq_init(struct cpufreq_policy *policy) · line 375

Quoted 3 lines
drivers/cpufreq/pxa2xx-cpufreq.c +1 -1
        /* set default policy and cpuinfo */
-       policy->cpuinfo.transition_latency = 1000; /* FIXME: 1 ms, assumed */
+       policy->cpuinfo.transition_latency = 1000, 000;

Have you tried testing this at all? This patch wouldn't change anything. Still 1000 will get assigned to latency :)

Get rid of the comma.

Sure , sorry about the comma. I am resending this patch to you fixed. Cheers Nick