mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 11:11:45 -04:00
printk: Create helper function to queue deferred console handling
It is just a preparation step. The patch does not change the existing behavior. Link: http://lkml.kernel.org/r/[email protected] To: Steven Rostedt <[email protected]> Cc: Peter Zijlstra <[email protected]> Cc: Tetsuo Handa <[email protected]> Cc: Sergey Senozhatsky <[email protected]> Cc: [email protected] Cc: [email protected] Acked-by: Sergey Senozhatsky <[email protected]> Signed-off-by: Petr Mladek <[email protected]>
This commit is contained in:
parent
ba55239995
commit
a338f84dc1
1 changed files with 9 additions and 5 deletions
|
|
@ -2887,16 +2887,20 @@ void wake_up_klogd(void)
|
|||
preempt_enable();
|
||||
}
|
||||
|
||||
void defer_console_output(void)
|
||||
{
|
||||
preempt_disable();
|
||||
__this_cpu_or(printk_pending, PRINTK_PENDING_OUTPUT);
|
||||
irq_work_queue(this_cpu_ptr(&wake_up_klogd_work));
|
||||
preempt_enable();
|
||||
}
|
||||
|
||||
int vprintk_deferred(const char *fmt, va_list args)
|
||||
{
|
||||
int r;
|
||||
|
||||
r = vprintk_emit(0, LOGLEVEL_SCHED, NULL, 0, fmt, args);
|
||||
|
||||
preempt_disable();
|
||||
__this_cpu_or(printk_pending, PRINTK_PENDING_OUTPUT);
|
||||
irq_work_queue(this_cpu_ptr(&wake_up_klogd_work));
|
||||
preempt_enable();
|
||||
defer_console_output();
|
||||
|
||||
return r;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue