linux-stable/arch/sparc
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
..
boot kbuild: factor out the common installation code into scripts/install.sh 2022-05-11 21:45:53 +09:00
configs arch/*/configs/*defconfig: Replace AUTOFS4_FS by AUTOFS_FS 2023-07-29 14:08:22 -07:00
crypto crypto: Kconfig - simplify cipher entries 2022-08-26 18:50:43 +08:00
include nmi_backtrace: allow excluding an arbitrary CPU 2023-08-18 10:19:00 -07:00
kernel nmi_backtrace: allow excluding an arbitrary CPU 2023-08-18 10:19:00 -07:00
lib bitops: wrap non-atomic bitops with a transparent macro 2022-06-30 19:52:41 -07:00
math-emu treewide: Use fallthrough pseudo-keyword 2020-08-23 17:36:59 -05:00
mm sparc32: fix lock_mm_and_find_vma() conversion 2023-06-29 20:41:24 -07:00
net net: remove skb->vlan_present 2022-11-11 18:18:05 -08:00
power treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00
prom sparc64: Replace all non-returning strlcpy with strscpy 2023-06-14 12:04:06 -07:00
vdso treewide: use get_random_u32_below() instead of deprecated function 2022-11-18 02:15:15 +01:00
video arch/sparc: Add module license and description for fbdev helpers 2023-06-29 13:30:02 +02:00
Kbuild kbuild: use more subdir- for visiting subdirectories while cleaning 2021-10-24 13:49:46 +09:00
Kconfig Merge branch 'expand-stack' 2023-06-28 20:35:21 -07:00
Kconfig.debug watchdog/sparc64: define HARDLOCKUP_DETECTOR_SPARC64 2023-06-19 16:25:29 -07:00
Makefile Merge drm/drm-next into drm-misc-next 2023-05-09 15:03:40 +02:00