[PATCH v2 0/2] soc: fujitsu: Add A64FX diagnostic interrupt driver

From: Hitomi Hasegawa
Date: Fri Mar 04 2022 - 01:46:56 EST


The interrupt is set using pseudo-NMI if it is available. Arm has a
diagnostic interrupt feature called "Arm Generic Diagnostic Dump and
Reset device", but the A64FX does not support this feature and instead
has its own device definition.

This patch series includes ones created by Sumit.[1]

I tested on FX700:
$ echo 1 > /proc/sys/kernel/sysrq
$ echo HARDLOCKUP > /sys/kernel/debug/provoke-crash/DIRECT
[ 124.712351] lkdtm: Performing direct entry HARDLOCKUP
[ 147.232096] rcu: INFO: rcu_preempt detected stalls on CPUs/tasks:
:
:

Send the "chassis power diag" command from the management server
using ipmitool, the following message is shown:
[ 206.061770] sysrq: Trigger a crash
[ 206.061779] Kernel panic - not syncing: sysrq triggered crash
:
:

Changes in V2:
- Include Sumit's patch.
- The handler calls handle_sysrq() to use the sysrq feature to cause
a panic.
- request_nmi() and request_irq() now use the same handler, and
the function name of the handler has also changed.
- Use readl()/writel() instead of readl_relaxed()/writel_relaxed().

V1:
https://lore.kernel.org/linux-arm-kernel/20220218092010.1327309-1-hasegawa-hitomi@xxxxxxxxxxx/

[1] https://lore.kernel.org/all/20220228135408.1452882-1-sumit.garg@xxxxxxxxxx/

Sumit Garg (1):
tty/sysrq: Make sysrq handler NMI aware

Hitomi Hasegawa (1):
soc: fujitsu: Add A64FX diagnostic interrupt driver

MAINTAINERS | 5 +
drivers/soc/Kconfig | 1 +
drivers/soc/Makefile | 1 +
drivers/soc/fujitsu/Kconfig | 13 +++
drivers/soc/fujitsu/Makefile | 3 +
drivers/soc/fujitsu/a64fx-diag.c | 151 +++++++++++++++++++++++++++++++
drivers/tty/sysrq.c | 45 ++++++++-
include/linux/sysrq.h | 1 +
kernel/debug/debug_core.c | 1 +
9 files changed, 220 insertions(+), 1 deletion(-)
create mode 100644 drivers/soc/fujitsu/Kconfig
create mode 100644 drivers/soc/fujitsu/Makefile
create mode 100644 drivers/soc/fujitsu/a64fx-diag.c

--
2.27.0