linux-stable/arch
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
..
alpha Merge branch 'expand-stack' 2023-06-28 20:35:21 -07:00
arc asm-generic updates for 6.5 2023-07-06 10:06:04 -07:00
arm nmi_backtrace: allow excluding an arbitrary CPU 2023-08-18 10:19:00 -07:00
arm64 arm64/kexec: refactor for kernel/Kconfig.kexec 2023-08-18 10:18:52 -07:00
csky arch/csky patches for 6.5 2023-07-01 21:12:32 -07:00
hexagon Merge branch 'expand-stack' 2023-06-28 20:35:21 -07:00
ia64 ia64/kexec: refactor for kernel/Kconfig.kexec 2023-08-18 10:18:52 -07:00
loongarch nmi_backtrace: allow excluding an arbitrary CPU 2023-08-18 10:19:00 -07:00
m68k m68k/kexec: refactor for kernel/Kconfig.kexec 2023-08-18 10:18:53 -07:00
microblaze slab updates for 6.5 2023-06-29 16:34:12 -07:00
mips nmi_backtrace: allow excluding an arbitrary CPU 2023-08-18 10:19:00 -07:00
nios2 slab updates for 6.5 2023-06-29 16:34:12 -07:00
openrisc OpenRISC fix for 6.5 2023-07-12 16:28:53 -07:00
parisc parisc/kexec: refactor for kernel/Kconfig.kexec 2023-08-18 10:18:53 -07:00
powerpc nmi_backtrace: allow excluding an arbitrary CPU 2023-08-18 10:19:00 -07:00
riscv kexec: rename ARCH_HAS_KEXEC_PURGATORY 2023-08-18 10:18:54 -07:00
s390 remove ARCH_DEFAULT_KEXEC from Kconfig.kexec 2023-08-18 10:18:55 -07:00
sh sh/kexec: refactor for kernel/Kconfig.kexec 2023-08-18 10:18:54 -07:00
sparc nmi_backtrace: allow excluding an arbitrary CPU 2023-08-18 10:19:00 -07:00
um arch/*/configs/*defconfig: Replace AUTOFS4_FS by AUTOFS_FS 2023-07-29 14:08:22 -07:00
x86 nmi_backtrace: allow excluding an arbitrary CPU 2023-08-18 10:19:00 -07:00
xtensa xtensa: fix unaligned and load/store configuration interaction 2023-07-10 21:41:04 -07:00
.gitignore
Kconfig arch: enable HAS_LTO_CLANG with KASAN and KCOV 2023-08-18 10:18:56 -07:00