diff options
Diffstat (limited to 'services/std_svc/psci/psci_common.c')
-rw-r--r-- | services/std_svc/psci/psci_common.c | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/services/std_svc/psci/psci_common.c b/services/std_svc/psci/psci_common.c index 8a2b81c3..5090037e 100644 --- a/services/std_svc/psci/psci_common.c +++ b/services/std_svc/psci/psci_common.c @@ -711,6 +711,16 @@ void psci_power_up_finish(void) psci_acquire_pwr_domain_locks(end_pwrlvl, cpu_idx); +#if ENABLE_PSCI_STAT + /* + * Capture power up time-stamp. + * No cache maintenance is required as caches are off + * and writes are direct to the main memory. + */ + PMF_CAPTURE_TIMESTAMP(psci_svc, PSCI_STAT_ID_EXIT_LOW_PWR, + PMF_NO_CACHE_MAINT); +#endif + psci_get_target_local_pwr_states(end_pwrlvl, &state_info); /* @@ -736,6 +746,16 @@ void psci_power_up_finish(void) */ psci_set_pwr_domains_to_run(end_pwrlvl); +#if ENABLE_PSCI_STAT + /* + * Update PSCI stats. + * Caches are off when writing stats data on the power down path. + * Since caches are now enabled, it's necessary to do cache + * maintenance before reading that same data. + */ + psci_stats_update_pwr_up(end_pwrlvl, &state_info, PMF_CACHE_MAINT); +#endif + /* * This loop releases the lock corresponding to each power level * in the reverse order to which they were acquired. |