From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: Received: from galois.linutronix.de ([193.142.43.55]) by desiato.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lOIXj-00BQIn-Eh for kexec@lists.infradead.org; Mon, 22 Mar 2021 11:16:22 +0000 From: John Ogness Subject: Re: [PATCH next v1 2/3] printk: remove safe buffers In-Reply-To: References: <20210316233326.10778-1-john.ogness@linutronix.de> <20210316233326.10778-3-john.ogness@linutronix.de> Date: Mon, 22 Mar 2021 12:16:15 +0100 Message-ID: <87k0pzmoao.fsf@jogness.linutronix.de> MIME-Version: 1.0 List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "kexec" Errors-To: kexec-bounces+dwmw2=infradead.org@lists.infradead.org To: Sergey Senozhatsky Cc: Petr Mladek , Steven Rostedt , Thomas Gleixner , linux-kernel@vger.kernel.org, Michael Ellerman , Benjamin Herrenschmidt , Paul Mackerras , Eric Biederman , Nicholas Piggin , Christophe Leroy , Alistair Popple , Jordan Niethe , Peter Zijlstra , =?utf-8?Q?C=C3=A9dric?= Le Goater , Andrew Morton , Kees Cook , Yue Hu , Alexey Kardashevskiy , Rafael Aquini , Tiezhu Yang , "Guilherme G. Piccoli" , "Paul E. McKenney" , linuxppc-dev@lists.ozlabs.org, kexec@lists.infradead.org On 2021-03-21, Sergey Senozhatsky wrote: >> @@ -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 _______________________________________________ kexec mailing list kexec@lists.infradead.org http://lists.infradead.org/mailman/listinfo/kexec