Skip to content

Enable support for kgdb NMI console feature

Sumit Garg linux-serial lkml 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest7 patches 11 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/7serial: kgdb_nmi: Allow NMI console to replace kgdb IO consoledrivers/tty/serial/kgdb_nmi.c+18 -00 replies
2/7tty: serial: Add poll_get_irq() to the polling interfacedrivers/tty/serial/serial_core.c include/linux/serial_core.h include/linux/tty_driver.h+20 -03 replies
3/7kgdb: Add request_nmi() to the io ops table for kgdbocdrivers/tty/serial/kgdboc.c include/linux/kgdb.h+42 -06 replies
4/7serial: kgdb_nmi: Add support for interrupt based fallbackdrivers/tty/serial/kgdb_nmi.c+40 -72 replies
5/7serial: 8250: Implement poll_get_irq() interfacedrivers/tty/serial/8250/8250_port.c+16 -00 replies
6/7serial: amba-pl011: Implement poll_get_irq() interfacedrivers/tty/serial/amba-pl011.c+12 -00 replies
7/7serial: kgdb_nmi: Replace hrtimer with irq_work pingdrivers/tty/serial/kgdb_nmi.c+10 -250 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 0/7] Enable support for kgdb NMI console feature

This work is derived from Daniel's prior work here [1]. It has been rebased (tag: kgdb-5.8-rc1 + console hardening patch-set[2]), reworked to use serial RX interrupt as NMI (pseudo NMI on aarch64) in order to drop into debugger and tested on Developerbox (using amba-pl011).

- Patch #1 is more of a fix required for NMI console to replace kgdb IO console.
- Patches #2 to #6 adds an architecture agnostic fallback mechanism to enable kgdb NMI console using serial RX interrupt as NMI.
- Patch #7 is an optimization patch that gets rid of inefficient timer based tasklet and rather uses irq_work.

Usage of kgdb NMI console:
- Enable "CONFIG_SERIAL_KGDB_NMI".
- Kernel cmdline modification for Developerbox:
console=ttyNMI0 kgdboc=ttyAMA0

[1] https://git.linaro.org/people/daniel.thompson/linux.git/log/?h=kgdb/polled_request_irq
[2] https://lkml.org/lkml/2020/6/4/294

Daniel Thompson (5):
tty: serial: Add poll_get_irq() to the polling interface
kgdb: Add request_nmi() to the io ops table for kgdboc
serial: kgdb_nmi: Add support for interrupt based fallback
serial: 8250: Implement poll_get_irq() interface
serial: kgdb_nmi: Replace hrtimer with irq_work ping

Sumit Garg (2):
serial: kgdb_nmi: Allow NMI console to replace kgdb IO console
serial: amba-pl011: Implement poll_get_irq() interface

 drivers/tty/serial/8250/8250_port.c |  16 ++++++
 drivers/tty/serial/amba-pl011.c     |  12 +++++
 drivers/tty/serial/kgdb_nmi.c       | 100 ++++++++++++++++++++++++------------
 drivers/tty/serial/kgdboc.c         |  35 +++++++++++++
 drivers/tty/serial/serial_core.c    |  18 +++++++
 include/linux/kgdb.h                |   7 +++
 include/linux/serial_core.h         |   1 +
 include/linux/tty_driver.h          |   1 +
 8 files changed, 158 insertions(+), 32 deletions(-)
Signature · 1 line
2.7.4