Skip to content

Commit df43d90

Browse files
committed
Merge tag 'printk-for-5.15' of git://git.kernel.org/pub/scm/linux/kernel/git/printk/linux
Pull printk updates from Petr Mladek: - Optionally, provide an index of possible printk messages via <debugfs>/printk/index/. It can be used when monitoring important kernel messages on a farm of various hosts. The monitor has to be updated when some messages has changed or are not longer available by a newly deployed kernel. - Add printk.console_no_auto_verbose boot parameter. It allows to generate crash dump even with slow consoles in a reasonable time frame. - Remove printk_safe buffers. The messages are always stored directly to the main logbuffer, even in NMI or recursive context. Also it allows to serialize syslog operations by a mutex instead of a spin lock. - Misc clean up and build fixes. * tag 'printk-for-5.15' of git://git.kernel.org/pub/scm/linux/kernel/git/printk/linux: printk/index: Fix -Wunused-function warning lib/nmi_backtrace: Serialize even messages about idle CPUs printk: Add printk.console_no_auto_verbose boot parameter printk: Remove console_silent() lib/test_scanf: Handle n_bits == 0 in random tests printk: syslog: close window between wait and read printk: convert @syslog_lock to mutex printk: remove NMI tracking printk: remove safe buffers printk: track/limit recursion lib/nmi_backtrace: explicitly serialize banner and regs printk: Move the printk() kerneldoc comment to its new home printk/index: Fix warning about missing prototypes MIPS/asm/printk: Fix build failure caused by printk printk: index: Add indexing support to dev_printk printk: Userspace format indexing support printk: Rework parse_prefix into printk_parse_prefix printk: Straighten out log_flags into printk_info_flags string_helpers: Escape double quotes in escape_special printk/console: Check consistent sequence number when handling race in console_unlock()
2 parents 9e5f3ff + c985aaf commit df43d90

File tree

38 files changed

+687
-657
lines changed

38 files changed

+687
-657
lines changed

Documentation/admin-guide/kernel-parameters.txt

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4198,6 +4198,15 @@
41984198
Format: <bool> (1/Y/y=enable, 0/N/n=disable)
41994199
default: disabled
42004200

4201+
printk.console_no_auto_verbose=
4202+
Disable console loglevel raise on oops, panic
4203+
or lockdep-detected issues (only if lock debug is on).
4204+
With an exception to setups with low baudrate on
4205+
serial console, keeping this 0 is a good choice
4206+
in order to provide more debug information.
4207+
Format: <bool>
4208+
default: 0 (auto_verbose is enabled)
4209+
42014210
printk.devkmsg={on,off,ratelimit}
42024211
Control writing to /dev/kmsg.
42034212
on - unlimited logging to /dev/kmsg from userspace

Documentation/core-api/printk-basics.rst

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -107,9 +107,6 @@ also ``CONFIG_DYNAMIC_DEBUG`` in the case of pr_debug()) is defined.
107107
Function reference
108108
==================
109109

110-
.. kernel-doc:: kernel/printk/printk.c
111-
:functions: printk
112-
113110
.. kernel-doc:: include/linux/printk.h
114-
:functions: pr_emerg pr_alert pr_crit pr_err pr_warn pr_notice pr_info
111+
:functions: printk pr_emerg pr_alert pr_crit pr_err pr_warn pr_notice pr_info
115112
pr_fmt pr_debug pr_devel pr_cont

MAINTAINERS

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15021,6 +15021,11 @@ S: Maintained
1502115021
F: include/linux/printk.h
1502215022
F: kernel/printk/
1502315023

15024+
PRINTK INDEXING
15025+
R: Chris Down <[email protected]>
15026+
S: Maintained
15027+
F: kernel/printk/index.c
15028+
1502415029
PROC FILESYSTEM
1502515030
1502615031

arch/arm/kernel/entry-v7m.S

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ __invalid_entry:
2323
adr r0, strerr
2424
mrs r1, ipsr
2525
mov r2, lr
26-
bl printk
26+
bl _printk
2727
#endif
2828
mov r0, sp
2929
bl show_regs

arch/arm/kernel/smp.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -667,9 +667,9 @@ static void do_handle_IPI(int ipinr)
667667
break;
668668

669669
case IPI_CPU_BACKTRACE:
670-
printk_nmi_enter();
670+
printk_deferred_enter();
671671
nmi_cpu_backtrace(get_irq_regs());
672-
printk_nmi_exit();
672+
printk_deferred_exit();
673673
break;
674674

675675
default:

arch/arm/lib/backtrace-clang.S

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -202,7 +202,7 @@ finished_setup:
202202
1006: adr r0, .Lbad
203203
mov r1, loglvl
204204
mov r2, frame
205-
bl printk
205+
bl _printk
206206
no_frame: ldmfd sp!, {r4 - r9, fp, pc}
207207
ENDPROC(c_backtrace)
208208
.pushsection __ex_table,"a"

arch/arm/lib/backtrace.S

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ for_each_frame: tst frame, mask @ Check for address exceptions
103103
1006: adr r0, .Lbad
104104
mov r1, loglvl
105105
mov r2, frame
106-
bl printk
106+
bl _printk
107107
no_frame: ldmfd sp!, {r4 - r9, pc}
108108
ENDPROC(c_backtrace)
109109

arch/arm/mach-rpc/io-acorn.S

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,4 +25,4 @@ ENTRY(insl)
2525
ENTRY(outsl)
2626
adr r0, .Liosl_warning
2727
mov r1, lr
28-
b printk
28+
b _printk

arch/arm/vfp/vfphw.S

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
#ifdef DEBUG
2424
stmfd sp!, {r0-r3, ip, lr}
2525
ldr r0, =1f
26-
bl printk
26+
bl _printk
2727
ldmfd sp!, {r0-r3, ip, lr}
2828

2929
.pushsection .rodata, "a"
@@ -38,7 +38,7 @@
3838
stmfd sp!, {r0-r3, ip, lr}
3939
mov r1, \arg
4040
ldr r0, =1f
41-
bl printk
41+
bl _printk
4242
ldmfd sp!, {r0-r3, ip, lr}
4343

4444
.pushsection .rodata, "a"
@@ -55,7 +55,7 @@
5555
mov r2, \arg2
5656
mov r1, \arg1
5757
ldr r0, =1f
58-
bl printk
58+
bl _printk
5959
ldmfd sp!, {r0-r3, ip, lr}
6060

6161
.pushsection .rodata, "a"

arch/ia64/include/uapi/asm/cmpxchg.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -143,9 +143,9 @@ extern long ia64_cmpxchg_called_with_bad_pointer(void);
143143
do { \
144144
if (_cmpxchg_bugcheck_count-- <= 0) { \
145145
void *ip; \
146-
extern int printk(const char *fmt, ...); \
146+
extern int _printk(const char *fmt, ...); \
147147
ip = (void *) ia64_getreg(_IA64_REG_IP); \
148-
printk("CMPXCHG_BUGCHECK: stuck at %p on word %p\n", ip, (v));\
148+
_printk("CMPXCHG_BUGCHECK: stuck at %p on word %p\n", ip, (v));\
149149
break; \
150150
} \
151151
} while (0)

0 commit comments

Comments
 (0)