Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Revert "kernel/debug: Mask KGDB NMI upon entry"

This reverts commit 5a14fead07bcf4e0acc877a8d9e1d1f40a441153.

No architectures ever implemented `enable_nmi` since the later patches
in the series adding it never landed. It's been a long time. Drop it.

NOTE: this is not a clean revert due to changes in the file in the
meantime.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Link: https://lore.kernel.org/r/20250129082535.3.I2254953cd852f31f354456689d68b2d910de3fbe@changeid
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

authored by

Douglas Anderson and committed by
Greg Kroah-Hartman
a029a219 dbb1f9c0

+3 -14
-3
include/linux/kgdb.h
··· 257 257 * hardware breakpoints. 258 258 * @correct_hw_break: Allow an architecture to specify how to correct the 259 259 * hardware debug registers. 260 - * @enable_nmi: Manage NMI-triggered entry to KGDB 261 260 */ 262 261 struct kgdb_arch { 263 262 unsigned char gdb_bpt_instr[BREAK_INSTR_SIZE]; ··· 269 270 void (*disable_hw_break)(struct pt_regs *regs); 270 271 void (*remove_all_hw_break)(void); 271 272 void (*correct_hw_break)(void); 272 - 273 - void (*enable_nmi)(bool on); 274 273 }; 275 274 276 275 /**
+3 -11
kernel/debug/debug_core.c
··· 837 837 { 838 838 struct kgdb_state kgdb_var; 839 839 struct kgdb_state *ks = &kgdb_var; 840 - int ret = 0; 841 - 842 - if (arch_kgdb_ops.enable_nmi) 843 - arch_kgdb_ops.enable_nmi(0); 844 840 /* 845 841 * Avoid entering the debugger if we were triggered due to an oops 846 842 * but panic_timeout indicates the system should automatically ··· 854 858 ks->linux_regs = regs; 855 859 856 860 if (kgdb_reenter_check(ks)) 857 - goto out; /* Ouch, double exception ! */ 861 + return 0; /* Ouch, double exception ! */ 858 862 if (kgdb_info[ks->cpu].enter_kgdb != 0) 859 - goto out; 863 + return 0; 860 864 861 - ret = kgdb_cpu_enter(ks, regs, DCPU_WANT_MASTER); 862 - out: 863 - if (arch_kgdb_ops.enable_nmi) 864 - arch_kgdb_ops.enable_nmi(1); 865 - return ret; 865 + return kgdb_cpu_enter(ks, regs, DCPU_WANT_MASTER); 866 866 } 867 867 NOKPROBE_SYMBOL(kgdb_handle_exception); 868 868