Chapter 4. Abstraction layers

Table of Contents

Interrupt control flow
High-level Driver API
High-level IRQ flow handlers
Default flow implementations
Default flow handler implementations
Quirks and optimizations
Delayed interrupt disable
Chip-level hardware encapsulation

There are three main levels of abstraction in the interrupt code:

  1. High-level driver API

  2. High-level IRQ flow handlers

  3. Chip-level hardware encapsulation

Interrupt control flow

Each interrupt is described by an interrupt descriptor structure irq_desc. The interrupt is referenced by an 'unsigned int' numeric value which selects the corresponding interrupt description structure in the descriptor structures array. The descriptor structure contains status information and pointers to the interrupt flow method and the interrupt chip structure which are assigned to this interrupt.

Whenever an interrupt triggers, the low-level architecture code calls into the generic interrupt code by calling desc->handle_irq(). This high-level IRQ handling function only uses desc->irq_data.chip primitives referenced by the assigned chip descriptor structure.