msm: qdss: restore trace state for cores early during hotplug on

Earlier we were relying on non-boot cores going through the first
idle WFI or idle power collapse after hotplug turn on to restore the
trace state from the previous hotplug turn off.

This could take a long time (causing us to loose trace information
during this time) and more so now since we don't save and restore
trace state across WFI. This could also cause the state to not get
restored if idle power collapse is disabled for non-boot cores.

We now restore the trace state for non-boot cores early on as part of
hotplug turn on itself to alleviate above pitfalls.

Signed-off-by: Pratik Patel <pratikp@codeaurora.org>
diff --git a/arch/arm/mach-msm/qdss.h b/arch/arm/mach-msm/qdss.h
index b94e645..e4e6b0c 100644
--- a/arch/arm/mach-msm/qdss.h
+++ b/arch/arm/mach-msm/qdss.h
@@ -54,4 +54,12 @@
 void funnel_enable(uint8_t id, uint32_t port_mask);
 void funnel_disable(uint8_t id, uint32_t port_mask);
 
+#ifdef CONFIG_MSM_TRACE_ACROSS_PC
+extern void etm_save_reg_check(void);
+extern void etm_restore_reg_check(void);
+#else
+static inline void etm_save_reg_check(void) {}
+static inline void etm_restore_reg_check(void) {}
+#endif
+
 #endif