From 8215d8fbbf0cd3b4b65b6c10259ee34c5bc2a3ff Mon Sep 17 00:00:00 2001 From: =?utf8?q?=E9=BB=84=E6=B6=9B?= Date: Thu, 12 Jul 2012 09:31:21 +0800 Subject: [PATCH] rk30: cpufreq: prevent deadlock by disable call get_online_cpus The deadlock happens when: rk30_cpufreq_temp_limit_work_func: cpufreq_driver_target lock_policy_rwsem_write mutex_lock(&cpufreq_mutex) cpufreq_interactive_up_task: mutex_lock(&cpufreq_mutex) mutex_lock(&cpu_hotplug.lock) _cpu_down: mutex_lock(&cpu_hotplug.lock) lock_policy_rwsem_write --- arch/arm/mach-rk30/cpufreq.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/arch/arm/mach-rk30/cpufreq.c b/arch/arm/mach-rk30/cpufreq.c index f7a1c87c21b7..d7d05d2c82fe 100755 --- a/arch/arm/mach-rk30/cpufreq.c +++ b/arch/arm/mach-rk30/cpufreq.c @@ -548,7 +548,6 @@ int cpufreq_scale_rate_for_dvfs(struct clk *clk, unsigned long rate, dvfs_set_ra freqs.new = rate / 1000; freqs.old = rk30_getspeed(0); - get_online_cpus(); for_each_online_cpu(freqs.cpu) { cpufreq_notify_transition(&freqs, CPUFREQ_PRECHANGE); } @@ -571,7 +570,6 @@ int cpufreq_scale_rate_for_dvfs(struct clk *clk, unsigned long rate, dvfs_set_ra for_each_online_cpu(freqs.cpu) { cpufreq_notify_transition(&freqs, CPUFREQ_POSTCHANGE); } - put_online_cpus(); return ret; } -- 2.34.1