@@ -26,7 +26,7 @@ Rationale
2626=========
2727
2828The original implementation of interrupt handling in Linux uses the
29- __do_IRQ() super-handler, which is able to deal with every type of
29+ :c:func: ` __do_IRQ ` super-handler, which is able to deal with every type of
3030interrupt logic.
3131
3232Originally, Russell King identified different types of handlers to build
@@ -43,7 +43,7 @@ During the implementation we identified another type:
4343
4444- Fast EOI type
4545
46- In the SMP world of the __do_IRQ() super-handler another type was
46+ In the SMP world of the :c:func: ` __do_IRQ ` super-handler another type was
4747identified:
4848
4949- Per CPU type
@@ -54,11 +54,11 @@ type. This reduces complexity in that particular code path and allows
5454the optimized handling of a given type.
5555
5656The original general IRQ implementation used hw_interrupt_type
57- structures and their ->ack(), ->end() [etc.] callbacks to differentiate
57+ structures and their `` ->ack ``, `` ->end `` [etc.] callbacks to differentiate
5858the flow control in the super-handler. This leads to a mix of flow logic
5959and low-level hardware logic, and it also leads to unnecessary code
60- duplication: for example in i386, there is an ioapic_level_irq and an
61- ioapic_edge_irq IRQ-type which share many of the low-level details but
60+ duplication: for example in i386, there is an `` ioapic_level_irq `` and an
61+ `` ioapic_edge_irq `` IRQ-type which share many of the low-level details but
6262have different flow handling.
6363
6464A more natural abstraction is the clean separation of the 'irq flow' and
@@ -83,7 +83,7 @@ IRQ-flow implementation for 'level type' interrupts and add a
8383(sub)architecture specific 'edge type' implementation.
8484
8585To make the transition to the new model easier and prevent the breakage
86- of existing implementations, the __do_IRQ() super-handler is still
86+ of existing implementations, the :c:func: ` __do_IRQ ` super-handler is still
8787available. This leads to a kind of duality for the time being. Over time
8888the new model should be used in more and more architectures, as it
8989enables smaller and cleaner IRQ subsystems. It's deprecated for three
@@ -116,7 +116,7 @@ status information and pointers to the interrupt flow method and the
116116interrupt chip structure which are assigned to this interrupt.
117117
118118Whenever an interrupt triggers, the low-level architecture code calls
119- into the generic interrupt code by calling desc->handle_irq() . This
119+ into the generic interrupt code by calling :c:func: ` desc->handle_irq ` . This
120120high-level IRQ handling function only uses desc->irq_data.chip
121121primitives referenced by the assigned chip descriptor structure.
122122
@@ -125,27 +125,27 @@ High-level Driver API
125125
126126The high-level Driver API consists of following functions:
127127
128- - request_irq()
128+ - :c:func: ` request_irq `
129129
130- - free_irq()
130+ - :c:func: ` free_irq `
131131
132- - disable_irq()
132+ - :c:func: ` disable_irq `
133133
134- - enable_irq()
134+ - :c:func: ` enable_irq `
135135
136- - disable_irq_nosync() (SMP only)
136+ - :c:func: ` disable_irq_nosync ` (SMP only)
137137
138- - synchronize_irq() (SMP only)
138+ - :c:func: ` synchronize_irq ` (SMP only)
139139
140- - irq_set_irq_type()
140+ - :c:func: ` irq_set_irq_type `
141141
142- - irq_set_irq_wake()
142+ - :c:func: ` irq_set_irq_wake `
143143
144- - irq_set_handler_data()
144+ - :c:func: ` irq_set_handler_data `
145145
146- - irq_set_chip()
146+ - :c:func: ` irq_set_chip `
147147
148- - irq_set_chip_data()
148+ - :c:func: ` irq_set_chip_data `
149149
150150See the autogenerated function documentation for details.
151151
@@ -154,19 +154,19 @@ High-level IRQ flow handlers
154154
155155The generic layer provides a set of pre-defined irq-flow methods:
156156
157- - handle_level_irq
157+ - :c:func: ` handle_level_irq `
158158
159- - handle_edge_irq
159+ - :c:func: ` handle_edge_irq `
160160
161- - handle_fasteoi_irq
161+ - :c:func: ` handle_fasteoi_irq `
162162
163- - handle_simple_irq
163+ - :c:func: ` handle_simple_irq `
164164
165- - handle_percpu_irq
165+ - :c:func: ` handle_percpu_irq `
166166
167- - handle_edge_eoi_irq
167+ - :c:func: ` handle_edge_eoi_irq `
168168
169- - handle_bad_irq
169+ - :c:func: ` handle_bad_irq `
170170
171171The interrupt flow handlers (either pre-defined or architecture
172172specific) are assigned to specific interrupts by the architecture either
@@ -225,9 +225,9 @@ interrupts.
225225
226226The following control flow is implemented (simplified excerpt)::
227227
228- desc->irq_data.chip->irq_mask_ack() ;
228+ :c:func:` desc->irq_data.chip->irq_mask_ack` ;
229229 handle_irq_event(desc->action);
230- desc->irq_data.chip->irq_unmask() ;
230+ :c:func:` desc->irq_data.chip->irq_unmask` ;
231231
232232
233233Default Fast EOI IRQ flow handler
@@ -239,7 +239,7 @@ which only need an EOI at the end of the handler.
239239The following control flow is implemented (simplified excerpt)::
240240
241241 handle_irq_event(desc->action);
242- desc->irq_data.chip->irq_eoi() ;
242+ :c:func:` desc->irq_data.chip->irq_eoi` ;
243243
244244
245245Default Edge IRQ flow handler
@@ -251,15 +251,15 @@ interrupts.
251251The following control flow is implemented (simplified excerpt)::
252252
253253 if (desc->status & running) {
254- desc->irq_data.chip->irq_mask_ack() ;
254+ :c:func:` desc->irq_data.chip->irq_mask_ack` ;
255255 desc->status |= pending | masked;
256256 return;
257257 }
258- desc->irq_data.chip->irq_ack() ;
258+ :c:func:` desc->irq_data.chip->irq_ack` ;
259259 desc->status |= running;
260260 do {
261261 if (desc->status & masked)
262- desc->irq_data.chip->irq_unmask() ;
262+ :c:func:` desc->irq_data.chip->irq_unmask` ;
263263 desc->status &= ~pending;
264264 handle_irq_event(desc->action);
265265 } while (status & pending);
@@ -293,10 +293,10 @@ simplified version without locking.
293293The following control flow is implemented (simplified excerpt)::
294294
295295 if (desc->irq_data.chip->irq_ack)
296- desc->irq_data.chip->irq_ack() ;
296+ :c:func:` desc->irq_data.chip->irq_ack` ;
297297 handle_irq_event(desc->action);
298298 if (desc->irq_data.chip->irq_eoi)
299- desc->irq_data.chip->irq_eoi() ;
299+ :c:func:` desc->irq_data.chip->irq_eoi` ;
300300
301301
302302EOI Edge IRQ flow handler
@@ -325,14 +325,14 @@ Delayed interrupt disable
325325
326326This per interrupt selectable feature, which was introduced by Russell
327327King in the ARM interrupt implementation, does not mask an interrupt at
328- the hardware level when disable_irq() is called. The interrupt is kept
328+ the hardware level when :c:func: ` disable_irq ` is called. The interrupt is kept
329329enabled and is masked in the flow handler when an interrupt event
330330happens. This prevents losing edge interrupts on hardware which does not
331331store an edge interrupt event while the interrupt is disabled at the
332332hardware level. When an interrupt arrives while the IRQ_DISABLED flag
333333is set, then the interrupt is masked at the hardware level and the
334334IRQ_PENDING bit is set. When the interrupt is re-enabled by
335- enable_irq() the pending bit is checked and if it is set, the interrupt
335+ :c:func: ` enable_irq ` the pending bit is checked and if it is set, the interrupt
336336is resent either via hardware or by a software resend mechanism. (It's
337337necessary to enable CONFIG_HARDIRQS_SW_RESEND when you want to use
338338the delayed interrupt disable feature and your hardware is not capable
@@ -342,25 +342,25 @@ configurable.
342342Chip-level hardware encapsulation
343343---------------------------------
344344
345- The chip-level hardware descriptor structure irq_chip contains all the
346- direct chip relevant functions, which can be utilized by the irq flow
345+ The chip-level hardware descriptor structure :c:type: ` irq_chip ` contains all
346+ the direct chip relevant functions, which can be utilized by the irq flow
347347implementations.
348348
349- - irq_ack()
349+ - `` irq_ack ``
350350
351- - irq_mask_ack() - Optional, recommended for performance
351+ - `` irq_mask_ack `` - Optional, recommended for performance
352352
353- - irq_mask()
353+ - `` irq_mask ``
354354
355- - irq_unmask()
355+ - `` irq_unmask ``
356356
357- - irq_eoi() - Optional, required for EOI flow handlers
357+ - `` irq_eoi `` - Optional, required for EOI flow handlers
358358
359- - irq_retrigger() - Optional
359+ - `` irq_retrigger `` - Optional
360360
361- - irq_set_type() - Optional
361+ - `` irq_set_type `` - Optional
362362
363- - irq_set_wake() - Optional
363+ - `` irq_set_wake `` - Optional
364364
365365These primitives are strictly intended to mean what they say: ack means
366366ACK, masking means masking of an IRQ line, etc. It is up to the flow
@@ -369,7 +369,7 @@ handler(s) to use these basic units of low-level functionality.
369369__do_IRQ entry point
370370====================
371371
372- The original implementation __do_IRQ() was an alternative entry point
372+ The original implementation :c:func: ` __do_IRQ ` was an alternative entry point
373373for all types of interrupts. It no longer exists.
374374
375375This handler turned out to be not suitable for all interrupt hardware
@@ -415,10 +415,8 @@ This chapter contains the autogenerated documentation of the kernel API
415415functions which are exported.
416416
417417.. kernel-doc :: kernel/irq/manage.c
418- :export:
419418
420419.. kernel-doc :: kernel/irq/chip.c
421- :export:
422420
423421Internal Functions Provided
424422===========================
@@ -427,13 +425,10 @@ This chapter contains the autogenerated documentation of the internal
427425functions.
428426
429427.. kernel-doc :: kernel/irq/irqdesc.c
430- :internal:
431428
432429.. kernel-doc :: kernel/irq/handle.c
433- :internal:
434430
435431.. kernel-doc :: kernel/irq/chip.c
436- :internal:
437432
438433Credits
439434=======
0 commit comments