mbox series

[0/3] kdb: Delete never used KGDB NMI code

Message ID 20250129162700.848018-1-dianders@chromium.org
Headers show
Series kdb: Delete never used KGDB NMI code | expand

Message

Doug Anderson Jan. 29, 2025, 4:25 p.m. UTC
As pointed out in the review [1] of commit 39d0be87438a ("serial:
kgdb_nmi: Remove unused knock code"), it's not just the knock code
that's unused but a whole chunk of NMI-related code in KGDB.

Look back at the original series [2] and revert a few of the patches
that managed to land and had no other purpose. They've been in the
kernel for over 12 years and if nobody has used them during that time
then they won't get used.

I've validated things still compile just fine for me and I've tested
"allmodconfig" for a few different architectures. Hopefully I didn't
miss anything, but based on "grep" this is all just dead code.

I guess I'd expect this to land through Greg KH's tree, ideally Acked
by Daniel Thompson.

[1] https://lore.kernel.org/r/CAD=FV=VH5YWfTggGNt2KLoSPKqVTmWArEgccok3uFQ5BCA7cNw@mail.gmail.com
[2] https://lore.kernel.org/lkml/1348522080-32629-9-git-send-email-anton.vorontsov@linaro.org/


Douglas Anderson (3):
  Revert "tty/serial: Add kgdb_nmi driver"
  Revert "kdb: Implement disable_nmi command"
  Revert "kernel/debug: Mask KGDB NMI upon entry"

 drivers/tty/serial/Kconfig    |  19 ---
 drivers/tty/serial/Makefile   |   1 -
 drivers/tty/serial/kgdb_nmi.c | 280 ----------------------------------
 drivers/tty/serial/kgdboc.c   |   8 -
 include/linux/kgdb.h          |  11 --
 kernel/debug/debug_core.c     |  14 +-
 kernel/debug/kdb/kdb_main.c   |  37 -----
 7 files changed, 3 insertions(+), 367 deletions(-)
 delete mode 100644 drivers/tty/serial/kgdb_nmi.c

Comments

Andy Shevchenko Jan. 30, 2025, 8:27 a.m. UTC | #1
On Wed, Jan 29, 2025 at 08:25:50AM -0800, Douglas Anderson wrote:
> This reverts commit 0c57dfcc6c1d037243c2f8fbf62eab3633326ec0.
> 
> 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
> 39d0be87438a ("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.

Fine with me.
Acked-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>

> [1] https://lore.kernel.org/lkml/1348522080-32629-9-git-send-email-anton.vorontsov@linaro.org/

It might be possible to use Link tag here in a form

Link: URL [1]
Andy Shevchenko Jan. 30, 2025, 8:32 a.m. UTC | #2
On Thu, Jan 30, 2025 at 10:27:29AM +0200, Andy Shevchenko wrote:
> On Wed, Jan 29, 2025 at 08:25:50AM -0800, Douglas Anderson wrote:

...

> > [1] https://lore.kernel.org/lkml/1348522080-32629-9-git-send-email-anton.vorontsov@linaro.org/
> 
> It might be possible to use Link tag here in a form
> 
> Link: URL [1]

Hmm... I'm not sure what this Link is supposed to mean. You might be forgotten
to update an URL to point out to the cover letter? (This is the link to patch 9
in the series and looks a bit unrelated).
Andy Shevchenko Jan. 30, 2025, 4:31 p.m. UTC | #3
On Thu, Jan 30, 2025 at 10:32:33AM +0200, Andy Shevchenko wrote:
> On Thu, Jan 30, 2025 at 10:27:29AM +0200, Andy Shevchenko wrote:
> > On Wed, Jan 29, 2025 at 08:25:50AM -0800, Douglas Anderson wrote:

...

> > > [1] https://lore.kernel.org/lkml/1348522080-32629-9-git-send-email-anton.vorontsov@linaro.org/
> > 
> > It might be possible to use Link tag here in a form
> > 
> > Link: URL [1]
> 
> Hmm... I'm not sure what this Link is supposed to mean. You might be forgotten
> to update an URL to point out to the cover letter? (This is the link to patch 9
> in the series and looks a bit unrelated).

I reread and I think now understand what you meant. The are several patches
starting from this one that are not landed in the upstream.