PSCI: Decouple PSCI stat residency calculation from PMF
dp-arm authored
This patch introduces the following three platform interfaces:

* void plat_psci_stat_accounting_start(const psci_power_state_t *state_info)

  This is an optional hook that platforms can implement in order
  to perform accounting before entering a low power state.  This
  typically involves capturing a timestamp.

* void plat_psci_stat_accounting_stop(const psci_power_state_t *state_info)

  This is an optional hook that platforms can implement in order
  to perform accounting after exiting from a low power state.  This
  typically involves capturing a timestamp.

* u_register_t plat_psci_stat_get_residency(unsigned int lvl,
	const psci_power_state_t *state_info,
	unsigned int last_cpu_index)

  This is an optional hook that platforms can implement in order
  to calculate the PSCI stat residency.

If any of these interfaces are overridden by the platform, it is
recommended that all of them are.

By default `ENABLE_PSCI_STAT` is disabled.  If `ENABLE_PSCI_STAT`
is set but `ENABLE_PMF` is not set then an alternative PSCI stat
collection backend must be provided.  If both are set, then default
weak definitions of these functions are provided, using PMF to
calculate the residency.

NOTE: Previously, platforms did not have to explicitly set
`ENABLE_PMF` since this was automatically done by the top-level
Makefile.

Change-Id: I17b47804dea68c77bc284df15ee1ccd66bc4b79b
Signed-off-by: default avatardp-arm <dimitris.papastamos@arm.com>
04c1db1e
Name Last commit Last update
bl1 Report errata workaround status to console
bl2 Define and use no_ret macro where no return is expected
bl2u Define and use no_ret macro where no return is expected
bl31 Define and use no_ret macro where no return is expected
bl32 Abort preempted TSP STD SMC after PSCI CPU suspend
common Merge pull request #791 from jeenu-arm/asm-assert-32
docs PSCI: Decouple PSCI stat residency calculation from PMF
drivers tbbr: Use constant-time bcmp() to compare hashes
fdts Fix incorrect copyright notices
include PSCI: Decouple PSCI stat residency calculation from PMF
lib PSCI: Decouple PSCI stat residency calculation from PMF
make_helpers fiptool: support --align option to add desired alignment to image offset
plat PSCI: Decouple PSCI stat residency calculation from PMF
services Resolve build errors flagged by GCC 6.2
tools fiptool: support --align option to add desired alignment to image offset
.checkpatch.conf Mandate 'Signed-off-by' line in commit messages
.gitignore gitignore: ignore GNU GLOBAL tag files
Makefile PSCI: Decouple PSCI stat residency calculation from PMF
acknowledgements.md Add Xilinx to acknowledgements file
contributing.md Drop requirement for CLA in contribution.md
dco.txt Drop requirement for CLA in contribution.md
license.md Update year in copyright text to 2014
readme.md readme.md: Add tested Linaro release information for FVPs