Linux generic IRQ handling

Thomas Gleixner


Ingo Molnar


This documentation is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License version 2 as published by the Free Software Foundation.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA

For more details see the file COPYING in the source distribution of Linux.

Table of Contents

1. Introduction
2. Rationale
3. Known Bugs And Assumptions
4. Abstraction layers
Interrupt control flow
Highlevel Driver API
Highlevel IRQ flow handlers
Default flow implementations
Default flow handler implementations
Quirks and optimizations
Delayed interrupt disable
Chiplevel hardware encapsulation
5. __do_IRQ entry point
6. Locking on SMP
7. Structures
struct irq_chip — hardware interrupt chip descriptor
struct irq_desc — interrupt descriptor
8. Public Functions Provided
synchronize_irq — wait for pending IRQ handlers (on other CPUs)
disable_irq_nosync — disable an irq without waiting
disable_irq — disable an irq and wait for completion
enable_irq — enable handling of an irq
set_irq_wake — control irq power management wakeup
free_irq — free an interrupt
request_irq — allocate an interrupt line
set_irq_chip — set the irq chip for an irq
set_irq_type — set the irq type for an irq
set_irq_data — set irq type data for an irq
set_irq_chip_data — set irq chip data for an irq
9. Internal Functions Provided
handle_bad_irq — handle spurious and unhandled irqs
handle_IRQ_event — irq action chain handler
__do_IRQ — original all in one highlevel IRQ handler
dynamic_irq_init — initialize a dynamically allocated irq
dynamic_irq_cleanup — cleanup a dynamically allocated irq
set_irq_msi — set irq type data for an irq
handle_simple_irq — Simple and software-decoded IRQs.
handle_level_irq — Level type irq handler
handle_fasteoi_irq — irq handler for transparent controllers
handle_edge_irq — edge type IRQ handler
handle_percpu_irq — Per CPU local irq handler
10. Credits