linux/arch/powerpc
John Ogness 85e3e7fbbb printk: remove NMI tracking
All NMI contexts are handled the same as the safe context: store the
message and defer printing. There is no need to have special NMI
context tracking for this. Using in_nmi() is enough.

There are several parts of the kernel that are manually calling into
the printk NMI context tracking in order to cause general printk
deferred printing:

    arch/arm/kernel/smp.c
    arch/powerpc/kexec/crash.c
    kernel/trace/trace.c

For arm/kernel/smp.c and powerpc/kexec/crash.c, provide a new
function pair printk_deferred_enter/exit that explicitly achieves the
same objective.

For ftrace, remove the printk context manipulation completely. It was
added in commit 03fc7f9c99 ("printk/nmi: Prevent deadlock when
accessing the main log buffer in NMI"). The purpose was to enforce
storing messages directly into the ring buffer even in NMI context.
It really should have only modified the behavior in NMI context.
There is no need for a special behavior any longer. All messages are
always stored directly now. The console deferring is handled
transparently in vprintk().

Signed-off-by: John Ogness <john.ogness@linutronix.de>
[pmladek@suse.com: Remove special handling in ftrace.c completely.
Signed-off-by: Petr Mladek <pmladek@suse.com>
Link: https://lore.kernel.org/r/20210715193359.25946-5-john.ogness@linutronix.de
2021-07-26 15:09:44 +02:00
..
boot powerpc/fsl: set fsl,i2c-erratum-a004447 flag for P1010 i2c controllers 2021-05-27 21:52:16 +02:00
configs powerpc updates for 5.13 2021-04-30 12:22:28 -07:00
crypto
include Merge branch 'akpm' (patches from Andrew) 2021-06-29 17:29:11 -07:00
kernel printk: remove safe buffers 2021-07-26 15:09:34 +02:00
kexec printk: remove NMI tracking 2021-07-26 15:09:44 +02:00
kvm Merge branch 'akpm' (patches from Andrew) 2021-06-29 17:29:11 -07:00
lib powerpc/64s: Fix stf mitigation patching w/strict RWX & hash 2021-05-14 17:27:37 +10:00
math-emu
mm Merge branch 'akpm' (patches from Andrew) 2021-06-29 17:29:11 -07:00
net powerpc/ebpf32: Use standard function call for functions within 32M distance 2021-04-21 22:52:33 +10:00
perf powerpc/perf: Fix crash in perf_instruction_pointer() when ppmu is not set 2021-06-18 16:30:36 +10:00
platforms Updates for the interrupt subsystem: 2021-06-29 12:25:04 -07:00
purgatory
sysdev powerpc: Move the use of irq_domain_add_nomap() behind a config option 2021-06-10 13:09:17 +01:00
tools
xmon sched: Change task_struct::state 2021-06-18 11:43:09 +02:00
Kbuild
Kconfig mm: replace CONFIG_NEED_MULTIPLE_NODES with CONFIG_NUMA 2021-06-29 10:53:55 -07:00
Kconfig.debug
Makefile powerpc: Only define _TASK_CPU for 32-bit 2021-04-20 14:22:24 +10:00
Makefile.postlink