ecb3f394c5
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 <kraig@google.com> Cc: David Decotigny <decot@google.com> Link: http://lkml.kernel.org/r/1473783291-122873-1-git-send-email-kraigatgoog@gmail.com Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
54 lines
1.9 KiB
Plaintext
54 lines
1.9 KiB
Plaintext
What: /sys/kernel/irq
|
|
Date: September 2016
|
|
KernelVersion: 4.9
|
|
Contact: Craig Gallek <kraig@google.com>
|
|
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 <kraig@google.com>
|
|
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 <kraig@google.com>
|
|
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 <kraig@google.com>
|
|
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 <kraig@google.com>
|
|
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 <kraig@google.com>
|
|
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 <kraig@google.com>
|
|
Description: The type of the interrupt. Either the string 'level' or 'edge'.
|