summaryrefslogtreecommitdiff
path: root/lib/psci/psci_suspend.c
diff options
context:
space:
mode:
authordp-arm <dimitris.papastamos@arm.com>2017-01-31 13:03:00 +0000
committerdp-arm <dimitris.papastamos@arm.com>2017-02-13 14:33:07 +0000
commite5bbd16a2497162d413460880aba8c3416d32d6d (patch)
treea07b60cbb3e64f942e42a273eb2cd142689a4fbb /lib/psci/psci_suspend.c
parent04c1db1e574604081bfdcec3d26e662535812eaa (diff)
PSCI: Do stat accounting for retention/standby states
Perform stat accounting for retention/standby states also when requested at multiple power levels. Change-Id: I2c495ea7cdff8619bde323fb641cd84408eb5762 Signed-off-by: dp-arm <dimitris.papastamos@arm.com>
Diffstat (limited to 'lib/psci/psci_suspend.c')
-rw-r--r--lib/psci/psci_suspend.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/lib/psci/psci_suspend.c b/lib/psci/psci_suspend.c
index 5c8c3e26..302116bd 100644
--- a/lib/psci/psci_suspend.c
+++ b/lib/psci/psci_suspend.c
@@ -251,6 +251,10 @@ exit:
PMF_NO_CACHE_MAINT);
#endif
+#if ENABLE_PSCI_STAT
+ plat_psci_stat_accounting_start(state_info);
+#endif
+
/*
* We will reach here if only retention/standby states have been
* requested at multiple power levels. This means that the cpu
@@ -258,6 +262,11 @@ exit:
*/
wfi();
+#if ENABLE_PSCI_STAT
+ plat_psci_stat_accounting_stop(state_info);
+ psci_stats_update_pwr_up(end_pwrlvl, state_info);
+#endif
+
#if ENABLE_RUNTIME_INSTRUMENTATION
PMF_CAPTURE_TIMESTAMP(rt_instr_svc,
RT_INSTR_EXIT_HW_LOW_PWR,