aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorDima Zavin <dima@android.com>2011-10-19 16:35:49 -0700
committerDima Zavin <dima@android.com>2011-10-19 20:11:00 -0700
commit3f324f1cd090b7c98505ab0f03c5fc15bbad3477 (patch)
tree553e672bf1d6774875625e71152355b7f5054421 /arch
parentfcc76b033d0f742e6a62b130d621a307ac82ceba (diff)
downloadkernel_samsung_tuna-3f324f1cd090b7c98505ab0f03c5fc15bbad3477.zip
kernel_samsung_tuna-3f324f1cd090b7c98505ab0f03c5fc15bbad3477.tar.gz
kernel_samsung_tuna-3f324f1cd090b7c98505ab0f03c5fc15bbad3477.tar.bz2
ARM: omap2: cpufreq: prevent CPU hotplug while scaling
Change-Id: I82f1e671a8c4eec2629aae223e4bb2043eb11840 Signed-off-by: Dima Zavin <dima@android.com>
Diffstat (limited to 'arch')
-rw-r--r--arch/arm/mach-omap2/omap2plus-cpufreq.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/arch/arm/mach-omap2/omap2plus-cpufreq.c b/arch/arm/mach-omap2/omap2plus-cpufreq.c
index 85a34a5..c11f7fd 100644
--- a/arch/arm/mach-omap2/omap2plus-cpufreq.c
+++ b/arch/arm/mach-omap2/omap2plus-cpufreq.c
@@ -92,6 +92,8 @@ static int omap_cpufreq_scale(unsigned int target_freq, unsigned int cur_freq)
if ((freqs.old == freqs.new) && (cur_freq = freqs.new))
return 0;
+ get_online_cpus();
+
/* notifiers */
for_each_online_cpu(freqs.cpu)
cpufreq_notify_transition(&freqs, CPUFREQ_PRECHANGE);
@@ -134,6 +136,8 @@ static int omap_cpufreq_scale(unsigned int target_freq, unsigned int cur_freq)
for_each_online_cpu(freqs.cpu)
cpufreq_notify_transition(&freqs, CPUFREQ_POSTCHANGE);
+ put_online_cpus();
+
return ret;
}