Lines Matching +full:implementation +full:- +full:defined
7 :Copyright: |copy| 2005-2010: Thomas Gleixner
8 :Copyright: |copy| 2005-2006: Ingo Molnar
28 The original implementation of interrupt handling in Linux uses the
29 :c:func:`__do_IRQ` super-handler, which is able to deal with every type of
33 a quite universal set for the ARM interrupt handler implementation in
36 - Level type
38 - Edge type
40 - Simple type
42 During the implementation we identified another type:
44 - Fast EOI type
46 In the SMP world of the :c:func:`__do_IRQ` super-handler another type was
49 - Per CPU type
51 This split implementation of high-level IRQ handlers allows us to
56 The original general IRQ implementation used hw_interrupt_type
57 structures and their ``->ack``, ``->end`` [etc.] callbacks to differentiate
58 the flow control in the super-handler. This leads to a mix of flow logic
59 and low-level hardware logic, and it also leads to unnecessary code
61 ``ioapic_edge_irq`` IRQ-type which share many of the low-level details but
69 and only need to add the chip-level specific code. The separation is
71 IRQ flow itself but not in the chip details - and thus provides a more
74 Each interrupt descriptor is assigned its own high-level flow handler,
75 which is normally one of the generic implementations. (This high-level
76 flow handler implementation also makes it simple to provide
82 IRQ-flow implementation for 'level type' interrupts and add a
83 (sub)architecture specific 'edge type' implementation.
86 of existing implementations, the :c:func:`__do_IRQ` super-handler is still
102 1. High-level driver API
104 2. High-level IRQ flow handlers
106 3. Chip-level hardware encapsulation
109 ----------------------
118 Whenever an interrupt triggers, the low-level architecture code calls
119 into the generic interrupt code by calling :c:func:`desc->handle_irq`. This
120 high-level IRQ handling function only uses desc->irq_data.chip
123 High-level Driver API
124 ---------------------
126 The high-level Driver API consists of following functions:
128 - :c:func:`request_irq`
130 - :c:func:`free_irq`
132 - :c:func:`disable_irq`
134 - :c:func:`enable_irq`
136 - :c:func:`disable_irq_nosync` (SMP only)
138 - :c:func:`synchronize_irq` (SMP only)
140 - :c:func:`irq_set_irq_type`
142 - :c:func:`irq_set_irq_wake`
144 - :c:func:`irq_set_handler_data`
146 - :c:func:`irq_set_chip`
148 - :c:func:`irq_set_chip_data`
152 High-level IRQ flow handlers
153 ----------------------------
155 The generic layer provides a set of pre-defined irq-flow methods:
157 - :c:func:`handle_level_irq`
159 - :c:func:`handle_edge_irq`
161 - :c:func:`handle_fasteoi_irq`
163 - :c:func:`handle_simple_irq`
165 - :c:func:`handle_percpu_irq`
167 - :c:func:`handle_edge_eoi_irq`
169 - :c:func:`handle_bad_irq`
171 The interrupt flow handlers (either pre-defined or architecture
187 desc->irq_data.chip->irq_unmask(data);
193 desc->irq_data.chip->irq_mask(data);
198 chip->irq_ack(data);
203 if (chip->irq_mask_ack) {
204 chip->irq_mask_ack(data);
206 chip->irq_mask(data);
207 chip->irq_ack(data);
223 handle_level_irq provides a generic implementation for level-triggered
228 desc->irq_data.chip->irq_mask_ack();
229 handle_irq_event(desc->action);
230 desc->irq_data.chip->irq_unmask();
236 handle_fasteoi_irq provides a generic implementation for interrupts,
241 handle_irq_event(desc->action);
242 desc->irq_data.chip->irq_eoi();
248 handle_edge_irq provides a generic implementation for edge-triggered
253 if (desc->status & running) {
254 desc->irq_data.chip->irq_mask_ack();
255 desc->status |= pending | masked;
258 desc->irq_data.chip->irq_ack();
259 desc->status |= running;
261 if (desc->status & masked)
262 desc->irq_data.chip->irq_unmask();
263 desc->status &= ~pending;
264 handle_irq_event(desc->action);
266 desc->status &= ~running;
272 handle_simple_irq provides a generic implementation for simple
281 handle_irq_event(desc->action);
287 handle_percpu_irq provides a generic implementation for per CPU
295 if (desc->irq_data.chip->irq_ack)
296 desc->irq_data.chip->irq_ack();
297 handle_irq_event(desc->action);
298 if (desc->irq_data.chip->irq_eoi)
299 desc->irq_data.chip->irq_eoi();
319 which have no platform-specific IRQ handling quirks. If an architecture
321 overriding the high-level irq-flow handler.
327 King in the ARM interrupt implementation, does not mask an interrupt at
334 IRQ_PENDING bit is set. When the interrupt is re-enabled by
342 Chip-level hardware encapsulation
343 ---------------------------------
345 The chip-level hardware descriptor structure :c:type:`irq_chip` contains all
349 - ``irq_ack``
351 - ``irq_mask_ack`` - Optional, recommended for performance
353 - ``irq_mask``
355 - ``irq_unmask``
357 - ``irq_eoi`` - Optional, required for EOI flow handlers
359 - ``irq_retrigger`` - Optional
361 - ``irq_set_type`` - Optional
363 - ``irq_set_wake`` - Optional
367 handler(s) to use these basic units of low-level functionality.
372 The original implementation :c:func:`__do_IRQ` was an alternative entry point
384 chip primitives. The per-irq structure is protected via desc->lock, by
391 provides a configurable generic interrupt chip implementation.
396 .. kernel-doc:: kernel/irq/generic-chip.c
405 .. kernel-doc:: include/linux/irq.h
408 .. kernel-doc:: include/linux/interrupt.h
417 .. kernel-doc:: kernel/irq/manage.c
419 .. kernel-doc:: kernel/irq/chip.c
427 .. kernel-doc:: kernel/irq/irqdesc.c
429 .. kernel-doc:: kernel/irq/handle.c
431 .. kernel-doc:: kernel/irq/chip.c