aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Documentation/DocBook/genericirq.tmpl64
1 files changed, 32 insertions, 32 deletions
diff --git a/Documentation/DocBook/genericirq.tmpl b/Documentation/DocBook/genericirq.tmpl
index d16d21b7a3b7..46347f603353 100644
--- a/Documentation/DocBook/genericirq.tmpl
+++ b/Documentation/DocBook/genericirq.tmpl
@@ -87,7 +87,7 @@
87 <chapter id="rationale"> 87 <chapter id="rationale">
88 <title>Rationale</title> 88 <title>Rationale</title>
89 <para> 89 <para>
90 The original implementation of interrupt handling in Linux is using 90 The original implementation of interrupt handling in Linux uses
91 the __do_IRQ() super-handler, which is able to deal with every 91 the __do_IRQ() super-handler, which is able to deal with every
92 type of interrupt logic. 92 type of interrupt logic.
93 </para> 93 </para>
@@ -111,19 +111,19 @@
111 </itemizedlist> 111 </itemizedlist>
112 </para> 112 </para>
113 <para> 113 <para>
114 This split implementation of highlevel IRQ handlers allows us to 114 This split implementation of high-level IRQ handlers allows us to
115 optimize the flow of the interrupt handling for each specific 115 optimize the flow of the interrupt handling for each specific
116 interrupt type. This reduces complexity in that particular codepath 116 interrupt type. This reduces complexity in that particular code path
117 and allows the optimized handling of a given type. 117 and allows the optimized handling of a given type.
118 </para> 118 </para>
119 <para> 119 <para>
120 The original general IRQ implementation used hw_interrupt_type 120 The original general IRQ implementation used hw_interrupt_type
121 structures and their ->ack(), ->end() [etc.] callbacks to 121 structures and their ->ack(), ->end() [etc.] callbacks to
122 differentiate the flow control in the super-handler. This leads to 122 differentiate the flow control in the super-handler. This leads to
123 a mix of flow logic and lowlevel hardware logic, and it also leads 123 a mix of flow logic and low-level hardware logic, and it also leads
124 to unnecessary code duplication: for example in i386, there is a 124 to unnecessary code duplication: for example in i386, there is an
125 ioapic_level_irq and a ioapic_edge_irq irq-type which share many 125 ioapic_level_irq and an ioapic_edge_irq IRQ-type which share many
126 of the lowlevel details but have different flow handling. 126 of the low-level details but have different flow handling.
127 </para> 127 </para>
128 <para> 128 <para>
129 A more natural abstraction is the clean separation of the 129 A more natural abstraction is the clean separation of the
@@ -132,23 +132,23 @@
132 <para> 132 <para>
133 Analysing a couple of architecture's IRQ subsystem implementations 133 Analysing a couple of architecture's IRQ subsystem implementations
134 reveals that most of them can use a generic set of 'irq flow' 134 reveals that most of them can use a generic set of 'irq flow'
135 methods and only need to add the chip level specific code. 135 methods and only need to add the chip-level specific code.
136 The separation is also valuable for (sub)architectures 136 The separation is also valuable for (sub)architectures
137 which need specific quirks in the irq flow itself but not in the 137 which need specific quirks in the IRQ flow itself but not in the
138 chip-details - and thus provides a more transparent IRQ subsystem 138 chip details - and thus provides a more transparent IRQ subsystem
139 design. 139 design.
140 </para> 140 </para>
141 <para> 141 <para>
142 Each interrupt descriptor is assigned its own highlevel flow 142 Each interrupt descriptor is assigned its own high-level flow
143 handler, which is normally one of the generic 143 handler, which is normally one of the generic
144 implementations. (This highlevel flow handler implementation also 144 implementations. (This high-level flow handler implementation also
145 makes it simple to provide demultiplexing handlers which can be 145 makes it simple to provide demultiplexing handlers which can be
146 found in embedded platforms on various architectures.) 146 found in embedded platforms on various architectures.)
147 </para> 147 </para>
148 <para> 148 <para>
149 The separation makes the generic interrupt handling layer more 149 The separation makes the generic interrupt handling layer more
150 flexible and extensible. For example, an (sub)architecture can 150 flexible and extensible. For example, an (sub)architecture can
151 use a generic irq-flow implementation for 'level type' interrupts 151 use a generic IRQ-flow implementation for 'level type' interrupts
152 and add a (sub)architecture specific 'edge type' implementation. 152 and add a (sub)architecture specific 'edge type' implementation.
153 </para> 153 </para>
154 <para> 154 <para>
@@ -172,9 +172,9 @@
172 <para> 172 <para>
173 There are three main levels of abstraction in the interrupt code: 173 There are three main levels of abstraction in the interrupt code:
174 <orderedlist> 174 <orderedlist>
175 <listitem><para>Highlevel driver API</para></listitem> 175 <listitem><para>High-level driver API</para></listitem>
176 <listitem><para>Highlevel IRQ flow handlers</para></listitem> 176 <listitem><para>High-level IRQ flow handlers</para></listitem>
177 <listitem><para>Chiplevel hardware encapsulation</para></listitem> 177 <listitem><para>Chip-level hardware encapsulation</para></listitem>
178 </orderedlist> 178 </orderedlist>
179 </para> 179 </para>
180 <sect1 id="Interrupt_control_flow"> 180 <sect1 id="Interrupt_control_flow">
@@ -189,16 +189,16 @@
189 which are assigned to this interrupt. 189 which are assigned to this interrupt.
190 </para> 190 </para>
191 <para> 191 <para>
192 Whenever an interrupt triggers, the lowlevel arch code calls into 192 Whenever an interrupt triggers, the low-level architecture code calls
193 the generic interrupt code by calling desc->handle_irq(). 193 into the generic interrupt code by calling desc->handle_irq().
194 This highlevel IRQ handling function only uses desc->irq_data.chip 194 This high-level IRQ handling function only uses desc->irq_data.chip
195 primitives referenced by the assigned chip descriptor structure. 195 primitives referenced by the assigned chip descriptor structure.
196 </para> 196 </para>
197 </sect1> 197 </sect1>
198 <sect1 id="Highlevel_Driver_API"> 198 <sect1 id="Highlevel_Driver_API">
199 <title>Highlevel Driver API</title> 199 <title>High-level Driver API</title>
200 <para> 200 <para>
201 The highlevel Driver API consists of following functions: 201 The high-level Driver API consists of following functions:
202 <itemizedlist> 202 <itemizedlist>
203 <listitem><para>request_irq()</para></listitem> 203 <listitem><para>request_irq()</para></listitem>
204 <listitem><para>free_irq()</para></listitem> 204 <listitem><para>free_irq()</para></listitem>
@@ -216,7 +216,7 @@
216 </para> 216 </para>
217 </sect1> 217 </sect1>
218 <sect1 id="Highlevel_IRQ_flow_handlers"> 218 <sect1 id="Highlevel_IRQ_flow_handlers">
219 <title>Highlevel IRQ flow handlers</title> 219 <title>High-level IRQ flow handlers</title>
220 <para> 220 <para>
221 The generic layer provides a set of pre-defined irq-flow methods: 221 The generic layer provides a set of pre-defined irq-flow methods:
222 <itemizedlist> 222 <itemizedlist>
@@ -228,7 +228,7 @@
228 <listitem><para>handle_edge_eoi_irq</para></listitem> 228 <listitem><para>handle_edge_eoi_irq</para></listitem>
229 <listitem><para>handle_bad_irq</para></listitem> 229 <listitem><para>handle_bad_irq</para></listitem>
230 </itemizedlist> 230 </itemizedlist>
231 The interrupt flow handlers (either predefined or architecture 231 The interrupt flow handlers (either pre-defined or architecture
232 specific) are assigned to specific interrupts by the architecture 232 specific) are assigned to specific interrupts by the architecture
233 either during bootup or during device initialization. 233 either during bootup or during device initialization.
234 </para> 234 </para>
@@ -297,7 +297,7 @@ desc->irq_data.chip->irq_unmask();
297 <para> 297 <para>
298 handle_fasteoi_irq provides a generic implementation 298 handle_fasteoi_irq provides a generic implementation
299 for interrupts, which only need an EOI at the end of 299 for interrupts, which only need an EOI at the end of
300 the handler 300 the handler.
301 </para> 301 </para>
302 <para> 302 <para>
303 The following control flow is implemented (simplified excerpt): 303 The following control flow is implemented (simplified excerpt):
@@ -394,7 +394,7 @@ if (desc->irq_data.chip->irq_eoi)
394 The generic functions are intended for 'clean' architectures and chips, 394 The generic functions are intended for 'clean' architectures and chips,
395 which have no platform-specific IRQ handling quirks. If an architecture 395 which have no platform-specific IRQ handling quirks. If an architecture
396 needs to implement quirks on the 'flow' level then it can do so by 396 needs to implement quirks on the 'flow' level then it can do so by
397 overriding the highlevel irq-flow handler. 397 overriding the high-level irq-flow handler.
398 </para> 398 </para>
399 </sect2> 399 </sect2>
400 <sect2 id="Delayed_interrupt_disable"> 400 <sect2 id="Delayed_interrupt_disable">
@@ -419,9 +419,9 @@ if (desc->irq_data.chip->irq_eoi)
419 </sect2> 419 </sect2>
420 </sect1> 420 </sect1>
421 <sect1 id="Chiplevel_hardware_encapsulation"> 421 <sect1 id="Chiplevel_hardware_encapsulation">
422 <title>Chiplevel hardware encapsulation</title> 422 <title>Chip-level hardware encapsulation</title>
423 <para> 423 <para>
424 The chip level hardware descriptor structure irq_chip 424 The chip-level hardware descriptor structure irq_chip
425 contains all the direct chip relevant functions, which 425 contains all the direct chip relevant functions, which
426 can be utilized by the irq flow implementations. 426 can be utilized by the irq flow implementations.
427 <itemizedlist> 427 <itemizedlist>
@@ -429,14 +429,14 @@ if (desc->irq_data.chip->irq_eoi)
429 <listitem><para>irq_mask_ack() - Optional, recommended for performance</para></listitem> 429 <listitem><para>irq_mask_ack() - Optional, recommended for performance</para></listitem>
430 <listitem><para>irq_mask()</para></listitem> 430 <listitem><para>irq_mask()</para></listitem>
431 <listitem><para>irq_unmask()</para></listitem> 431 <listitem><para>irq_unmask()</para></listitem>
432 <listitem><para>irq_eoi() - Optional, required for eoi flow handlers</para></listitem> 432 <listitem><para>irq_eoi() - Optional, required for EOI flow handlers</para></listitem>
433 <listitem><para>irq_retrigger() - Optional</para></listitem> 433 <listitem><para>irq_retrigger() - Optional</para></listitem>
434 <listitem><para>irq_set_type() - Optional</para></listitem> 434 <listitem><para>irq_set_type() - Optional</para></listitem>
435 <listitem><para>irq_set_wake() - Optional</para></listitem> 435 <listitem><para>irq_set_wake() - Optional</para></listitem>
436 </itemizedlist> 436 </itemizedlist>
437 These primitives are strictly intended to mean what they say: ack means 437 These primitives are strictly intended to mean what they say: ack means
438 ACK, masking means masking of an IRQ line, etc. It is up to the flow 438 ACK, masking means masking of an IRQ line, etc. It is up to the flow
439 handler(s) to use these basic units of lowlevel functionality. 439 handler(s) to use these basic units of low-level functionality.
440 </para> 440 </para>
441 </sect1> 441 </sect1>
442 </chapter> 442 </chapter>
@@ -445,7 +445,7 @@ if (desc->irq_data.chip->irq_eoi)
445 <title>__do_IRQ entry point</title> 445 <title>__do_IRQ entry point</title>
446 <para> 446 <para>
447 The original implementation __do_IRQ() was an alternative entry 447 The original implementation __do_IRQ() was an alternative entry
448 point for all types of interrupts. It not longer exists. 448 point for all types of interrupts. It no longer exists.
449 </para> 449 </para>
450 <para> 450 <para>
451 This handler turned out to be not suitable for all 451 This handler turned out to be not suitable for all
@@ -468,11 +468,11 @@ if (desc->irq_data.chip->irq_eoi)
468 <chapter id="genericchip"> 468 <chapter id="genericchip">
469 <title>Generic interrupt chip</title> 469 <title>Generic interrupt chip</title>
470 <para> 470 <para>
471 To avoid copies of identical implementations of irq chips the 471 To avoid copies of identical implementations of IRQ chips the
472 core provides a configurable generic interrupt chip 472 core provides a configurable generic interrupt chip
473 implementation. Developers should check carefuly whether the 473 implementation. Developers should check carefuly whether the
474 generic chip fits their needs before implementing the same 474 generic chip fits their needs before implementing the same
475 functionality slightly different themself. 475 functionality slightly differently themselves.
476 </para> 476 </para>
477!Ekernel/irq/generic-chip.c 477!Ekernel/irq/generic-chip.c
478 </chapter> 478 </chapter>