linux-stable/arch/sparc/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
Makefile Kbuild updates for v6.1 2022-10-10 12:00:45 -07:00
adi_64.c
apc.c
asm-offsets.c
audit.c audit: add support for the openat2 syscall 2021-10-01 16:52:48 -04:00
auxio_32.c
auxio_64.c
btext.c
central.c
cherrs.S
chmc.c
compat_audit.c audit: add support for the openat2 syscall 2021-10-01 16:52:48 -04:00
cpu.c
cpumap.c
cpumap.h
devices.c
ds.c
dtlb_miss.S
dtlb_prot.S
ebus.c
entry.S
entry.h
etrap_32.S
etrap_64.S
fpu_traps.S
ftrace.c ftrace: Cleanup ftrace_dyn_arch_init() 2021-10-08 19:41:39 -04:00
getsetcc.S
head_32.S
head_64.S
helpers.S
hvapi.c
hvcalls.S
hvtramp.S
idprom.c
iommu-common.c
iommu.c sparc/iommu: don't set failed sg dma_address to DMA_MAPPING_ERROR 2021-08-09 17:13:06 +02:00
iommu_common.h
ioport.c sparc64: Replace all non-returning strlcpy with strscpy 2023-06-14 12:04:06 -07:00
irq.h
irq_32.c
irq_64.c asm-generic: Conditionally enable do_softirq_own_stack() via Kconfig. 2022-09-05 17:20:55 +02:00
itlb_miss.S
ivec.S
jump_label.c
kernel.h init: consolidate prototypes in linux/init.h 2023-06-09 17:44:16 -07:00
kgdb_32.c
kgdb_64.c
kprobes.c kprobes: treewide: Make it harder to refer kretprobe_trampoline directly 2021-09-30 21:24:06 -04:00
kstack.h
ktlb.S
ldc.c
led.c proc: make the proc_create[_data]() stubs static inlines 2022-01-20 08:52:52 +02:00
leon_kernel.c
leon_pci.c PCI: Introduce pci_dev_for_each_resource() 2023-04-04 10:43:52 -05:00
leon_pci_grpci1.c
leon_pci_grpci2.c
leon_pmc.c arch/idle: Change arch_cpu_idle() behavior: always exit with IRQs disabled 2023-01-13 11:48:15 +01:00
leon_smp.c sparc: Unbreak the build 2022-09-29 19:21:10 -07:00
mdesc.c sparc: avoid stringop-overread errors 2021-09-15 13:42:33 -07:00
misctrap.S
module.c jump_label: mips: move module NOP patching into arch code 2022-06-24 09:48:55 +02:00
nmi.c watchdog/hardlockup: HAVE_NMI_WATCHDOG must implement watchdog_hardlockup_probe() 2023-06-19 16:25:26 -07:00
of_device_32.c sparc: Use of_property_present() for testing DT property presence 2023-04-18 11:23:21 -05:00
of_device_64.c sparc: Use of_property_present() for testing DT property presence 2023-04-18 11:23:21 -05:00
of_device_common.c sparc: Use of_property_present() for testing DT property presence 2023-04-18 11:23:21 -05:00
of_device_common.h
pci.c PCI: Introduce pci_dev_for_each_resource() 2023-04-04 10:43:52 -05:00
pci_common.c
pci_fire.c
pci_impl.h
pci_msi.c genirq/msi, treewide: Use a named struct for PCI/MSI attributes 2021-12-09 11:52:21 +01:00
pci_psycho.c
pci_sabre.c
pci_schizo.c sparc: Use of_property_read_bool() for boolean properties 2023-04-18 11:23:24 -05:00
pci_sun4v.c mm, treewide: redefine MAX_ORDER sanely 2023-04-05 19:42:46 -07:00
pci_sun4v.h
pci_sun4v_asm.S
pcic.c PCI: Introduce pci_dev_for_each_resource() 2023-04-04 10:43:52 -05:00
pcr.c
perf_event.c
pmc.c
power.c sparc: Use of_property_read_bool() for boolean properties 2023-04-18 11:23:24 -05:00
process.c
process_32.c arch/idle: Change arch_cpu_idle() behavior: always exit with IRQs disabled 2023-01-13 11:48:15 +01:00
process_64.c nmi_backtrace: allow excluding an arbitrary CPU 2023-08-18 10:19:00 -07:00
prom.h
prom_32.c
prom_64.c sparc: Use of_property_present() for testing DT property presence 2023-04-18 11:23:21 -05:00
prom_common.c
prom_irqtrans.c
psycho_common.c
psycho_common.h
ptrace_32.c sparc: ptrace: user_regset_copyin_ignore() always returns 0 2022-11-15 14:30:41 -08:00
ptrace_64.c sparc: ptrace: user_regset_copyin_ignore() always returns 0 2022-11-15 14:30:41 -08:00
reboot.c
rtrap_32.S
rtrap_64.S context_tracking: Split user tracking Kconfig 2022-06-29 17:04:09 -07:00
sbus.c
setup_32.c hardening updates for v6.5-rc1 2023-06-27 21:24:18 -07:00
setup_64.c sparc64: Replace all non-returning strlcpy with strscpy 2023-06-14 12:04:06 -07:00
signal32.c sparc: allow pte_offset_map() to fail 2023-06-19 16:19:09 -07:00
signal_32.c ptrace: Cleanups for v5.18 2022-03-28 17:29:53 -07:00
signal_64.c signal: Deliver SIGTRAP on perf event asynchronously if blocked 2022-04-22 12:14:05 +02:00
sigutil.h
sigutil_32.c
sigutil_64.c
smp_32.c treewide: Trace IPIs sent via smp_send_reschedule() 2023-03-24 11:01:28 +01:00
smp_64.c treewide: Trace IPIs sent via smp_send_reschedule() 2023-03-24 11:01:28 +01:00
sparc_ksyms.c
spiterrs.S
sstate.c
stacktrace.c
starfire.c
sun4d_irq.c
sun4d_smp.c sparc: Unbreak the build 2022-09-29 19:21:10 -07:00
sun4m_irq.c
sun4m_smp.c sparc: Unbreak the build 2022-09-29 19:21:10 -07:00
sun4v_ivec.S
sun4v_mcd.S
sun4v_tlb_miss.S
sys32.S
sys_sparc32.c
sys_sparc_32.c signal/sparc: si_trapno is only used with SIGILL ILL_ILLTRP 2021-07-23 13:08:57 -05:00
sys_sparc_64.c signal/sparc: si_trapno is only used with SIGILL ILL_ILLTRP 2021-07-23 13:08:57 -05:00
syscalls.S
sysfs.c drivers/base/node: consolidate node device subsystem initialization in node_dev_init() 2022-03-22 15:57:10 -07:00
systbls.h
systbls_32.S
systbls_64.S
termios.c termios: start unifying non-UAPI parts of asm/termios.h 2022-09-09 10:44:34 +02:00
time_32.c sparc: Use of_property_present() for testing DT property presence 2023-04-18 11:23:21 -05:00
time_64.c
trampoline_32.S
trampoline_64.S
traps_32.c exit: Add and use make_task_dead. 2021-12-13 12:04:45 -06:00
traps_64.c mm, treewide: redefine MAX_ORDER sanely 2023-04-05 19:42:46 -07:00
tsb.S
ttable_32.S
ttable_64.S
una_asm_32.S
una_asm_64.S
unaligned_32.c signal/sparc: si_trapno is only used with SIGILL ILL_ILLTRP 2021-07-23 13:08:57 -05:00
unaligned_64.c
uprobes.c
urtt_fill.S
utrap.S
vdso.c
vio.c driver core: make struct bus_type.uevent() take a const * 2023-01-27 13:45:52 +01:00
viohs.c
visemul.c
vmlinux.lds.S objtool/idle: Validate __cpuidle code as noinstr 2023-01-13 11:48:15 +01:00
windows.c signal: Replace force_fatal_sig with force_exit_sig when in doubt 2021-11-19 09:15:58 -06:00
winfixup.S
wof.S
wuf.S