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

Message ID 1592835984-28613-1-git-send-email-sumit.garg@linaro.org
Headers show
  • Enable support for kgdb NMI console feature
Related show


Sumit Garg June 22, 2020, 2:26 p.m.
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
- 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:
- 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(-)