mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 02:32:09 -04:00
genirq: Expose interrupt information through sysfs
Information about interrupts is exposed via /proc/interrupts, but the format of that file has changed over kernel versions and differs across architectures. It also has varying column numbers depending on hardware. That all makes it hard for tools to parse. To solve this, expose the information through sysfs so each irq attribute is in a separate file in a consistent, machine parsable way. This feature is only available when both CONFIG_SPARSE_IRQ and CONFIG_SYSFS are enabled. Examples: /sys/kernel/irq/18/actions: i801_smbus,ehci_hcd:usb1,uhci_hcd:usb7 /sys/kernel/irq/18/chip_name: IR-IO-APIC /sys/kernel/irq/18/hwirq: 18 /sys/kernel/irq/18/name: fasteoi /sys/kernel/irq/18/per_cpu_count: 0,0 /sys/kernel/irq/18/type: level /sys/kernel/irq/25/actions: ahci0 /sys/kernel/irq/25/chip_name: IR-PCI-MSI /sys/kernel/irq/25/hwirq: 512000 /sys/kernel/irq/25/name: edge /sys/kernel/irq/25/per_cpu_count: 29036,0 /sys/kernel/irq/25/type: edge [ tglx: Moved kobject_del() under sparse_irq_lock, massaged code comments and changelog ] Signed-off-by: Craig Gallek <[email protected]> Cc: David Decotigny <[email protected]> Link: http://lkml.kernel.org/r/[email protected] Signed-off-by: Thomas Gleixner <[email protected]>
This commit is contained in:
parent
00b992deaa
commit
ecb3f394c5
3 changed files with 247 additions and 2 deletions
53
Documentation/ABI/testing/sysfs-kernel-irq
Normal file
53
Documentation/ABI/testing/sysfs-kernel-irq
Normal file
|
|
@ -0,0 +1,53 @@
|
|||
What: /sys/kernel/irq
|
||||
Date: September 2016
|
||||
KernelVersion: 4.9
|
||||
Contact: Craig Gallek <[email protected]>
|
||||
Description: Directory containing information about the system's IRQs.
|
||||
Specifically, data from the associated struct irq_desc.
|
||||
The information here is similar to that in /proc/interrupts
|
||||
but in a more machine-friendly format. This directory contains
|
||||
one subdirectory for each Linux IRQ number.
|
||||
|
||||
What: /sys/kernel/irq/<irq>/actions
|
||||
Date: September 2016
|
||||
KernelVersion: 4.9
|
||||
Contact: Craig Gallek <[email protected]>
|
||||
Description: The IRQ action chain. A comma-separated list of zero or more
|
||||
device names associated with this interrupt.
|
||||
|
||||
What: /sys/kernel/irq/<irq>/chip_name
|
||||
Date: September 2016
|
||||
KernelVersion: 4.9
|
||||
Contact: Craig Gallek <[email protected]>
|
||||
Description: Human-readable chip name supplied by the associated device
|
||||
driver.
|
||||
|
||||
What: /sys/kernel/irq/<irq>/hwirq
|
||||
Date: September 2016
|
||||
KernelVersion: 4.9
|
||||
Contact: Craig Gallek <[email protected]>
|
||||
Description: When interrupt translation domains are used, this file contains
|
||||
the underlying hardware IRQ number used for this Linux IRQ.
|
||||
|
||||
What: /sys/kernel/irq/<irq>/name
|
||||
Date: September 2016
|
||||
KernelVersion: 4.9
|
||||
Contact: Craig Gallek <[email protected]>
|
||||
Description: Human-readable flow handler name as defined by the irq chip
|
||||
driver.
|
||||
|
||||
What: /sys/kernel/irq/<irq>/per_cpu_count
|
||||
Date: September 2016
|
||||
KernelVersion: 4.9
|
||||
Contact: Craig Gallek <[email protected]>
|
||||
Description: The number of times the interrupt has fired since boot. This
|
||||
is a comma-separated list of counters; one per CPU in CPU id
|
||||
order. NOTE: This file consistently shows counters for all
|
||||
CPU ids. This differs from the behavior of /proc/interrupts
|
||||
which only shows counters for online CPUs.
|
||||
|
||||
What: /sys/kernel/irq/<irq>/type
|
||||
Date: September 2016
|
||||
KernelVersion: 4.9
|
||||
Contact: Craig Gallek <[email protected]>
|
||||
Description: The type of the interrupt. Either the string 'level' or 'edge'.
|
||||
Loading…
Reference in a new issue