diff options
author | Antti P Miettinen <amiettinen@nvidia.com> | 2013-08-21 14:16:37 +0300 |
---|---|---|
committer | Dan Willemsen <dwillemsen@nvidia.com> | 2013-09-14 13:43:17 -0700 |
commit | 08c4372baa2a9d6775c88e5c8a49699f15c46436 (patch) | |
tree | e265cf80c83121a17578f65bb75d3d12ed036607 | |
parent | 4097de083e55e9e5fe61177ee1c458b5bfe1b19a (diff) |
ARM: Tegra: Move cluster switch tracepoints
Move tracepoints for measuring cluster switch latency
to account for the whole interrupts-disabled time.
Change-Id: Ib49cc54078d2e284c34b55dd6e2dc57431706b78
Signed-off-by: Antti P Miettinen <amiettinen@nvidia.com>
Reviewed-on: http://git-master/r/264800
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Aleksandr Frid <afrid@nvidia.com>
Reviewed-by: Juha Tukkinen <jtukkinen@nvidia.com>
-rw-r--r-- | arch/arm/mach-tegra/pm-t3.c | 12 | ||||
-rw-r--r-- | arch/arm/mach-tegra/pm.c | 11 |
2 files changed, 12 insertions, 11 deletions
diff --git a/arch/arm/mach-tegra/pm-t3.c b/arch/arm/mach-tegra/pm-t3.c index 6d4e8937428a..115493580e75 100644 --- a/arch/arm/mach-tegra/pm-t3.c +++ b/arch/arm/mach-tegra/pm-t3.c @@ -29,6 +29,7 @@ #include <linux/clockchips.h> #include <linux/cpu_pm.h> #include <linux/irqchip/arm-gic.h> +#include <linux/sched.h> #include <mach/irqs.h> #include <mach/io_dpd.h> @@ -47,6 +48,9 @@ #include "tegra3_emc.h" #include "dvfs.h" +#define CREATE_TRACE_POINTS +#include <trace/events/nvpower.h> + #ifdef CONFIG_TEGRA_CLUSTER_CONTROL #define CAR_CCLK_BURST_POLICY \ (IO_ADDRESS(TEGRA_CLK_RESET_BASE) + 0x20) @@ -481,6 +485,10 @@ int tegra_cluster_control(unsigned int us, unsigned int flags) } local_irq_save(irq_flags); + if (is_idle_task(current)) + trace_nvcpu_cluster_rcuidle(NVPOWER_CPU_CLUSTER_START); + else + trace_nvcpu_cluster(NVPOWER_CPU_CLUSTER_START); tegra_cluster_switch_time(flags, tegra_cluster_switch_time_id_start); #ifdef CONFIG_TEGRA_VIRTUAL_CPUID @@ -532,6 +540,10 @@ int tegra_cluster_control(unsigned int us, unsigned int flags) } } tegra_cluster_switch_time(flags, tegra_cluster_switch_time_id_end); + if (is_idle_task(current)) + trace_nvcpu_cluster_rcuidle(NVPOWER_CPU_CLUSTER_DONE); + else + trace_nvcpu_cluster(NVPOWER_CPU_CLUSTER_DONE); local_irq_restore(irq_flags); DEBUG_CLUSTER(("%s: %s\r\n", __func__, is_lp_cluster() ? "LP" : "G")); diff --git a/arch/arm/mach-tegra/pm.c b/arch/arm/mach-tegra/pm.c index f341b25b7b11..ee232319f99e 100644 --- a/arch/arm/mach-tegra/pm.c +++ b/arch/arm/mach-tegra/pm.c @@ -83,9 +83,6 @@ #include "tegra14_scratch.h" #endif -#define CREATE_TRACE_POINTS -#include <trace/events/nvpower.h> - struct suspend_context { /* * The next 7 values are referenced by offset in __restart_plls @@ -745,10 +742,6 @@ unsigned int tegra_idle_power_down_last(unsigned int sleep_time, */ suspend_cpu_dfll_mode(flags); if (flags & TEGRA_POWER_CLUSTER_MASK) { - if (is_idle_task(current)) - trace_nvcpu_cluster_rcuidle(NVPOWER_CPU_CLUSTER_START); - else - trace_nvcpu_cluster(NVPOWER_CPU_CLUSTER_START); #if defined(CONFIG_OF) && defined(CONFIG_COMMON_CLK) set_power_timers(pdata->cpu_timer, 2); #else @@ -884,10 +877,6 @@ unsigned int tegra_idle_power_down_last(unsigned int sleep_time, if (flags & TEGRA_POWER_CLUSTER_MASK) { tegra_cluster_switch_epilog(flags); - if (is_idle_task(current)) - trace_nvcpu_cluster_rcuidle(NVPOWER_CPU_CLUSTER_DONE); - else - trace_nvcpu_cluster(NVPOWER_CPU_CLUSTER_DONE); } resume_cpu_dfll_mode(flags); tegra_cluster_switch_time(flags, tegra_cluster_switch_time_id_epilog); |