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;
}
void v7_coresight_restore(void)
{
#ifdef CONFIG_CPU_PXA988
	coresight_cti_restore();
#endif

	coresight_ptm_restore();
}
void arch_restore_coreinfo(void)
{
	if (cti_base)
		coresight_cti_restore();

#ifdef CONFIG_CORESIGHT_TRACE_SUPPORT
	if (local_etb_base)
		coresight_local_etb_restore();

	coresight_etm_restore();
	dsb();
	isb();
#endif
}