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

Commit 2768f673 authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "printk: Add all cpu notifiers under CONSOLE_FLUSH_ON_HOTPLUG flag"

parents 25e8f641 d5c2cbcb
Loading
Loading
Loading
Loading
+1 −17
Original line number Original line Diff line number Diff line
@@ -2065,14 +2065,6 @@ void resume_console(void)
	console_unlock();
	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
 * console_cpu_notify - print deferred console messages after CPU hotplug
 * @self: notifier struct
 * @self: notifier struct
@@ -2092,23 +2084,15 @@ static int console_cpu_notify(struct notifier_block *self,
{
{
	switch (action) {
	switch (action) {
	case CPU_ONLINE:
	case CPU_ONLINE:
		console_lock();
		console_unlock();
		break;
	case CPU_DEAD:
	case CPU_DEAD:
	case CPU_DOWN_FAILED:
	case CPU_DOWN_FAILED:
	case CPU_UP_CANCELED:
	case CPU_UP_CANCELED:
	case CPU_DYING:
#ifdef CONFIG_CONSOLE_FLUSH_ON_HOTPLUG
#ifdef CONFIG_CONSOLE_FLUSH_ON_HOTPLUG
		console_lock();
		console_lock();
		console_unlock();
		console_unlock();
#endif
#endif
		break;
		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;
	return NOTIFY_OK;
}
}