msm:pm: Fix for race condition of starting cpu1 when cpu0 in PC.

There is a window where core sends ipi to secondary core and
wait for it to come online for 1 second. This would allow
core0 to go power collapse in a rare condition where core1
started booting and doesn't become online yet.

Fix this by not allowing power collapse on core0
if hot plug operation is in progress.

CRs-fixed: 545714.
Change-Id: I1ca503a2f09cd9a65c2fdcd41eb54466a1e486c5
Signed-off-by: Anil kumar mamidala <amami@codeaurora.org>
diff --git a/include/linux/cpu.h b/include/linux/cpu.h
index caec85b..97d2326 100644
--- a/include/linux/cpu.h
+++ b/include/linux/cpu.h
@@ -146,6 +146,7 @@
 int cpu_up(unsigned int cpu);
 void notify_cpu_starting(unsigned int cpu);
 extern void cpu_maps_update_begin(void);
+int cpu_maps_is_updating(void);
 extern void cpu_maps_update_done(void);
 
 #else	/* CONFIG_SMP */
@@ -165,6 +166,11 @@
 {
 }
 
+static inline int cpu_maps_is_updating(void)
+{
+	return 0;
+}
+
 static inline void cpu_maps_update_done(void)
 {
 }