Thread (12 messages) 12 messages, 3 authors, 2021-03-29

Re: [PATCH next v1 2/3] printk: remove safe buffers

flat view

From: John Ogness <john.ogness@linutronix.de>
Date: 2021-03-22 11:17:06
Also in: kexec, lkml

On 2021-03-21, Sergey Senozhatsky [off-list ref] wrote:
quoted
@@ -369,7 +70,10 @@ __printf(1, 0) int vprintk_func(const char *fmt, va_list args)
 	 * Use the main logbuf even in NMI. But avoid calling console
 	 * drivers that might have their own locks.
 	 */
-	if ((this_cpu_read(printk_context) & PRINTK_NMI_DIRECT_CONTEXT_MASK)) {
+	if (this_cpu_read(printk_context) &
+	    (PRINTK_NMI_DIRECT_CONTEXT_MASK |
+	     PRINTK_NMI_CONTEXT_MASK |
+	     PRINTK_SAFE_CONTEXT_MASK)) {
Do we need printk_nmi_direct_enter/exit() and
PRINTK_NMI_DIRECT_CONTEXT_MASK?  Seems like all printk_safe() paths
are now DIRECT - we store messages to the prb, but don't call console
drivers.
I was planning on waiting until the kthreads are introduced, in which
case printk_safe.c is completely removed. But I suppose I could switch
the 1 printk_nmi_direct_enter() user to printk_nmi_enter() so that
PRINTK_NMI_DIRECT_CONTEXT_MASK can be removed now. I would do this in a
4th patch of the series.

John Ogness
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help