diff options
author | Wen Yi <wyi@nvidia.com> | 2011-08-31 13:50:10 -0700 |
---|---|---|
committer | Rohan Somvanshi <rsomvanshi@nvidia.com> | 2011-09-06 03:09:14 -0700 |
commit | 5d87efe99b0659df8afdc56be9f6338d48621ac9 (patch) | |
tree | 12e96bef26248d5c14720efcf1ba155e6d6e461c | |
parent | d827065381dbcd0d4884267b86397fb2af009c21 (diff) |
arm: tegra: set cpu0 governor only for t30
The cpufreq sysfs entry for cpus other than cpu0 in T30 is
populated when the cpu becomes online and removed when the cpu
becomes offline. This caused race condition between setting cpu
governor and bringing cpu offline. The solution is to change
the governor for cpu0 only.
BUG 865113
Change-Id: I36d3f9795c0a1ec51bcde00a497ec85864dc2573
Reviewed-on: http://git-master/r/50155
Reviewed-by: Rohan Somvanshi <rsomvanshi@nvidia.com>
Tested-by: Rohan Somvanshi <rsomvanshi@nvidia.com>
-rw-r--r-- | arch/arm/mach-tegra/common.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/arch/arm/mach-tegra/common.c b/arch/arm/mach-tegra/common.c index 45ed7344e996..4661f9e1d368 100644 --- a/arch/arm/mach-tegra/common.c +++ b/arch/arm/mach-tegra/common.c @@ -794,7 +794,7 @@ static void cpufreq_set_governor(char *governor) struct file *scaling_gov = NULL; mm_segment_t old_fs; char buf[128]; - int i; + int i = 0; loff_t offset = 0; if (governor == NULL) @@ -804,7 +804,10 @@ static void cpufreq_set_governor(char *governor) old_fs = get_fs(); set_fs(KERNEL_DS); - for_each_online_cpu(i) { +#ifndef CONFIG_TEGRA_AUTO_HOTPLUG + for_each_online_cpu(i) +#endif + { sprintf(buf, cpufreq_sysfs_place_holder, i); scaling_gov = filp_open(buf, O_RDWR, 0); if (IS_ERR_OR_NULL(scaling_gov)) { |