Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit d5c2cbcb authored by Prasad Sodagudi's avatar Prasad Sodagudi
Browse files

printk: Add all cpu notifiers under CONSOLE_FLUSH_ON_HOTPLUG flag



Add all cpu notifiers in CONSOLE_FLUSH_ON_HOTPLUG config
flag to avoid hotplug latencies and by default config
CONSOLE_FLUSH_ON_HOTPLUG flag is disabled.

Change-Id: I389f207d8faf84cfd4267d52213e40a47a43774d
Signed-off-by: default avatarPrasad Sodagudi <psodagud@codeaurora.org>
parent 1abae077
Loading
Loading
Loading
Loading
+1 −17
Original line number Diff line number Diff line
@@ -2065,14 +2065,6 @@ void resume_console(void)
	console_unlock();
}

static void __cpuinit console_flush(struct work_struct *work)
{
	console_lock();
	console_unlock();
}

static __cpuinitdata DECLARE_WORK(console_cpu_notify_work, console_flush);

/**
 * console_cpu_notify - print deferred console messages after CPU hotplug
 * @self: notifier struct
@@ -2092,23 +2084,15 @@ static int console_cpu_notify(struct notifier_block *self,
{
	switch (action) {
	case CPU_ONLINE:
		console_lock();
		console_unlock();
		break;
	case CPU_DEAD:
	case CPU_DOWN_FAILED:
	case CPU_UP_CANCELED:
	case CPU_DYING:
#ifdef CONFIG_CONSOLE_FLUSH_ON_HOTPLUG
		console_lock();
		console_unlock();
#endif
		break;
	/* invoked with preemption disabled, so defer */
	case CPU_DYING:
		if (!console_trylock())
			schedule_work(&console_cpu_notify_work);
		else
			console_unlock();
	}
	return NOTIFY_OK;
}