static int coresight_notifier(struct notifier_block *self, unsigned long cmd, void *v) { switch (cmd) { case CPU_PM_ENTER: coresight_ptm_save(); #ifdef CONFIG_CPU_PXA988 coresight_cti_save(); #endif break; case CPU_PM_ENTER_FAILED: case CPU_PM_EXIT: coresight_ptm_restore(); #ifdef CONFIG_CPU_PXA988 coresight_cti_restore(); #endif break; case CPU_CLUSTER_PM_ENTER: coresight_save(); break; case CPU_CLUSTER_PM_ENTER_FAILED: case CPU_CLUSTER_PM_EXIT: coresight_restore(); break; } return NOTIFY_OK; }
/* Export following two APIs for hotplug usage */ void v7_coresight_save(void) { #ifdef CONFIG_CPU_PXA988 coresight_cti_save(); #endif coresight_ptm_save(); }
void arch_save_coreinfo(void) { if (cti_base) coresight_cti_save(); #ifdef CONFIG_CORESIGHT_TRACE_SUPPORT if (local_etb_base) coresight_local_etb_save(); coresight_etm_save(); #endif }