summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSohil Mehta <sohil.mehta@intel.com>2025-03-28 02:46:25 +0300
committerIngo Molnar <mingo@kernel.org>2025-04-01 23:26:11 +0300
commitb4bc3144c1eca9107f45018000a1e68bfd308d8c (patch)
tree45994e15e5347a6a2285727859657daf17b805d7
parent6325f947014644ff39e5902afa48238af8f92e0e (diff)
downloadlinux-b4bc3144c1eca9107f45018000a1e68bfd308d8c.tar.xz
x86/nmi: Fix comment in unknown_nmi_error()
The comment in unknown_nmi_error() is incorrect and misleading. There is no longer a restriction on having a single Unknown NMI handler. Also, nmi_handle() never used the 'b2b' parameter. The commits that made the comment outdated are: 0d443b70cc92 ("x86/platform: Remove warning message for duplicate NMI handlers") bf9f2ee28d47 ("x86/nmi: Remove the 'b2b' parameter from nmi_handle()") Remove the old comment and update it to reflect the current logic. Signed-off-by: Sohil Mehta <sohil.mehta@intel.com> Signed-off-by: Ingo Molnar <mingo@kernel.org> Reviewed-by: Kai Huang <kai.huang@intel.com> Acked-by: Peter Zijlstra (Intel) <peterz@infradead.org> Reviewed-by: Nikolay Borisov <nik.borisov@suse.com> Link: https://lore.kernel.org/r/20250327234629.3953536-6-sohil.mehta@intel.com
-rw-r--r--arch/x86/kernel/nmi.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/arch/x86/kernel/nmi.c b/arch/x86/kernel/nmi.c
index cdfb3864d59a..2a07c9adc6a6 100644
--- a/arch/x86/kernel/nmi.c
+++ b/arch/x86/kernel/nmi.c
@@ -327,10 +327,9 @@ unknown_nmi_error(unsigned char reason, struct pt_regs *regs)
int handled;
/*
- * Use 'false' as back-to-back NMIs are dealt with one level up.
- * Of course this makes having multiple 'unknown' handlers useless
- * as only the first one is ever run (unless it can actually determine
- * if it caused the NMI)
+ * As a last resort, let the "unknown" handlers make a
+ * best-effort attempt to figure out if they can claim
+ * responsibility for this Unknown NMI.
*/
handled = nmi_handle(NMI_UNKNOWN, regs);
if (handled) {