linux/arch/sh
Dmitry Safonov 2deebe4d56 sh: add loglvl to printk_address()
Currently, the log-level of show_stack() depends on a platform
realization.  It creates situations where the headers are printed with
lower log level or higher than the stacktrace (depending on a platform or
user).

Furthermore, it forces the logic decision from user to an architecture
side.  In result, some users as sysrq/kdb/etc are doing tricks with
temporary rising console_loglevel while printing their messages.  And in
result it not only may print unwanted messages from other CPUs, but also
omit printing at all in the unlucky case where the printk() was deferred.

Introducing log-level parameter and KERN_UNSUPPRESSED [1] seems an easier
approach than introducing more printk buffers.  Also, it will consolidate
printings with headers.

Add log level argument to printk_address() as a preparation to introduce
show_stack_loglvl().

As a good side-effect show_fault_oops() now prints the address with
KERN_EMREG as the rest of output, making sure there won't be situation
where "PC: " is printed without actual address.

[1]: https://lore.kernel.org/lkml/20190528002412.1625-1-dima@arista.com/T/#u

Signed-off-by: Dmitry Safonov <dima@arista.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Cc: Rich Felker <dalias@libc.org>
Link: http://lkml.kernel.org/r/20200418201944.482088-32-dima@arista.com
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2020-06-09 09:39:12 -07:00
..
boards sh: Replace setup_irq() by request_irq() 2020-03-29 21:03:43 +02:00
boot sh: remove sh5 support 2020-06-01 14:48:52 -04:00
cchips treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00
configs sh: configs: Cleanup old Kconfig IO scheduler options 2020-06-01 14:48:48 -04:00
drivers sh: remove sh5 support 2020-06-01 14:48:52 -04:00
include sh: add loglvl to printk_address() 2020-06-09 09:39:12 -07:00
kernel sh: add loglvl to printk_address() 2020-06-09 09:39:12 -07:00
lib sh: add missing EXPORT_SYMBOL() for __delay 2020-06-01 14:48:51 -04:00
math-emu Merge branch 'siginfo-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ebiederm/user-namespace 2019-07-08 21:48:15 -07:00
mm sh: add loglvl to printk_address() 2020-06-09 09:39:12 -07:00
oprofile treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
tools kbuild: remove redundant target cleaning on failure 2019-01-06 09:46:51 +09:00
Kconfig Fix for arch/sh build regression with newer binutils, removal of SH5, 2020-06-06 15:22:01 -07:00
Kconfig.cpu sh: remove sh5 support 2020-06-01 14:48:52 -04:00
Kconfig.debug sh: remove sh5 support 2020-06-01 14:48:52 -04:00
Makefile sh: remove sh5 support 2020-06-01 14:48:52 -04:00