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>
1 parent 122af7d commit bfc87a8dff75688f3f0ef558f4921c4b1acc07b1
@Soby Mathew Soby Mathew authored on 16 Oct 2017
Showing 3 changed files
View
lib/psci/psci_common.c
View
lib/psci/psci_suspend.c
View
plat/common/plat_psci_common.c