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/kernel/cpu.c b/kernel/cpu.c
index fb4a5ac..fe76a32 100644
--- a/kernel/cpu.c
+++ b/kernel/cpu.c
@@ -30,6 +30,11 @@
 	mutex_lock(&cpu_add_remove_lock);
 }
 
+int cpu_maps_is_updating(void)
+{
+	return mutex_is_locked(&cpu_add_remove_lock);
+}
+
 void cpu_maps_update_done(void)
 {
 	mutex_unlock(&cpu_add_remove_lock);