Merge tag 'printk-for-6.2' of git://git.kernel.org/pub/scm/linux/kernel/git/printk/linux
Pull printk updates from Petr Mladek: - Add NMI-safe SRCU reader API. It uses atomic_inc() instead of this_cpu_inc() on strong load-store architectures. - Introduce new console_list_lock to synchronize a manipulation of the list of registered consoles and their flags. This is a first step in removing the big-kernel-lock-like behavior of console_lock(). This semaphore still serializes console->write() calbacks against: - each other. It primary prevents potential races between early and proper console drivers using the same device. - suspend()/resume() callbacks and init() operations in some drivers. - various other operations in the tty/vt and framebufer susbsystems. It is likely that console_lock() serializes even operations that are not directly conflicting with the console->write() callbacks here. This is the most complicated big-kernel-lock aspect of the console_lock() that will be hard to untangle. - Introduce new console_srcu lock that is used to safely iterate and access the registered console drivers under SRCU read lock. This is a prerequisite for introducing atomic console drivers and console kthreads. It will reduce the complexity of serialization against normal consoles and console_lock(). Also it should remove the risk of deadlock during critical situations, like Oops or panic, when only atomic consoles are registered. - Check whether the console is registered instead of enabled on many locations. It was a historical leftover. - Cleanly force a preferred console in xenfb code instead of a dirty hack. - A lot of code and comment clean ups and improvements. * tag 'printk-for-6.2' of git://git.kernel.org/pub/scm/linux/kernel/git/printk/linux: (47 commits) printk: htmldocs: add missing description tty: serial: sh-sci: use setup() callback for early console printk: relieve console_lock of list synchronization duties tty: serial: kgdboc: use console_list_lock to trap exit tty: serial: kgdboc: synchronize tty_find_polling_driver() and register_console() tty: serial: kgdboc: use console_list_lock for list traversal tty: serial: kgdboc: use srcu console list iterator proc: consoles: use console_list_lock for list iteration tty: tty_io: use console_list_lock for list synchronization printk, xen: fbfront: create/use safe function for forcing preferred netconsole: avoid CON_ENABLED misuse to track registration usb: early: xhci-dbc: use console_is_registered() tty: serial: xilinx_uartps: use console_is_registered() tty: serial: samsung_tty: use console_is_registered() tty: serial: pic32_uart: use console_is_registered() tty: serial: earlycon: use console_is_registered() tty: hvc: use console_is_registered() efi: earlycon: use console_is_registered() tty: nfcon: use console_is_registered() serial_core: replace uart_console_enabled() with uart_console_registered() ...
Showing
- .clang-format 1 addition, 0 deletions.clang-format
- arch/m68k/emu/nfcon.c 7 additions, 2 deletionsarch/m68k/emu/nfcon.c
- arch/um/kernel/kmsg_dump.c 15 additions, 9 deletionsarch/um/kernel/kmsg_dump.c
- drivers/firmware/efi/earlycon.c 4 additions, 4 deletionsdrivers/firmware/efi/earlycon.c
- drivers/net/netconsole.c 11 additions, 10 deletionsdrivers/net/netconsole.c
- drivers/tty/hvc/hvc_console.c 2 additions, 2 deletionsdrivers/tty/hvc/hvc_console.c
- drivers/tty/serial/8250/8250_core.c 1 addition, 1 deletiondrivers/tty/serial/8250/8250_core.c
- drivers/tty/serial/earlycon.c 2 additions, 2 deletionsdrivers/tty/serial/earlycon.c
- drivers/tty/serial/kgdboc.c 41 additions, 5 deletionsdrivers/tty/serial/kgdboc.c
- drivers/tty/serial/pic32_uart.c 2 additions, 2 deletionsdrivers/tty/serial/pic32_uart.c
- drivers/tty/serial/samsung_tty.c 1 addition, 1 deletiondrivers/tty/serial/samsung_tty.c
- drivers/tty/serial/serial_core.c 7 additions, 7 deletionsdrivers/tty/serial/serial_core.c
- drivers/tty/serial/sh-sci.c 16 additions, 4 deletionsdrivers/tty/serial/sh-sci.c
- drivers/tty/serial/xilinx_uartps.c 1 addition, 1 deletiondrivers/tty/serial/xilinx_uartps.c
- drivers/tty/tty_io.c 17 additions, 1 deletiondrivers/tty/tty_io.c
- drivers/usb/early/xhci-dbc.c 1 addition, 1 deletiondrivers/usb/early/xhci-dbc.c
- drivers/video/fbdev/xen-fbfront.c 4 additions, 8 deletionsdrivers/video/fbdev/xen-fbfront.c
- fs/proc/consoles.c 18 additions, 3 deletionsfs/proc/consoles.c
- include/linux/console.h 124 additions, 5 deletionsinclude/linux/console.h
- include/linux/rcutiny.h 0 additions, 4 deletionsinclude/linux/rcutiny.h
Loading
Please register or sign in to comment