From cb5adc3105f390b7ac569f81ce6bf7197d5953e9 Mon Sep 17 00:00:00 2001 From: Alex Frid Date: Wed, 30 Mar 2011 20:31:30 -0700 Subject: ARM: tegra: power: Modify auto-hotplug locking Use cpufreq (cpu DFS) mutex for auto-hotplug (instead of a separate one) to serialize cpu frequency scaling, hotplug, and CPU mode switch operations. Original-Change-Id: I7ea865894d1676c865294ab31a903248d9437534 Reviewed-on: http://git-master/r/24893 Reviewed-by: Aleksandr Frid Tested-by: Aleksandr Frid Reviewed-by: Scott Williams Original-Change-Id: I906a23561c1567079a41590a30b29b3d52fa5de8 Rebase-Id: R5d16154c91b41fd02f2a50af7ec6868a7958dc13 --- arch/arm/mach-tegra/cpu-tegra.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'arch/arm/mach-tegra/cpu-tegra.c') diff --git a/arch/arm/mach-tegra/cpu-tegra.c b/arch/arm/mach-tegra/cpu-tegra.c index afdec503f034..ac86d84a7710 100644 --- a/arch/arm/mach-tegra/cpu-tegra.c +++ b/arch/arm/mach-tegra/cpu-tegra.c @@ -279,11 +279,10 @@ static int tegra_target(struct cpufreq_policy *policy, target_cpu_speed[policy->cpu] = freq; new_speed = throttle_governor_speed(tegra_cpu_highest_speed()); ret = tegra_update_cpu_speed(new_speed); -out: - mutex_unlock(&tegra_cpu_lock); - if (ret == 0) tegra_auto_hotplug_governor(new_speed); +out: + mutex_unlock(&tegra_cpu_lock); return ret; } @@ -396,7 +395,7 @@ static int __init tegra_cpufreq_init(void) throttle_lowest_index = table_data->throttle_lowest_index; throttle_highest_index = table_data->throttle_highest_index; #endif - ret = tegra_auto_hotplug_init(); + ret = tegra_auto_hotplug_init(&tegra_cpu_lock); if (ret) return ret; -- cgit v1.2.3