Commit b4bc3144 authored by Sohil Mehta's avatar Sohil Mehta Committed by Ingo Molnar
Browse files

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:

  0d443b70 ("x86/platform: Remove warning message for duplicate NMI handlers")
  bf9f2ee2 ("x86/nmi: Remove the 'b2b' parameter from nmi_handle()")

Remove the old comment and update it to reflect the current logic.

Signed-off-by: default avatarSohil Mehta <sohil.mehta@intel.com>
Signed-off-by: default avatarIngo Molnar <mingo@kernel.org>
Reviewed-by: default avatarKai Huang <kai.huang@intel.com>
Acked-by: default avatarPeter Zijlstra (Intel) <peterz@infradead.org>
Reviewed-by: default avatarNikolay Borisov <nik.borisov@suse.com>
Link: https://lore.kernel.org/r/20250327234629.3953536-6-sohil.mehta@intel.com
parent 6325f947
Loading
Loading
Loading
Loading
+3 −4
Original line number Diff line number Diff line
@@ -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) {