diff options
author | Ranjani Vaidyanathan <ra5478@freescale.com> | 2011-10-19 17:38:37 -0500 |
---|---|---|
committer | Eric Miao <eric.miao@canonical.com> | 2011-11-10 07:38:48 +0800 |
commit | 1ab5aa61f14c7f74a0af60148a785b34604ff551 (patch) | |
tree | 116224303fd27f17a4ae3425e8e6e749c53c85bd /arch | |
parent | dd24f739d3364282a400f0c85c9deae7f73fe52a (diff) |
ENGR00160397: Fix build break caused by DVFS-CORE driver
loops_per_jiffy is a global variable for non-smp platforms.
For SMP platforms, loops_per_jiffy is a per_cpu variable.
Fix dvfs_core to adjust loops_per_jiffy for both configurations.
Signed-off-by: Ranjani Vaidyanathan <ra5478@freescale.com>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/arm/plat-mxc/dvfs_core.c | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/arch/arm/plat-mxc/dvfs_core.c b/arch/arm/plat-mxc/dvfs_core.c index 518d064112f..f1a74ba503a 100644 --- a/arch/arm/plat-mxc/dvfs_core.c +++ b/arch/arm/plat-mxc/dvfs_core.c @@ -655,11 +655,19 @@ static void dvfs_core_work_handler(struct work_struct *work) END: if (cpufreq_trig_needed == 1) { /*Fix loops-per-jiffy */ - cpufreq_trig_needed = 0; +#ifdef CONFIG_SMP for_each_online_cpu(cpu) per_cpu(cpu_data, cpu).loops_per_jiffy = dvfs_cpu_jiffies(per_cpu(cpu_data, cpu).loops_per_jiffy, curr_cpu / 1000, clk_get_rate(cpu_clk) / 1000); +#else + u32 old_loops_per_jiffy = loops_per_jiffy; + + loops_per_jiffy = + dvfs_cpu_jiffies(old_loops_per_jiffy, + curr_cpu/1000, clk_get_rate(cpu_clk) / 1000); +#endif + cpufreq_trig_needed = 0; } /* Set MAXF, MINF */ @@ -713,10 +721,18 @@ void stop_dvfs(void) set_cpu_freq(curr_op); /*Fix loops-per-jiffy */ +#ifdef CONFIG_SMP for_each_online_cpu(cpu) per_cpu(cpu_data, cpu).loops_per_jiffy = dvfs_cpu_jiffies(per_cpu(cpu_data, cpu).loops_per_jiffy, curr_cpu/1000, clk_get_rate(cpu_clk) / 1000); +#else + u32 old_loops_per_jiffy = loops_per_jiffy; + + loops_per_jiffy = + dvfs_cpu_jiffies(old_loops_per_jiffy, + curr_cpu/1000, clk_get_rate(cpu_clk) / 1000); +#endif } spin_lock_irqsave(&mxc_dvfs_core_lock, flags); |