diff options
author | Santosh Shilimkar <santosh.shilimkar@ti.com> | 2011-06-03 17:46:57 +0530 |
---|---|---|
committer | Kevin Hilman <khilman@ti.com> | 2011-06-06 16:03:58 -0700 |
commit | 3b2282e5f04aab16f840eb7e91685f657dd3be9d (patch) | |
tree | 41ff3886c064f2c93701c29e61e88d67706883df /arch/arm/mach-omap2/omap2plus-cpufreq.c | |
parent | ba3b69713525a8ff8200efe0382a15e6a832c03c (diff) | |
download | kernel_samsung_tuna-3b2282e5f04aab16f840eb7e91685f657dd3be9d.zip kernel_samsung_tuna-3b2282e5f04aab16f840eb7e91685f657dd3be9d.tar.gz kernel_samsung_tuna-3b2282e5f04aab16f840eb7e91685f657dd3be9d.tar.bz2 |
OMAP2+: CPUfreq: Remove superfluous check in target() for online CPU's.
Current OMAP2PLUS CPUfreq tagret() functions returns when all
the CPU's are not online. This breaks CPUfreq when secondary CPUs
are offlined on SMP system.
The intention of that check was just avoid CPU frequency change
during the window when CPU becomes online but it's cpufreq_init is
not done yet. Otherwise it can lead to notifiers being sent on
a CPU which is not yet registered to the governor.
But this race conditions is already managed by the CPUfreq
core driver by updating the available cpumask accordingly.
OMAP CPUFReq driver make use same cpumask for the notifiers
so the above problem doesn't exist. In my initial implementation
of the OMAP4 CPUFreq driver, I was using 'for_each_online_cpu()'
for notifiers which lead me to add that check. Later I fixed
the notifies but didn't realise that the check has become
redundant then.
Fix it by removing the superfluous check in target().
Thanks for Nishant Menon <nm@ti.com> for reporting issue
with hot-plug and Kevin Hilman <khilman@ti.com> for his
comment on excessive check in target().
Signed-off-by: Santosh Shilimkar <santosh.shilimkar@ti.com>
Reported-by: Nishanth Menon <nm@ti.com>
Tested-by: Vishwanath BS <vishwanath.bs@ti.com>
Cc: Kevin Hilman <khilman@ti.com>
Tested-by: Nishanth Menon <nm@ti.com>
Diffstat (limited to 'arch/arm/mach-omap2/omap2plus-cpufreq.c')
-rw-r--r-- | arch/arm/mach-omap2/omap2plus-cpufreq.c | 4 |
1 files changed, 0 insertions, 4 deletions
diff --git a/arch/arm/mach-omap2/omap2plus-cpufreq.c b/arch/arm/mach-omap2/omap2plus-cpufreq.c index 1406577..911bd97 100644 --- a/arch/arm/mach-omap2/omap2plus-cpufreq.c +++ b/arch/arm/mach-omap2/omap2plus-cpufreq.c @@ -70,10 +70,6 @@ static int omap_target(struct cpufreq_policy *policy, int ret = 0; struct cpufreq_freqs freqs; - /* Changes not allowed until all CPUs are online */ - if (is_smp() && (num_online_cpus() < NR_CPUS)) - return ret; - if (!freq_table) { dev_err(mpu_dev, "%s: cpu%d: no freq table!\n", __func__, policy->cpu); |