Commit 3c31041e authored by Linus Torvalds's avatar Linus Torvalds
Browse files
Pull printk updates from Petr Mladek:

 - Do not try to get the console lock when it is not need or useful in
   panic()

 - Replace the global console_suspended state by a per-console flag

 - Export symbols needed for dumping the raw printk buffer in panic()

 - Fix documentation of printf formats for integer types

 - Moved Sergey Senozhatsky to the reviewer role

 - Misc cleanups

* tag 'printk-for-6.6' of git://git.kernel.org/pub/scm/linux/kernel/git/printk/linux:
  printk: export symbols for debug modules
  lib: test_scanf: Add explicit type cast to result initialization in test_number_prefix()
  printk: ringbuffer: Fix truncating buffer size min_t cast
  printk: Rename abandon_console_lock_in_panic() to other_cpu_in_panic()
  printk: Add per-console suspended state
  printk: Consolidate console deferred printing
  printk: Do not take console lock for console_flush_on_panic()
  printk: Keep non-panic-CPUs out of console lock
  printk: Reduce console_unblank() usage in unsafe scenarios
  kdb: Do not assume write() callback available
  docs: printk-formats: Treat char as always unsigned
  docs: printk-formats: Fix hex printing of signed values
  MAINTAINERS: adjust printk/vsprintf entries
parents 4accdb98 f0f69239
Loading
Loading
Loading
Loading
+5 −4
Original line number Diff line number Diff line
@@ -15,9 +15,10 @@ Integer types

	If variable is of Type,		use printk format specifier:
	------------------------------------------------------------
		char			%d or %x
		signed char		%d or %hhx
		unsigned char		%u or %x
		short int		%d or %x
		char			%u or %x
		short int		%d or %hx
		unsigned short int	%u or %x
		int			%d or %x
		unsigned int		%u or %x
@@ -27,9 +28,9 @@ Integer types
		unsigned long long	%llu or %llx
		size_t			%zu or %zx
		ssize_t			%zd or %zx
		s8			%d or %x
		s8			%d or %hhx
		u8			%u or %x
		s16			%d or %x
		s16			%d or %hx
		u16			%u or %x
		s32			%d or %x
		u32			%u or %x
+2 −2
Original line number Diff line number Diff line
@@ -17176,9 +17176,9 @@ F: kernel/sched/psi.c
PRINTK
M:	Petr Mladek <pmladek@suse.com>
M:	Sergey Senozhatsky <senozhatsky@chromium.org>
R:	Steven Rostedt <rostedt@goodmis.org>
R:	John Ogness <john.ogness@linutronix.de>
R:	Sergey Senozhatsky <senozhatsky@chromium.org>
S:	Maintained
T:	git git://git.kernel.org/pub/scm/linux/kernel/git/printk/linux.git
F:	include/linux/printk.h
@@ -23072,9 +23072,9 @@ F: drivers/net/vrf.c
VSPRINTF
M:	Petr Mladek <pmladek@suse.com>
M:	Steven Rostedt <rostedt@goodmis.org>
M:	Sergey Senozhatsky <senozhatsky@chromium.org>
R:	Andy Shevchenko <andriy.shevchenko@linux.intel.com>
R:	Rasmus Villemoes <linux@rasmusvillemoes.dk>
R:	Sergey Senozhatsky <senozhatsky@chromium.org>
S:	Maintained
T:	git git://git.kernel.org/pub/scm/linux/kernel/git/printk/linux.git
F:	Documentation/core-api/printk-formats.rst
+3 −0
Original line number Diff line number Diff line
@@ -154,6 +154,8 @@ static inline int con_debug_leave(void)
 *			receiving the printk spam for obvious reasons.
 * @CON_EXTENDED:	The console supports the extended output format of
 *			/dev/kmesg which requires a larger output buffer.
 * @CON_SUSPENDED:	Indicates if a console is suspended. If true, the
 *			printing callbacks must not be called.
 */
enum cons_flags {
	CON_PRINTBUFFER		= BIT(0),
@@ -163,6 +165,7 @@ enum cons_flags {
	CON_ANYTIME		= BIT(4),
	CON_BRL			= BIT(5),
	CON_EXTENDED		= BIT(6),
	CON_SUSPENDED		= BIT(7),
};

/**
+2 −0
Original line number Diff line number Diff line
@@ -590,6 +590,8 @@ static void kdb_msg_write(const char *msg, int msg_len)
			continue;
		if (c == dbg_io_ops->cons)
			continue;
		if (!c->write)
			continue;
		/*
		 * Set oops_in_progress to encourage the console drivers to
		 * disregard their internal spin locks: in the current calling
+2 −0
Original line number Diff line number Diff line
@@ -103,3 +103,5 @@ struct printk_message {
	u64			seq;
	unsigned long		dropped;
};

bool other_cpu_in_panic(void);
Loading