summaryrefslogtreecommitdiff
path: root/arch/arm/mach-tegra/cpuidle-t11x.c
diff options
context:
space:
mode:
authorBo Yan <byan@nvidia.com>2013-02-06 16:30:50 -0800
committerDan Willemsen <dwillemsen@nvidia.com>2013-09-14 12:57:37 -0700
commitc3347dc3bf6e4f39625fd2919a0f6ce9d7894453 (patch)
tree7aefde71d54a47bfa9d0a0a7eb6fdd8e156f9da1 /arch/arm/mach-tegra/cpuidle-t11x.c
parent6258d51aab8d398c03b15c5ce4c9eeca6f168ed4 (diff)
ARM: tegra11x: Remove redundant cpu_number calls
The "cpu_number" maps cpu number for slow cluster to "4", this can be reused later, no need to call "cpu_number" every time. Change-Id: Ib0636b80b587868e23a6b07a5cc9960e13d38353 Signed-off-by: Bo Yan <byan@nvidia.com> Reviewed-on: http://git-master/r/198580 (cherry picked from commit 79faef4783ff207f38d76c283704e3b70ea31f18) Reviewed-on: http://git-master/r/200853 GVS: Gerrit_Virtual_Submit Reviewed-by: Seshendra Gadagottu <sgadagottu@nvidia.com> Reviewed-by: Yu-Huan Hsu <yhsu@nvidia.com>
Diffstat (limited to 'arch/arm/mach-tegra/cpuidle-t11x.c')
-rw-r--r--arch/arm/mach-tegra/cpuidle-t11x.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/arch/arm/mach-tegra/cpuidle-t11x.c b/arch/arm/mach-tegra/cpuidle-t11x.c
index 517a9555243c..6eea8f333f9c 100644
--- a/arch/arm/mach-tegra/cpuidle-t11x.c
+++ b/arch/arm/mach-tegra/cpuidle-t11x.c
@@ -375,9 +375,7 @@ static bool tegra_cpu_core_power_down(struct cpuidle_device *dev,
struct arch_timer_context timer_context;
bool sleep_completed = false;
struct tick_sched *ts = tick_get_tick_sched(dev->cpu);
-#ifdef CONFIG_TRUSTED_FOUNDATIONS
unsigned int cpu = cpu_number(dev->cpu);
-#endif
if (!arch_timer_get_state(&timer_context)) {
if ((timer_context.cntp_ctl & ARCH_TIMER_CTRL_ENABLE) &&
@@ -418,7 +416,7 @@ static bool tegra_cpu_core_power_down(struct cpuidle_device *dev,
clockevents_notify(CLOCK_EVT_NOTIFY_BROADCAST_ENTER, &dev->cpu);
tegra_pd_set_trigger(sleep_time);
#endif
- idle_stats.tear_down_count[cpu_number(dev->cpu)]++;
+ idle_stats.tear_down_count[cpu]++;
entry_time = ktime_get();
@@ -446,17 +444,17 @@ static bool tegra_cpu_core_power_down(struct cpuidle_device *dev,
clockevents_notify(CLOCK_EVT_NOTIFY_BROADCAST_EXIT, &dev->cpu);
#endif
sleep_time = ktime_to_us(ktime_sub(ktime_get(), entry_time));
- idle_stats.cpu_pg_time[cpu_number(dev->cpu)] += sleep_time;
+ idle_stats.cpu_pg_time[cpu] += sleep_time;
if (sleep_completed) {
/*
* Stayed in LP2 for the full time until timer expires,
* adjust the exit latency based on measurement
*/
int offset = sleep_time - request;
- int latency = pd_exit_latencies[cpu_number(dev->cpu)] +
+ int latency = pd_exit_latencies[cpu] +
offset / 16;
latency = clamp(latency, 0, 10000);
- pd_exit_latencies[cpu_number(dev->cpu)] = latency;
+ pd_exit_latencies[cpu] = latency;
state->exit_latency = latency; /* for idle governor */
smp_wmb();
}