diff options
author | Peter De Schrijver <pdeschrijver@nvidia.com> | 2011-05-18 11:10:08 +0300 |
---|---|---|
committer | Niket Sirsi <nsirsi@nvidia.com> | 2011-05-23 17:29:27 -0700 |
commit | b263419bc978c9a9df7a2006c1287d86e726b209 (patch) | |
tree | ac4c5491252916ca5f07b67b5fecb1533793ccf2 /arch/arm | |
parent | df49f87271b01240c95aca925c6b13a549336967 (diff) |
ARM: tegra: power: trace C states and CPU mode switches
Change-Id: I7915d356f18ac830c93b736463406b907d8c1cef
Signed-off-by: Peter De Schrijver <pdeschrijver@nvidia.com>
Reviewed-on: http://git-master/r/31958
Reviewed-by: Niket Sirsi <nsirsi@nvidia.com>
Tested-by: Niket Sirsi <nsirsi@nvidia.com>
Diffstat (limited to 'arch/arm')
-rw-r--r-- | arch/arm/mach-tegra/cpuidle-t3.c | 6 | ||||
-rw-r--r-- | arch/arm/mach-tegra/cpuidle.c | 4 | ||||
-rw-r--r-- | arch/arm/mach-tegra/suspend-t3.c | 4 |
3 files changed, 14 insertions, 0 deletions
diff --git a/arch/arm/mach-tegra/cpuidle-t3.c b/arch/arm/mach-tegra/cpuidle-t3.c index bf99617aa243..83625c20aaa5 100644 --- a/arch/arm/mach-tegra/cpuidle-t3.c +++ b/arch/arm/mach-tegra/cpuidle-t3.c @@ -47,6 +47,8 @@ #include <mach/legacy_irq.h> #include <mach/suspend.h> +#include <trace/events/power.h> + #include "power.h" #include "reset.h" #include "clock.h" @@ -210,6 +212,8 @@ void tegra_idle_enter_lp2_cpu_0(struct cpuidle_device *dev, idle_stats.lp2_count++; idle_stats.lp2_count_bin[bin]++; + trace_power_start(POWER_CSTATE, 2, dev->cpu); + if (tegra_suspend_lp2(sleep_time, 0) == 0) sleep_completed = true; else @@ -277,6 +281,8 @@ void tegra_idle_enter_lp2_cpu_n(struct cpuidle_device *dev, idle_stats.tear_down_count[cpu_number(dev->cpu)]++; + trace_power_start(POWER_CSTATE, 2, dev->cpu); + /* Save time this CPU must be awakened by. */ tegra_cpu_wake_by_time[dev->cpu] = ktime_to_us(ktime_get()) + request; smp_wmb(); diff --git a/arch/arm/mach-tegra/cpuidle.c b/arch/arm/mach-tegra/cpuidle.c index f0d94c08c1ca..ed74a7476bd3 100644 --- a/arch/arm/mach-tegra/cpuidle.c +++ b/arch/arm/mach-tegra/cpuidle.c @@ -44,6 +44,8 @@ #include <mach/legacy_irq.h> #include <mach/suspend.h> +#include <trace/events/power.h> + #include "power.h" static bool lp2_in_idle __read_mostly = true; @@ -87,6 +89,8 @@ static int tegra_idle_enter_lp3(struct cpuidle_device *dev, ktime_t enter, exit; s64 us; + trace_power_start(POWER_CSTATE, 1, dev->cpu); + local_irq_disable(); local_fiq_disable(); diff --git a/arch/arm/mach-tegra/suspend-t3.c b/arch/arm/mach-tegra/suspend-t3.c index 5d8531b463cb..2c94bac4bf51 100644 --- a/arch/arm/mach-tegra/suspend-t3.c +++ b/arch/arm/mach-tegra/suspend-t3.c @@ -34,6 +34,8 @@ #include <mach/suspend.h> #include <asm/hardware/gic.h> +#include <trace/events/power.h> + #include "clock.h" #include "gpio-names.h" #include "power.h" @@ -289,6 +291,8 @@ int tegra_cluster_control(unsigned int us, unsigned int flags) if (!is_g_cluster_present()) return -EPERM; + trace_power_start(POWER_PSTATE, target_cluster, 0); + if (flags & TEGRA_POWER_CLUSTER_IMMEDIATE) us = 0; |