mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-08-05 16:54:27 +00:00
Revert "kernel/debug: Mask KGDB NMI upon entry"
This reverts commit 5a14fead07
.
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>
This commit is contained in:
parent
dbb1f9c03b
commit
a029a21938
2 changed files with 3 additions and 14 deletions
|
@ -257,7 +257,6 @@ extern void kgdb_arch_late(void);
|
|||
* hardware breakpoints.
|
||||
* @correct_hw_break: Allow an architecture to specify how to correct the
|
||||
* hardware debug registers.
|
||||
* @enable_nmi: Manage NMI-triggered entry to KGDB
|
||||
*/
|
||||
struct kgdb_arch {
|
||||
unsigned char gdb_bpt_instr[BREAK_INSTR_SIZE];
|
||||
|
@ -270,8 +269,6 @@ struct kgdb_arch {
|
|||
void (*disable_hw_break)(struct pt_regs *regs);
|
||||
void (*remove_all_hw_break)(void);
|
||||
void (*correct_hw_break)(void);
|
||||
|
||||
void (*enable_nmi)(bool on);
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
|
@ -837,10 +837,6 @@ kgdb_handle_exception(int evector, int signo, int ecode, struct pt_regs *regs)
|
|||
{
|
||||
struct kgdb_state kgdb_var;
|
||||
struct kgdb_state *ks = &kgdb_var;
|
||||
int ret = 0;
|
||||
|
||||
if (arch_kgdb_ops.enable_nmi)
|
||||
arch_kgdb_ops.enable_nmi(0);
|
||||
/*
|
||||
* Avoid entering the debugger if we were triggered due to an oops
|
||||
* but panic_timeout indicates the system should automatically
|
||||
|
@ -858,15 +854,11 @@ kgdb_handle_exception(int evector, int signo, int ecode, struct pt_regs *regs)
|
|||
ks->linux_regs = regs;
|
||||
|
||||
if (kgdb_reenter_check(ks))
|
||||
goto out; /* Ouch, double exception ! */
|
||||
return 0; /* Ouch, double exception ! */
|
||||
if (kgdb_info[ks->cpu].enter_kgdb != 0)
|
||||
goto out;
|
||||
return 0;
|
||||
|
||||
ret = kgdb_cpu_enter(ks, regs, DCPU_WANT_MASTER);
|
||||
out:
|
||||
if (arch_kgdb_ops.enable_nmi)
|
||||
arch_kgdb_ops.enable_nmi(1);
|
||||
return ret;
|
||||
return kgdb_cpu_enter(ks, regs, DCPU_WANT_MASTER);
|
||||
}
|
||||
NOKPROBE_SYMBOL(kgdb_handle_exception);
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue