Loading kernel/printk/printk.c +17 −0 Original line number Diff line number Diff line Loading @@ -2065,6 +2065,14 @@ 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 Loading @@ -2075,6 +2083,9 @@ void resume_console(void) * will be spooled but will not show up on the console. This function is * called when a new CPU comes online (or fails to come up), and ensures * that any such output gets printed. * * Special handling must be done for cases invoked from an atomic context, * as we can't be taking the console semaphore here. */ static int console_cpu_notify(struct notifier_block *self, unsigned long action, void *hcpu) Loading @@ -2092,6 +2103,12 @@ static int console_cpu_notify(struct notifier_block *self, 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; } Loading Loading
kernel/printk/printk.c +17 −0 Original line number Diff line number Diff line Loading @@ -2065,6 +2065,14 @@ 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 Loading @@ -2075,6 +2083,9 @@ void resume_console(void) * will be spooled but will not show up on the console. This function is * called when a new CPU comes online (or fails to come up), and ensures * that any such output gets printed. * * Special handling must be done for cases invoked from an atomic context, * as we can't be taking the console semaphore here. */ static int console_cpu_notify(struct notifier_block *self, unsigned long action, void *hcpu) Loading @@ -2092,6 +2103,12 @@ static int console_cpu_notify(struct notifier_block *self, 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; } Loading