[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20260125014224.249901-3-chang.seok.bae@intel.com>
Date: Sun, 25 Jan 2026 01:42:17 +0000
From: "Chang S. Bae" <chang.seok.bae@...el.com>
To: linux-kernel@...r.kernel.org
Cc: x86@...nel.org,
tglx@...utronix.de,
mingo@...hat.com,
bp@...en8.de,
dave.hansen@...ux.intel.com,
peterz@...radead.org,
david.kaplan@....com,
chang.seok.bae@...el.com
Subject: [PATCH 2/7] x86/apic: Implement self-NMI support
From: David Kaplan <david.kaplan@....com>
Add function to send an NMI-to-self which is needed for stop_machine_nmi().
Note that send_IPI_self() cannot be used to send an NMI so send_IPI() is
used.
Signed-off-by: David Kaplan <david.kaplan@....com>
Signed-off-by: Chang S. Bae <chang.seok.bae@...el.com>
---
Updates from the original version:
* Rename the subject to highlight arch-side "implementation"
---
arch/x86/kernel/apic/ipi.c | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/arch/x86/kernel/apic/ipi.c b/arch/x86/kernel/apic/ipi.c
index 98a57cb4aa86..6d4e5aa27529 100644
--- a/arch/x86/kernel/apic/ipi.c
+++ b/arch/x86/kernel/apic/ipi.c
@@ -4,6 +4,7 @@
#include <linux/delay.h>
#include <linux/smp.h>
#include <linux/string_choices.h>
+#include <linux/stop_machine.h>
#include <asm/io_apic.h>
@@ -248,6 +249,12 @@ void default_send_IPI_self(int vector)
__default_send_IPI_shortcut(APIC_DEST_SELF, vector);
}
+/* Self-NMI is used in stop_machine_nmi() */
+void arch_send_self_nmi(void)
+{
+ apic->send_IPI(smp_processor_id(), NMI_VECTOR);
+}
+
#ifdef CONFIG_X86_32
void default_send_IPI_mask_sequence_logical(const struct cpumask *mask, int vector)
{
--
2.51.0
Powered by blists - more mailing lists