diff options
author | Sergey Senozhatsky <sergey.senozhatsky@gmail.com> | 2016-12-27 23:16:08 +0900 |
---|---|---|
committer | Petr Mladek <pmladek@suse.com> | 2017-02-08 13:50:05 +0100 |
commit | ddb9baa822265b55afffd9815a2758a4b70006c1 (patch) | |
tree | d3338c3ccee305900f73b29e09f25b4c7efedcb7 /kernel/printk/internal.h | |
parent | 7acac3445acde1c94054cde69ab53503d296c393 (diff) | |
download | lwn-ddb9baa822265b55afffd9815a2758a4b70006c1.tar.gz lwn-ddb9baa822265b55afffd9815a2758a4b70006c1.zip |
printk: report lost messages in printk safe/nmi contexts
Account lost messages in pritk-safe and printk-safe-nmi
contexts and report those numbers during printk_safe_flush().
The patch also moves lost message counter to struct
`printk_safe_seq_buf' instead of having dedicated static
counters - this simplifies the code.
Link: http://lkml.kernel.org/r/20161227141611.940-6-sergey.senozhatsky@gmail.com
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Steven Rostedt <rostedt@goodmis.org>
Cc: Jan Kara <jack@suse.cz>
Cc: Tejun Heo <tj@kernel.org>
Cc: Calvin Owens <calvinowens@fb.com>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Andy Lutomirski <luto@kernel.org>
Cc: Peter Hurley <peter@hurleysoftware.com>
Cc: linux-kernel@vger.kernel.org
Signed-off-by: Sergey Senozhatsky <sergey.senozhatsky@gmail.com>
Signed-off-by: Petr Mladek <pmladek@suse.com>
Diffstat (limited to 'kernel/printk/internal.h')
-rw-r--r-- | kernel/printk/internal.h | 17 |
1 files changed, 0 insertions, 17 deletions
diff --git a/kernel/printk/internal.h b/kernel/printk/internal.h index c65e36509f3b..1db044f808b7 100644 --- a/kernel/printk/internal.h +++ b/kernel/printk/internal.h @@ -16,23 +16,6 @@ */ #include <linux/percpu.h> -#ifdef CONFIG_PRINTK_NMI - -extern atomic_t nmi_message_lost; -static inline int get_nmi_message_lost(void) -{ - return atomic_xchg(&nmi_message_lost, 0); -} - -#else /* CONFIG_PRINTK_NMI */ - -static inline int get_nmi_message_lost(void) -{ - return 0; -} - -#endif /* CONFIG_PRINTK_NMI */ - #ifdef CONFIG_PRINTK #define PRINTK_SAFE_CONTEXT_MASK 0x7fffffff |