1<html><head><meta http-equiv="Content-Type" content="text/html; charset=ANSI_X3.4-1968"><title>Chapter 4. Abstraction layers</title><meta name="generator" content="DocBook XSL Stylesheets V1.78.1"><link rel="home" href="index.html" title="Linux generic IRQ handling"><link rel="up" href="index.html" title="Linux generic IRQ handling"><link rel="prev" href="bugs.html" title="Chapter 3. Known Bugs And Assumptions"><link rel="next" href="Highlevel_Driver_API.html" title="High-level Driver API"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Chapter 4. Abstraction layers</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="bugs.html">Prev</a> </td><th width="60%" align="center"> </th><td width="20%" align="right"> <a accesskey="n" href="Highlevel_Driver_API.html">Next</a></td></tr></table><hr></div><div class="chapter"><div class="titlepage"><div><div><h1 class="title"><a name="Abstraction"></a>Chapter 4. Abstraction layers</h1></div></div></div><div class="toc"><p><b>Table of Contents</b></p><dl class="toc"><dt><span class="sect1"><a href="Abstraction.html#Interrupt_control_flow">Interrupt control flow</a></span></dt><dt><span class="sect1"><a href="Highlevel_Driver_API.html">High-level Driver API</a></span></dt><dt><span class="sect1"><a href="Highlevel_IRQ_flow_handlers.html">High-level IRQ flow handlers</a></span></dt><dd><dl><dt><span class="sect2"><a href="Highlevel_IRQ_flow_handlers.html#Default_flow_implementations">Default flow implementations</a></span></dt><dt><span class="sect2"><a href="Highlevel_IRQ_flow_handlers.html#Default_flow_handler_implementations">Default flow handler implementations</a></span></dt><dt><span class="sect2"><a href="Highlevel_IRQ_flow_handlers.html#Quirks_and_optimizations">Quirks and optimizations</a></span></dt><dt><span class="sect2"><a href="Highlevel_IRQ_flow_handlers.html#Delayed_interrupt_disable">Delayed interrupt disable</a></span></dt></dl></dd><dt><span class="sect1"><a href="Chiplevel_hardware_encapsulation.html">Chip-level hardware encapsulation</a></span></dt></dl></div><p> 2 There are three main levels of abstraction in the interrupt code: 3 </p><div class="orderedlist"><ol class="orderedlist" type="1"><li class="listitem"><p>High-level driver API</p></li><li class="listitem"><p>High-level IRQ flow handlers</p></li><li class="listitem"><p>Chip-level hardware encapsulation</p></li></ol></div><p> 4 </p><div class="sect1"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="Interrupt_control_flow"></a>Interrupt control flow</h2></div></div></div><p> 5 Each interrupt is described by an interrupt descriptor structure 6 irq_desc. The interrupt is referenced by an 'unsigned int' numeric 7 value which selects the corresponding interrupt description structure 8 in the descriptor structures array. 9 The descriptor structure contains status information and pointers 10 to the interrupt flow method and the interrupt chip structure 11 which are assigned to this interrupt. 12 </p><p> 13 Whenever an interrupt triggers, the low-level architecture code calls 14 into the generic interrupt code by calling desc->handle_irq(). 15 This high-level IRQ handling function only uses desc->irq_data.chip 16 primitives referenced by the assigned chip descriptor structure. 17 </p></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="bugs.html">Prev</a> </td><td width="20%" align="center"> </td><td width="40%" align="right"> <a accesskey="n" href="Highlevel_Driver_API.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Chapter 3. Known Bugs And Assumptions </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> High-level Driver API</td></tr></table></div></body></html> 18