mirror of
https://github.com/ARM-software/arm-trusted-firmware.git
synced 2025-05-08 18:41:22 +00:00
refactor(psci): move timestamp collection to psci_pwrdown_cpu
psci_pwrdown_cpu has two callers, both of which save timestamps meant to measure how much time the cache maintenance operations take. Move the timestamp collection inside to save on a bit of code duplication. Change-Id: Ia2e7168faf7773d99b696cbdb6c98db7b58e31cf Signed-off-by: Boyan Karatotev <boyan.karatotev@arm.com>
This commit is contained in:
parent
44ee7714a2
commit
9b1e800ef0
3 changed files with 20 additions and 35 deletions
|
@ -92,29 +92,12 @@ static void psci_suspend_to_pwrdown_start(unsigned int end_pwrlvl,
|
|||
*/
|
||||
cm_init_my_context(ep);
|
||||
|
||||
#if ENABLE_RUNTIME_INSTRUMENTATION
|
||||
|
||||
/*
|
||||
* Flush cache line so that even if CPU power down happens
|
||||
* the timestamp update is reflected in memory.
|
||||
*/
|
||||
PMF_CAPTURE_TIMESTAMP(rt_instr_svc,
|
||||
RT_INSTR_ENTER_CFLUSH,
|
||||
PMF_CACHE_MAINT);
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Arch. management. Initiate power down sequence.
|
||||
* TODO : Introduce a mechanism to query the cache level to flush
|
||||
* and the cpu-ops power down to perform from the platform.
|
||||
*/
|
||||
psci_pwrdown_cpu(max_off_lvl);
|
||||
|
||||
#if ENABLE_RUNTIME_INSTRUMENTATION
|
||||
PMF_CAPTURE_TIMESTAMP(rt_instr_svc,
|
||||
RT_INSTR_EXIT_CFLUSH,
|
||||
PMF_NO_CACHE_MAINT);
|
||||
#endif
|
||||
}
|
||||
|
||||
/*******************************************************************************
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue