linux-stable/arch/x86/kernel/apic
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
..
Makefile
apic.c x86/smp: Initialize cpu_primary_thread_mask late 2023-05-29 21:31:23 +02:00
apic_common.c
apic_flat_64.c x86/apic: Cleanup destination mode 2020-10-28 20:26:25 +01:00
apic_noop.c x86/apic: Cleanup destination mode 2020-10-28 20:26:25 +01:00
apic_numachip.c x86/apic: Cleanup destination mode 2020-10-28 20:26:25 +01:00
bigsmp_32.c x86/apic: Cleanup destination mode 2020-10-28 20:26:25 +01:00
hw_nmi.c nmi_backtrace: allow excluding an arbitrary CPU 2023-08-18 10:19:00 -07:00
io_apic.c x86 APIC updates: 2023-04-25 11:39:45 -07:00
ipi.c KVM: x86: lapic: Rename [GET/SET]_APIC_DEST_FIELD to [GET/SET]_XAPIC_DEST_FIELD 2022-06-24 12:44:34 -04:00
local.h x86/headers: Remove APIC headers from <asm/smp.h> 2020-08-06 16:13:09 +02:00
msi.c x86/apic/msi: Enable PCI/IMS 2022-12-05 22:22:35 +01:00
probe_32.c x86/apic: Cleanup destination mode 2020-10-28 20:26:25 +01:00
probe_64.c x86/irq: Move apic_post_init() invocation to one place 2020-09-16 16:52:35 +02:00
vector.c x86/apic: Remove X86_IRQ_ALLOC_CONTIGUOUS_VECTORS 2022-11-17 15:15:22 +01:00
x2apic_cluster.c x86/apic/x2apic: Allow CPU cluster_mask to be populated in parallel 2023-03-21 13:35:53 +01:00
x2apic_phys.c x86/apic: Fix kernel panic when booting with intremap=off and x2apic_phys 2023-06-19 20:59:40 +02:00
x2apic_uv_x.c x86/platform/uv: Update UV[23] platform code for SNC 2023-05-31 09:35:00 -07:00