summaryrefslogtreecommitdiff
path: root/lib/psci/psci_off.c
diff options
context:
space:
mode:
authordanh-arm <dan.handley@arm.com>2016-10-17 12:19:20 +0100
committerGitHub <noreply@github.com>2016-10-17 12:19:20 +0100
commit66b4542a5fa465edda55a4a7862ed1be7b99b02e (patch)
tree6570927431fe2eefba436d97f63ede6c11f0521a /lib/psci/psci_off.c
parent5cab1a4a18f4dfb0dfbc23377e5046e7f2a9b956 (diff)
parent872be88a2916f45d3de38120ede8c8b199b7498f (diff)
Merge pull request #729 from dp-arm/dp/arm-sip
Add instrumentation support for PSCI
Diffstat (limited to 'lib/psci/psci_off.c')
-rw-r--r--lib/psci/psci_off.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/lib/psci/psci_off.c b/lib/psci/psci_off.c
index 471141dd..1cc6ede3 100644
--- a/lib/psci/psci_off.c
+++ b/lib/psci/psci_off.c
@@ -33,6 +33,8 @@
#include <assert.h>
#include <debug.h>
#include <platform.h>
+#include <pmf.h>
+#include <runtime_instr.h>
#include <string.h>
#include "psci_private.h"
@@ -153,6 +155,19 @@ exit:
dsbish();
inv_cpu_data(psci_svc_cpu_data.aff_info_state);
+#if ENABLE_RUNTIME_INSTRUMENTATION
+
+ /*
+ * Update the timestamp with cache off. We assume this
+ * timestamp can only be read from the current CPU and the
+ * timestamp cache line will be flushed before return to
+ * normal world on wakeup.
+ */
+ PMF_CAPTURE_TIMESTAMP(rt_instr_svc,
+ RT_INSTR_ENTER_HW_LOW_PWR,
+ PMF_NO_CACHE_MAINT);
+#endif
+
if (psci_plat_pm_ops->pwr_domain_pwr_down_wfi) {
/* This function must not return */
psci_plat_pm_ops->pwr_domain_pwr_down_wfi(&state_info);