linux-stable/arch/mips/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
..
syscalls cachestat: wire up cachestat for other architectures 2023-06-09 16:25:16 -07:00
.gitignore .gitignore: add SPDX License Identifier 2020-03-25 11:50:48 +01:00
Makefile MIPS: Remove deprecated CONFIG_MIPS_CMP 2023-04-12 15:01:09 +02:00
access-helper.h MIPS: Fix new sparse warnings 2021-04-07 16:11:05 +02:00
asm-offsets.c mips: asm-offsets: add missing prototypes 2023-06-09 10:18:42 +02:00
bmips_5xxx_init.S
bmips_vec.S
branch.c MIPS: kernel: include probes-common.h header in branch.c 2020-09-21 22:14:24 +02:00
cacheinfo.c drivers: base: cacheinfo: Get rid of DEFINE_SMP_CALL_CACHE_FUNCTION() 2021-09-01 10:29:10 +02:00
cevt-bcm1480.c MIPS: Replace setup_irq() by request_irq() 2020-03-05 16:47:35 +01:00
cevt-ds1287.c MIPS: Replace setup_irq() by request_irq() 2020-03-05 16:47:35 +01:00
cevt-gt641xx.c MIPS: Replace setup_irq() by request_irq() 2020-03-05 16:47:35 +01:00
cevt-r4k.c MIPS: cevt-r4k: Offset the value used to clear compare interrupt 2023-02-27 23:45:17 +01:00
cevt-sb1250.c MIPS: Replace setup_irq() by request_irq() 2020-03-05 16:47:35 +01:00
cevt-txx9.c mips: kernel: convert comma to semicolon 2020-12-28 22:32:28 +01:00
cmpxchg.c MIPS: fix typos in comments 2022-05-04 22:22:59 +02:00
cps-vec-ns16550.S mips: Add CPS_NS16550_WIDTH config 2020-05-22 09:12:52 +02:00
cps-vec.S MIPS: smp-cps: Disable coherence setup for unsupported ISA 2023-04-05 09:45:08 +02:00
cpu-probe.c MIPS: Loongson: Fix cpu_probe_loongson() again 2023-07-03 16:05:51 +02:00
cpu-r3k-probe.c MIPS: Remove TX39XX support 2022-03-01 10:07:22 +01:00
crash.c
crash_dump.c vmcore: convert copy_oldmem_page() to take an iov_iter 2022-04-29 14:37:59 -07:00
csrc-bcm1480.c
csrc-ioasic.c
csrc-r4k.c mips: csrc-r4k: Mark R4K timer as unstable if CPU freq changes 2020-05-22 09:14:06 +02:00
csrc-sb1250.c
early_printk.c
early_printk_8250.c
elf.c MIPS: Modernize READ_IMPLIES_EXEC 2022-02-23 13:08:30 +01:00
entry.S MIPS: Remove TX39XX support 2022-03-01 10:07:22 +01:00
fpu-probe.c MIPS: cpu-probe: move fpu probing/handling into its own file 2020-10-12 12:04:50 +02:00
fpu-probe.h MIPS: cpu-probe: move fpu probing/handling into its own file 2020-10-12 12:04:50 +02:00
ftrace.c MIPS: kernel: Remove not needed set_fs calls 2021-04-06 14:36:56 +02:00
genex.S MIPS: Always use -Wa,-msoft-float and eliminate GAS_HAS_SET_HARDFLOAT 2023-01-26 12:41:16 +09:00
gpio_txx9.c
head.S MIPS: of: Introduce helper function to get DTB 2021-02-04 13:34:51 +01:00
i8253.c MIPS: Replace setup_irq() by request_irq() 2020-03-05 16:47:35 +01:00
idle.c cpuidle,arch: Mark all regular cpuidle_state:: Enter methods __cpuidle 2023-01-13 11:48:18 +01:00
irq-gt641xx.c
irq-msc01.c
irq.c MIPS: Only use current_stack_pointer on GCC 2022-03-14 15:02:53 +01:00
irq_txx9.c MIPS: Remove TX39XX support 2022-03-01 10:07:22 +01:00
jump_label.c MIPS: jump_label: Fix compat branch range check 2022-11-11 15:46:03 +01:00
kgdb.c MIPS: kernel: Drop kgdb_call_nmi_hook 2021-02-15 12:23:54 +01:00
kprobes.c MIPS: Use NOKPROBE_SYMBOL() instead of __kprobes annotation 2022-05-12 18:00:51 +02:00
linux32.c
machine_kexec.c
mcount.S
mips-cm.c MIPS: mips-cm: Check availability of config registers 2023-04-05 09:45:08 +02:00
mips-cpc.c mips: cpc: Fix refcount leak in mips_cpc_default_phys_base 2022-04-26 15:11:25 +02:00
mips-mt-fpaff.c MIPS: Replace deprecated CPU-hotplug functions. 2021-08-05 10:57:01 +02:00
mips-mt.c driver core: class: remove module * from class_create() 2023-03-17 15:16:33 +01:00
mips-r2-to-r6-emul.c MIPS: Fix build error due to PTR used in more places 2022-01-27 09:04:19 +01:00
module.c jump_label: mips: move module NOP patching into arch code 2022-06-24 09:48:55 +02:00
octeon_switch.S MIPS: octeon_switch: Remove duplicated labels 2023-04-12 15:14:16 +02:00
perf_event.c
perf_event_mipsxx.c MIPS: fix typos in comments 2022-05-04 22:22:59 +02:00
perf_regs.c MIPS: kernel: Support extracting off-line stack traces from user-space with perf 2021-02-04 21:55:45 +01:00
pm-cps.c
pm.c
probes-common.h
proc.c MIPS: cpuinfo: Fix a warning for CONFIG_CPUMASK_OFFSTACK 2022-07-14 11:49:40 +02:00
process.c nmi_backtrace: allow excluding an arbitrary CPU 2023-08-18 10:19:00 -07:00
prom.c MIPS: move from strlcpy with unused retval to strscpy 2022-09-12 15:34:04 +02:00
ptrace.c mips: ptrace: user_regset_copyin_ignore() always returns 0 2022-11-15 14:30:40 -08:00
ptrace32.c mm: don't include asm/pgtable.h if linux/mm.h is already included 2020-06-09 09:39:13 -07:00
r4k-bugs64.c MIPS: remove asm/war.h 2022-02-22 09:35:49 +01:00
r4k_fpu.S MIPS: Always use -Wa,-msoft-float and eliminate GAS_HAS_SET_HARDFLOAT 2023-01-26 12:41:16 +09:00
r4k_switch.S
r2300_fpu.S MIPS: Always use -Wa,-msoft-float and eliminate GAS_HAS_SET_HARDFLOAT 2023-01-26 12:41:16 +09:00
r2300_switch.S
relocate.c MIPS: move from strlcpy with unused retval to strscpy 2022-09-12 15:34:04 +02:00
relocate_kernel.S MIPS: fix duplicate definitions for exported symbols 2022-11-11 15:44:44 +01:00
reset.c mips: Use do_kernel_power_off() 2022-05-19 19:30:31 +02:00
rtlx-mt.c MIPS: Replace setup_irq() by request_irq() 2020-03-05 16:47:35 +01:00
rtlx.c
scall32-o32.S MIPS: remove asm/war.h 2022-02-22 09:35:49 +01:00
scall64-n32.S MIPS: Fix build error due to PTR used in more places 2022-01-27 09:04:19 +01:00
scall64-n64.S MIPS: remove asm/war.h 2022-02-22 09:35:49 +01:00
scall64-o32.S MIPS: Fix build error due to PTR used in more places 2022-01-27 09:04:19 +01:00
segment.c mips: kernel: convert to DEFINE_SHOW_ATTRIBUTE 2022-09-19 16:40:17 +02:00
setup.c Updates for the x86 boot process: 2023-06-26 13:39:10 -07:00
signal-common.h
signal.c ptrace: Cleanups for v5.18 2022-03-28 17:29:53 -07:00
signal32.c
signal_n32.c MIPS: remove asm/war.h 2022-02-22 09:35:49 +01:00
signal_o32.c
smp-bmips.c MIPS: SMP_CPS: Switch to hotplug core state synchronization 2023-05-15 13:44:58 +02:00
smp-cps.c - added support for TP-Link HC220 G5 v1 2023-06-29 15:01:51 -07:00
smp-mt.c MIPS: Rework smt cmdline parameters 2023-06-09 10:34:14 +02:00
smp-up.c
smp.c - added support for TP-Link HC220 G5 v1 2023-06-29 15:01:51 -07:00
spinlock_test.c mips: kernel: use DEFINE_DEBUGFS_ATTRIBUTE with debugfs_create_file_unsafe() 2021-03-14 14:09:49 +01:00
spram.c mips: Add CONFIG/CONFIG6/Cause reg fields macro 2020-05-22 09:12:22 +02:00
stacktrace.c
sync-r4k.c MIPS: sync-r4k: do slave counter synchronization with disabled HW interrupts 2020-01-22 10:16:18 -08:00
syscall.c MIPS: Fix build error due to PTR used in more places 2022-01-27 09:04:19 +01:00
sysrq.c MIPS: constify sysrq_key_op 2020-05-15 14:53:19 +02:00
time.c MIPS: Fix CP0 counter erratum detection for R4k CPUs 2022-04-29 15:52:00 +02:00
topology.c drivers/base/node: consolidate node device subsystem initialization in node_dev_init() 2022-03-22 15:57:10 -07:00
traps.c MIPS: fix fortify panic when copying asm exception handlers 2022-03-07 13:09:28 +01:00
unaligned.c MIPS: uaccess: emulate Ingenic LXW/LXH/LXHU uaccess 2023-06-09 09:54:17 +02:00
uprobes.c MIPS: uprobes: Restore thread.trap_nr 2023-04-24 13:31:44 +02:00
vdso.c treewide: use get_random_u32_below() instead of deprecated function 2022-11-18 02:15:15 +01:00
vmlinux.lds.S MIPS: Define RUNTIME_DISCARD_EXIT in LD script 2023-04-21 23:59:43 +02:00
vpe-mt.c drivers: remove struct module * setting from struct class 2023-03-17 15:16:27 +01:00
vpe.c - added support for Huawei B593u-12 2023-04-27 17:46:52 -07:00
watch.c MIPS: Use fallthrough for arch/mips 2020-05-07 11:55:47 +02:00