printk: Defer CPU_ONLINE console flushing

The flushing of the console in the CPU_ONLINE callback on a hotplug
is rather slow, taking up to 11 ms to complete. Defer this to lower
hotplug latency.

Change-Id: If96089fe2c6cd6024d1a9e2bac35296aea75cf9e
Signed-off-by: Jeff Ohlstein <johlstei@codeaurora.org>
Signed-off-by: Ajay Dudani <adudani@codeaurora.org>
diff --git a/kernel/printk.c b/kernel/printk.c
index e21712a..d72977b 100644
--- a/kernel/printk.c
+++ b/kernel/printk.c
@@ -1230,13 +1230,13 @@
 	unsigned long action, void *hcpu)
 {
 	switch (action) {
-	case CPU_ONLINE:
 	case CPU_DEAD:
 	case CPU_DOWN_FAILED:
 	case CPU_UP_CANCELED:
 		console_lock();
 		console_unlock();
 		break;
+	case CPU_ONLINE:
 	case CPU_DYING:
 		/* invoked with preemption disabled, so defer */
 		if (!console_trylock())