diff options
author | Soby Mathew <soby.mathew@arm.com> | 2017-10-16 15:19:31 +0100 |
---|---|---|
committer | Soby Mathew <soby.mathew@arm.com> | 2017-11-03 13:27:34 +0000 |
commit | bfc87a8dff75688f3f0ef558f4921c4b1acc07b1 (patch) | |
tree | 56156cbd60e72c7796fbe2472f956de9830080ba /lib/psci/psci_common.c | |
parent | 122af7dd6d4937922317bc949ca9b8c62bcd20aa (diff) | |
download | platform_external_arm-trusted-firmware-bfc87a8dff75688f3f0ef558f4921c4b1acc07b1.tar.gz platform_external_arm-trusted-firmware-bfc87a8dff75688f3f0ef558f4921c4b1acc07b1.tar.bz2 platform_external_arm-trusted-firmware-bfc87a8dff75688f3f0ef558f4921c4b1acc07b1.zip |
Fix PSCI STAT time stamp collection
This patch includes various fixes for PSCI STAT functionality
relating to timestamp collection:
1. The PSCI stat accounting for retention states for higher level
power domains were done outside the locks which could lead to
spurious values in some race conditions. This is moved inside
the locks. Also, the call to start the stat accounting was redundant
which is now removed.
2. The timestamp wrap-around case when calculating residency did
not cater for AArch32. This is now fixed.
3. In the warm boot path, `plat_psci_stat_accounting_stop()` was
getting invoked prior to population of target power states. This
is now corrected.
Change-Id: I851526455304fb74ff0a724f4d5318cd89e19589
Signed-off-by: Soby Mathew <soby.mathew@arm.com>
Diffstat (limited to 'lib/psci/psci_common.c')
-rw-r--r-- | lib/psci/psci_common.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/psci/psci_common.c b/lib/psci/psci_common.c index 4502c24b5..2220a745c 100644 --- a/lib/psci/psci_common.c +++ b/lib/psci/psci_common.c @@ -767,12 +767,12 @@ void psci_warmboot_entrypoint(void) psci_acquire_pwr_domain_locks(end_pwrlvl, cpu_idx); + psci_get_target_local_pwr_states(end_pwrlvl, &state_info); + #if ENABLE_PSCI_STAT plat_psci_stat_accounting_stop(&state_info); #endif - psci_get_target_local_pwr_states(end_pwrlvl, &state_info); - /* * This CPU could be resuming from suspend or it could have just been * turned on. To distinguish between these 2 cases, we examine the |