Skip to content

Commit c08b0f2

Browse files
diandersgregkh
authored andcommitted
Revert "tty/serial: Add kgdb_nmi driver"
This reverts commit 0c57dfc. The functionality was supoosed to be used by a later patch in the series that never landed [1]. Drop it. NOTE: part of functionality was already reverted by commit 39d0be8 ("serial: kgdb_nmi: Remove unused knock code"). Also note that this revert is not a clean revert given code changes that have happened in the meantime. It's obvious that nobody is using this code since the two exposed functions (kgdb_register_nmi_console() and kgdb_unregister_nmi_console()) are both no-ops if "arch_kgdb_ops.enable_nmi" is not defined. No architectures define it. [1] https://lore.kernel.org/lkml/[email protected]/ Signed-off-by: Douglas Anderson <[email protected]> Acked-by: Andy Shevchenko <[email protected]> Link: URL [1] Link: https://lore.kernel.org/r/20250129082535.1.Ia095eac1ae357f87d23e7af2206741f5d40788f1@changeid Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent c213375 commit c08b0f2

File tree

5 files changed

+0
-316
lines changed

5 files changed

+0
-316
lines changed

drivers/tty/serial/Kconfig

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -179,25 +179,6 @@ config SERIAL_ATMEL_TTYAT
179179

180180
Say Y if you have an external 8250/16C550 UART. If unsure, say N.
181181

182-
config SERIAL_KGDB_NMI
183-
bool "Serial console over KGDB NMI debugger port"
184-
depends on KGDB_SERIAL_CONSOLE
185-
help
186-
This special driver allows you to temporary use NMI debugger port
187-
as a normal console (assuming that the port is attached to KGDB).
188-
189-
Unlike KDB's disable_nmi command, with this driver you are always
190-
able to go back to the debugger using KGDB escape sequence ($3#33).
191-
This is because this console driver processes the input in NMI
192-
context, and thus is able to intercept the magic sequence.
193-
194-
Note that since the console interprets input and uses polling
195-
communication methods, for things like PPP you still must fully
196-
detach debugger port from the KGDB NMI (i.e. disable_nmi), and
197-
use raw console.
198-
199-
If unsure, say N.
200-
201182
config SERIAL_MESON
202183
tristate "Meson serial port support"
203184
depends on ARCH_MESON || COMPILE_TEST

drivers/tty/serial/Makefile

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,5 @@ obj-$(CONFIG_SERIAL_ZS) += zs.o
9696
# GPIOLIB helpers for modem control lines
9797
obj-$(CONFIG_SERIAL_MCTRL_GPIO) += serial_mctrl_gpio.o
9898

99-
obj-$(CONFIG_SERIAL_KGDB_NMI) += kgdb_nmi.o
10099
obj-$(CONFIG_KGDB_SERIAL_CONSOLE) += kgdboc.o
101100
obj-$(CONFIG_SERIAL_NUVOTON_MA35D1) += ma35d1_serial.o

drivers/tty/serial/kgdb_nmi.c

Lines changed: 0 additions & 280 deletions
This file was deleted.

drivers/tty/serial/kgdboc.c

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -186,8 +186,6 @@ static void cleanup_kgdboc(void)
186186
if (configured != 1)
187187
return;
188188

189-
if (kgdb_unregister_nmi_console())
190-
return;
191189
kgdboc_unregister_kbd();
192190
kgdb_unregister_io_module(&kgdboc_io_ops);
193191
}
@@ -250,16 +248,10 @@ static int configure_kgdboc(void)
250248
if (err)
251249
goto noconfig;
252250

253-
err = kgdb_register_nmi_console();
254-
if (err)
255-
goto nmi_con_failed;
256-
257251
configured = 1;
258252

259253
return 0;
260254

261-
nmi_con_failed:
262-
kgdb_unregister_io_module(&kgdboc_io_ops);
263255
noconfig:
264256
kgdboc_unregister_kbd();
265257
configured = 0;

include/linux/kgdb.h

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -306,14 +306,6 @@ extern const struct kgdb_arch arch_kgdb_ops;
306306

307307
extern unsigned long kgdb_arch_pc(int exception, struct pt_regs *regs);
308308

309-
#ifdef CONFIG_SERIAL_KGDB_NMI
310-
extern int kgdb_register_nmi_console(void);
311-
extern int kgdb_unregister_nmi_console(void);
312-
#else
313-
static inline int kgdb_register_nmi_console(void) { return 0; }
314-
static inline int kgdb_unregister_nmi_console(void) { return 0; }
315-
#endif
316-
317309
extern int kgdb_register_io_module(struct kgdb_io *local_kgdb_io_ops);
318310
extern void kgdb_unregister_io_module(struct kgdb_io *local_kgdb_io_ops);
319311
extern struct kgdb_io *dbg_io_ops;

0 commit comments

Comments
 (0)