aboutsummaryrefslogtreecommitdiff
path: root/services/std_svc/psci/psci_off.c
diff options
context:
space:
mode:
Diffstat (limited to 'services/std_svc/psci/psci_off.c')
-rw-r--r--services/std_svc/psci/psci_off.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/services/std_svc/psci/psci_off.c b/services/std_svc/psci/psci_off.c
index 686666d54f..36dab4972e 100644
--- a/services/std_svc/psci/psci_off.c
+++ b/services/std_svc/psci/psci_off.c
@@ -100,6 +100,11 @@ int psci_do_cpu_off(unsigned int end_pwrlvl)
*/
psci_do_state_coordination(end_pwrlvl, &state_info);
+#if ENABLE_PSCI_STAT
+ /* Update the last cpu for each level till end_pwrlvl */
+ psci_stats_update_pwr_down(end_pwrlvl, &state_info);
+#endif
+
/*
* Arch. management. Perform the necessary steps to flush all
* cpu caches.
@@ -112,6 +117,16 @@ int psci_do_cpu_off(unsigned int end_pwrlvl)
*/
psci_plat_pm_ops->pwr_domain_off(&state_info);
+#if ENABLE_PSCI_STAT
+ /*
+ * Capture time-stamp while entering low power state.
+ * No cache maintenance needed because caches are off
+ * and writes are direct to main memory.
+ */
+ PMF_CAPTURE_TIMESTAMP(psci_svc, PSCI_STAT_ID_ENTER_LOW_PWR,
+ PMF_NO_CACHE_MAINT);
+#endif
+
exit:
/*
* Release the locks corresponding to each power level in the