lkml.org 
[lkml]   [2018]   [Jun]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [RFC][PATCH 0/6] Use printk_safe context for TTY and UART port locks
On (06/22/18 17:21), Alan Cox wrote:
> On Wed, 20 Jun 2018 11:44:13 +0900
> Linus Torvalds <torvalds@linux-foundation.org> wrote:
>
> > On Wed, Jun 20, 2018 at 11:34 AM Steven Rostedt <rostedt@goodmis.org> wrote:
> > >
> > > Perhaps we should do an audit of the console drivers and remove all
> > > printk, pr_* , WARN*, BUG* from them.
> >
> > Only the actual _printing_ parts.
>
> No because they are normally rather useful because that port isn't the
> console. If you trylock

trylock is boring, me wants printk_safe_mask everywhere :)

> Really that's all that you need - log the message to whichever console
> targets you can currently safely do so. If it's none well there was
> always the proposed morse code keyboard light driver 8)

Hm, just discard messages? With printk_safe_mask we keep everything
in a lockless per-CPU buffer, which we flush [per-CPU buffer -> printk logbuf]
from irq_work, so we can print it later.

-ss

\
 
 \ /
  Last update: 2018-06-23 07:22    [W:0.062 / U:0.188 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site