scripts/gdb: print interrupts
authorFlorian Fainelli <f.fainelli@gmail.com>
Thu, 6 Apr 2023 22:04:51 +0000 (15:04 -0700)
committerAndrew Morton <akpm@linux-foundation.org>
Tue, 18 Apr 2023 23:39:33 +0000 (16:39 -0700)
commitb0969d7687a7aaa82dcf2d1f245ef699387886da
tree23ed727ef46acd29a59e36a92b5ecabcc5051bd7
parent8af055ae25bff48f57227f5e3d48a4306f3dd1c4
scripts/gdb: print interrupts

This GDB script prints the interrupts in the system in the same way that
/proc/interrupts does.  This does include the architecture specific part
done by arch_show_interrupts() for x86, ARM, ARM64 and MIPS.  Example
output from an ARM64 system:

(gdb) lx-interruptlist
           CPU0       CPU1       CPU2       CPU3
 10:       3167      1225      1276      2629     GICv2   30 Level     arch_timer
 13:          0         0         0         0     GICv2   36 Level     arm-pmu
 14:          0         0         0         0     GICv2   37 Level     arm-pmu
 15:          0         0         0         0     GICv2   38 Level     arm-pmu
 16:          0         0         0         0     GICv2   39 Level     arm-pmu
 28:          0         0         0         0  interrupt-controller@8410640    5 Edge      brcmstb-gpio-wake
 30:        125         0         0         0     GICv2  128 Level     ttyS0
 31:          0         0         0         0  interrupt-controller@8416000    0 Level     mspi_done
 32:          0         0         0         0  interrupt-controller@8410640    3 Edge      brcmstb-waketimer
 33:          0         0         0         0  interrupt-controller@8418580    8 Edge      brcmstb-waketimer-rtc
 34:        872         0         0         0     GICv2  230 Level     brcm_scmi@0
 35:          0         0         0         0  interrupt-controller@8410640   10 Edge      8d0f200.usb-phy
 37:          0         0         0         0     GICv2   97 Level     PCIe PME
 42:          0         0         0         0     GICv2  145 Level     xhci-hcd:usb1
 43:         94         0         0         0     GICv2   71 Level     mmc1
 44:          0         0         0         0     GICv2   70 Level     mmc0
IPI0:        23       666       154        98      Rescheduling interrupts
IPI1:       247      1053      1701       634      Function call interrupts
IPI2:         0         0         0         0      CPU stop interrupts
IPI3:         0         0         0         0      CPU stop (for crash dump) interrupts
IPI4:         0         0         0         0      Timer broadcast interrupts
IPI5:         7         9         5         0      IRQ work interrupts
IPI6:         0         0         0         0      CPU wake-up interrupts
ERR:          0

Link: https://lkml.kernel.org/r/20230406220451.1583239-1-f.fainelli@gmail.com
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
Cc: Jan Kiszka <jan.kiszka@siemens.com>
Cc: Kieran Bingham <kbingham@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
scripts/gdb/linux/constants.py.in
scripts/gdb/linux/interrupts.py [new file with mode: 0644]
scripts/gdb/vmlinux-gdb.py