linux_4.0/kernel/irq/proc.c
show_interrupts
/proc/interrupts列出当前所以系统注册的中断,记录中断号,中断发生次数,中断设备名称 // 仅适用于 arm32
如下图:从右至右:中断号 中断次数 中断设备名称
cat /proc/interrupts
读取到的内容从左到右,分别为:
1、逻辑中断号(软件中断号,linux分配的中断号),
2、中断在各CPU发生的次数,
3、中断所属设备类名称,
4、硬件中断号,
5、中断名称。
硬件中断号(GIC)0-15 SGI // arch/arm/kernel/smp.c ipi_types0: IPI0 // sgi是通过写入软件生成的中断寄存器(GICD_SGIR)来生成的。1: IPI1 // 每个处理器接口最多可生成16个SGI,即ID0-ID15。...// SGI具有边缘触发属性。https://blog.csdn.net/u011011827/article/details/1060105737: IPI7 // https://blog.csdn.net/u011011827/article/details/124474507
SGI8-15 can be reserved by secure firmware , thus may not be usable by the kernel
16-31 PPI
16: TODO
...25: PPI6
26: PPI5
27: PPI4
28: PPI0
29: Secure Physical Timer event PPI1
30: Non-secure Physical Timer event PPI2 重要
31: Legacy nIRQ signal PPI3
32-number+32 SPI
32: node_platform
...36: rtc-pl031
#catinterrupts
CPU0
16:31414 GIC 34 timer 这个不是 "Non-secure Physical Timer event"29:955 GIC 47 eth0
32:0 GIC 41 mmci-pl18x(cmd)33:0 GIC 42 mmci-pl18x(pio)34:8 GIC 44 kmi-pl050
35:100 GIC 45 kmi-pl050
36:13147 GIC 37 uart-pl011 // 硬件中断号为 GIC-3740:0 GIC 32 node_platform
42:0 GIC 36 rtc-pl031
IPI0:0 CPU wakeup interrupts // 从这一行开始就是核间中断
IPI1:0 Timer broadcast interrupts
IPI2:0 Rescheduling interrupts
IPI3:0 Function call interrupts
IPI4:0 Single function call interrupts
IPI5:0 CPU stop interrupts
IPI6:0 IRQ work interrupts
IPI7:0 completion interrupts
Err:0
wit@vexpress:/proc/irq/40 # ls -l -R
.:
total 0-r--r--r--1000 Jan 1515:51 affinity_hint
-r--r--r--1000 Jan 1515:51 node
dr-xr-xr-x 2000 Jan 1515:51 node_platform
-rw-r--r--1000 Jan 1515:51 smp_affinity
-rw-r--r--1000 Jan 1515:51 smp_affinity_list
-r--r--r--1000 Jan 1515:51 spurious
./node_platform:
total 0