Re: [PATCH v5 4/4] printk/nmi: flush NMI messages on the system panic

2016-04-26 Thread Sergey Senozhatsky
On (04/26/16 16:21), Petr Mladek wrote: [..] > > move printk_nmi_flush_on_panic() to printk.c, and place it next to > > printk_flush_on_panic() (so we will have two printk "flush-on-panic" > > functions sitting together). /* printk_nmi_flush() is in printk.h, > > so it's visible to printk anyway */

Re: [PATCH v5 4/4] printk/nmi: flush NMI messages on the system panic

2016-04-26 Thread Petr Mladek
On Sat 2016-04-23 12:49:24, Sergey Senozhatsky wrote: > Hello Petr, > > On (04/21/16 13:48), Petr Mladek wrote: > > extern void printk_nmi_flush(void); > > +extern void printk_nmi_flush_on_panic(void); > > #else > > static inline void printk_nmi_flush(void) { } > > +static inline void printk_nm

Re: [PATCH v5 4/4] printk/nmi: flush NMI messages on the system panic

2016-04-22 Thread Sergey Senozhatsky
Hello Petr, On (04/21/16 13:48), Petr Mladek wrote: > extern void printk_nmi_flush(void); > +extern void printk_nmi_flush_on_panic(void); > #else > static inline void printk_nmi_flush(void) { } > +static inline void printk_nmi_flush_on_panic(void) { } [..] > +void printk_nmi_flush_on_panic(void

[PATCH v5 4/4] printk/nmi: flush NMI messages on the system panic

2016-04-21 Thread Petr Mladek
In NMI context, printk() messages are stored into per-CPU buffers to avoid a possible deadlock. They are normally flushed to the main ring buffer via an IRQ work. But the work is never called when the system calls panic() in the very same NMI handler. This patch tries to flush NMI buffers before