linux-stable/arch/loongarch/kernel
Douglas Anderson 8d539b84f1 nmi_backtrace: allow excluding an arbitrary CPU
The APIs that allow backtracing across CPUs have always had a way to
exclude the current CPU.  This convenience means callers didn't need to
find a place to allocate a CPU mask just to handle the common case.

Let's extend the API to take a CPU ID to exclude instead of just a
boolean.  This isn't any more complex for the API to handle and allows the
hardlockup detector to exclude a different CPU (the one it already did a
trace for) without needing to find space for a CPU mask.

Arguably, this new API also encourages safer behavior.  Specifically if
the caller wants to avoid tracing the current CPU (maybe because they
already traced the current CPU) this makes it more obvious to the caller
that they need to make sure that the current CPU ID can't change.

[akpm@linux-foundation.org: fix trigger_allbutcpu_cpu_backtrace() stub]
Link: https://lkml.kernel.org/r/20230804065935.v4.1.Ia35521b91fc781368945161d7b28538f9996c182@changeid
Signed-off-by: Douglas Anderson <dianders@chromium.org>
Acked-by: Michal Hocko <mhocko@suse.com>
Cc: kernel test robot <lkp@intel.com>
Cc: Lecopzer Chen <lecopzer.chen@mediatek.com>
Cc: Petr Mladek <pmladek@suse.com>
Cc: Pingfan Liu <kernelfans@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
2023-08-18 10:19:00 -07:00
..
.gitignore
Makefile LoongArch: Add uprobes support 2023-06-29 20:58:44 +08:00
access-helper.h
acpi.c LoongArch: Add SMT (Simultaneous Multi-Threading) support 2023-06-29 20:58:43 +08:00
alternative.c
asm-offsets.c LoongArch: ftrace: Enable HAVE_FUNCTION_GRAPH_RETVAL 2023-06-20 18:38:38 -04:00
cacheinfo.c
cpu-probe.c LoongArch: Introduce hardware page table walker 2023-06-29 20:58:44 +08:00
crash_dump.c
dma.c
efi-header.S LoongArch: Calculate various sizes in the linker script 2023-06-29 20:58:42 +08:00
efi.c
elf.c
entry.S
env.c
fpu.S LoongArch: Add vector extensions support 2023-06-29 20:58:43 +08:00
ftrace.c
ftrace_dyn.c
genex.S
head.S LoongArch: Calculate various sizes in the linker script 2023-06-29 20:58:42 +08:00
hw_breakpoint.c LoongArch: Avoid uninitialized alignment_mask 2023-06-15 14:35:52 +08:00
idle.c
image-vars.h
inst.c LoongArch: Add larch_insn_gen_break() to generate break insns 2023-06-29 20:58:44 +08:00
io.c
irq.c
jump_label.c LoongArch: Add jump-label implementation 2023-06-29 20:58:44 +08:00
kfpu.c
kprobes.c LoongArch: Use larch_insn_gen_break() for kprobes 2023-06-29 20:58:44 +08:00
machine_kexec.c
mcount.S LoongArch: ftrace: Enable HAVE_FUNCTION_GRAPH_RETVAL 2023-06-20 18:38:38 -04:00
mcount_dyn.S LoongArch: ftrace: Enable HAVE_FUNCTION_GRAPH_RETVAL 2023-06-20 18:38:38 -04:00
mem.c
module-sections.c
module.c
numa.c
perf_event.c LoongArch: Fix perf event id calculation 2023-06-15 14:35:52 +08:00
perf_regs.c
proc.c LoongArch: Introduce hardware page table walker 2023-06-29 20:58:44 +08:00
process.c nmi_backtrace: allow excluding an arbitrary CPU 2023-08-18 10:19:00 -07:00
ptrace.c LoongArch: Add vector extensions support 2023-06-29 20:58:43 +08:00
relocate.c
relocate_kernel.S
reset.c
rethook.c LoongArch: Replace kretprobe with rethook 2023-06-29 20:58:44 +08:00
rethook.h LoongArch: Replace kretprobe with rethook 2023-06-29 20:58:44 +08:00
rethook_trampoline.S LoongArch: Replace kretprobe with rethook 2023-06-29 20:58:44 +08:00
setup.c LoongArch: Fix CMDLINE_EXTEND and CMDLINE_BOOTLOADER handling 2023-07-28 10:30:42 +08:00
signal.c LoongArch: Add vector extensions support 2023-06-29 20:58:43 +08:00
smp.c LoongArch: Support dbar with different hints 2023-06-29 20:58:44 +08:00
stacktrace.c
switch.S
syscall.c
sysrq.c
time.c loongarch: Provide noinstr sched_clock_read() 2023-06-05 21:11:05 +02:00
topology.c
traps.c LoongArch: Add uprobes support 2023-06-29 20:58:44 +08:00
unaligned.c LoongArch: Delete unnecessary debugfs checking 2023-06-29 20:58:42 +08:00
unwind.c
unwind_guess.c
unwind_prologue.c
uprobes.c LoongArch: Add uprobes support 2023-06-29 20:58:44 +08:00
vdso.c LoongArch: Add support to clone a time namespace 2023-06-29 20:58:43 +08:00
vmlinux.lds.S LoongArch: Calculate various sizes in the linker script 2023-06-29 20:58:42 +08:00