Subject: cell: update latency time of Cell BE processor to the correct value The original method of measuring the latency time for frequency switches was inaccurate. This fixes the method, and the measured latency time reported by the backend cpufreq driver. Signed-off-by: Christian Krafft Index: linux-2.6/arch/powerpc/platforms/cell/cbe_cpufreq.c =================================================================== --- linux-2.6.orig/arch/powerpc/platforms/cell/cbe_cpufreq.c +++ linux-2.6/arch/powerpc/platforms/cell/cbe_cpufreq.c @@ -124,8 +124,8 @@ static int set_pmode(int cpu, unsigned i #ifdef DEBUG time = (u64) get_cycles() - time; /* actual cycles (not cpu cycles!) */ - time = 1000000000 * time / CLOCK_TICK_RATE; /* time in ns (10^-9) */ - pr_debug("had to wait %lu ns for a transition\n", time); + time = time / tb_ticks_per_usec; /* time in usec (10^-6) */ + pr_debug("had to wait %lu usec for a transition\n", time); #endif rc = 0; @@ -171,7 +171,7 @@ static int cbe_cpufreq_cpu_init (struct policy->governor = CPUFREQ_DEFAULT_GOVERNOR; /* if DEBUG is enabled set_pmode() measures the correct latency of a transition */ - policy->cpuinfo.transition_latency = 430000; + policy->cpuinfo.transition_latency = 25000; cur_pmode = get_pmode(policy->cpu); pr_debug("current pmode is at %d\n",cur_pmode);