Copyright © 2005-2010 Thomas Gleixner
Copyright © 2005-2006 Ingo Molnar
This documentation is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License version 2 as published by the Free Software Foundation.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
For more details see the file COPYING in the source distribution of Linux.
Table of Contents
The generic interrupt handling layer is designed to provide a complete abstraction of interrupt handling for device drivers. It is able to handle all the different types of interrupt controller hardware. Device drivers use generic API functions to request, enable, disable and free interrupts. The drivers do not have to know anything about interrupt hardware details, so they can be used on different platforms without code changes.
This documentation is provided to developers who want to implement an interrupt subsystem based for their architecture, with the help of the generic IRQ handling layer.
The original implementation of interrupt handling in Linux is using the __do_IRQ() super-handler, which is able to deal with every type of interrupt logic.
Originally, Russell King identified different types of handlers to build a quite universal set for the ARM interrupt handler implementation in Linux 2.5/2.6. He distinguished between:
Level type
Edge type
Simple type
During the implementation we identified another type:
Fast EOI type
In the SMP world of the __do_IRQ() super-handler another type was identified:
Per CPU type
This split implementation of highlevel IRQ handlers allows us to optimize the flow of the interrupt handling for each specific interrupt type. This reduces complexity in that particular codepath and allows the optimized handling of a given type.
The original general IRQ implementation used hw_interrupt_type structures and their ->ack(), ->end() [etc.] callbacks to differentiate the flow control in the super-handler. This leads to a mix of flow logic and lowlevel hardware logic, and it also leads to unnecessary code duplication: for example in i386, there is a ioapic_level_irq and a ioapic_edge_irq irq-type which share many of the lowlevel details but have different flow handling.
A more natural abstraction is the clean separation of the 'irq flow' and the 'chip details'.
Analysing a couple of architecture's IRQ subsystem implementations reveals that most of them can use a generic set of 'irq flow' methods and only need to add the chip level specific code. The separation is also valuable for (sub)architectures which need specific quirks in the irq flow itself but not in the chip-details - and thus provides a more transparent IRQ subsystem design.
Each interrupt descriptor is assigned its own highlevel flow handler, which is normally one of the generic implementations. (This highlevel flow handler implementation also makes it simple to provide demultiplexing handlers which can be found in embedded platforms on various architectures.)
The separation makes the generic interrupt handling layer more flexible and extensible. For example, an (sub)architecture can use a generic irq-flow implementation for 'level type' interrupts and add a (sub)architecture specific 'edge type' implementation.
To make the transition to the new model easier and prevent the breakage of existing implementations, the __do_IRQ() super-handler is still available. This leads to a kind of duality for the time being. Over time the new model should be used in more and more architectures, as it enables smaller and cleaner IRQ subsystems. It's deprecated for three years now and about to be removed.
Table of Contents
There are three main levels of abstraction in the interrupt code:
Highlevel driver API
Highlevel IRQ flow handlers
Chiplevel hardware encapsulation
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 decription 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 lowlevel arch code calls into the generic interrupt code by calling desc->handle_irq(). This highlevel IRQ handling function only uses desc->irq_data.chip primitives referenced by the assigned chip descriptor structure.
The highlevel Driver API consists of following functions:
request_irq()
free_irq()
disable_irq()
enable_irq()
disable_irq_nosync() (SMP only)
synchronize_irq() (SMP only)
irq_set_irq_type()
irq_set_irq_wake()
irq_set_handler_data()
irq_set_chip()
irq_set_chip_data()
See the autogenerated function documentation for details.
The generic layer provides a set of pre-defined irq-flow methods:
handle_level_irq
handle_edge_irq
handle_fasteoi_irq
handle_simple_irq
handle_percpu_irq
handle_edge_eoi_irq
handle_bad_irq
The interrupt flow handlers (either predefined or architecture specific) are assigned to specific interrupts by the architecture either during bootup or during device initialization.
The helper functions call the chip primitives and are used by the default flow implementations. The following helper functions are implemented (simplified excerpt):
default_enable(struct irq_data *data) { desc->irq_data.chip->irq_unmask(data); } default_disable(struct irq_data *data) { if (!delay_disable(data)) desc->irq_data.chip->irq_mask(data); } default_ack(struct irq_data *data) { chip->irq_ack(data); } default_mask_ack(struct irq_data *data) { if (chip->irq_mask_ack) { chip->irq_mask_ack(data); } else { chip->irq_mask(data); chip->irq_ack(data); } } noop(struct irq_data *data)) { }
handle_level_irq provides a generic implementation for level-triggered interrupts.
The following control flow is implemented (simplified excerpt):
desc->irq_data.chip->irq_mask_ack(); handle_irq_event(desc->action); desc->irq_data.chip->irq_unmask();
handle_fasteoi_irq provides a generic implementation for interrupts, which only need an EOI at the end of the handler
The following control flow is implemented (simplified excerpt):
handle_irq_event(desc->action); desc->irq_data.chip->irq_eoi();
handle_edge_irq provides a generic implementation for edge-triggered interrupts.
The following control flow is implemented (simplified excerpt):
if (desc->status & running) { desc->irq_data.chip->irq_mask_ack(); desc->status |= pending | masked; return; } desc->irq_data.chip->irq_ack(); desc->status |= running; do { if (desc->status & masked) desc->irq_data.chip->irq_unmask(); desc->status &= ~pending; handle_irq_event(desc->action); } while (status & pending); desc->status &= ~running;
handle_simple_irq provides a generic implementation for simple interrupts.
Note: The simple flow handler does not call any handler/chip primitives.
The following control flow is implemented (simplified excerpt):
handle_irq_event(desc->action);
handle_percpu_irq provides a generic implementation for per CPU interrupts.
Per CPU interrupts are only available on SMP and the handler provides a simplified version without locking.
The following control flow is implemented (simplified excerpt):
if (desc->irq_data.chip->irq_ack) desc->irq_data.chip->irq_ack(); handle_irq_event(desc->action); if (desc->irq_data.chip->irq_eoi) desc->irq_data.chip->irq_eoi();
handle_edge_eoi_irq provides an abnomination of the edge handler which is solely used to tame a badly wreckaged irq controller on powerpc/cell.
The generic functions are intended for 'clean' architectures and chips, which have no platform-specific IRQ handling quirks. If an architecture needs to implement quirks on the 'flow' level then it can do so by overriding the highlevel irq-flow handler.
This per interrupt selectable feature, which was introduced by Russell King in the ARM interrupt implementation, does not mask an interrupt at the hardware level when disable_irq() is called. The interrupt is kept enabled and is masked in the flow handler when an interrupt event happens. This prevents losing edge interrupts on hardware which does not store an edge interrupt event while the interrupt is disabled at the hardware level. When an interrupt arrives while the IRQ_DISABLED flag is set, then the interrupt is masked at the hardware level and the IRQ_PENDING bit is set. When the interrupt is re-enabled by enable_irq() the pending bit is checked and if it is set, the interrupt is resent either via hardware or by a software resend mechanism. (It's necessary to enable CONFIG_HARDIRQS_SW_RESEND when you want to use the delayed interrupt disable feature and your hardware is not capable of retriggering an interrupt.) The delayed interrupt disable is not configurable.
The chip level hardware descriptor structure irq_chip contains all the direct chip relevant functions, which can be utilized by the irq flow implementations.
irq_ack()
irq_mask_ack() - Optional, recommended for performance
irq_mask()
irq_unmask()
irq_eoi() - Optional, required for eoi flow handlers
irq_retrigger() - Optional
irq_set_type() - Optional
irq_set_wake() - Optional
These primitives are strictly intended to mean what they say: ack means ACK, masking means masking of an IRQ line, etc. It is up to the flow handler(s) to use these basic units of lowlevel functionality.
The original implementation __do_IRQ() was an alternative entry point for all types of interrupts. It not longer exists.
This handler turned out to be not suitable for all interrupt hardware and was therefore reimplemented with split functionality for edge/level/simple/percpu interrupts. This is not only a functional optimization. It also shortens code paths for interrupts.
The locking of chip registers is up to the architecture that defines the chip primitives. The per-irq structure is protected via desc->lock, by the generic layer.
Table of Contents
To avoid copies of identical implementations of irq chips the core provides a configurable generic interrupt chip implementation. Developers should check carefuly whether the generic chip fits their needs before implementing the same functionality slightly different themself.
irq_gc_mask_set_bit — Mask chip via setting bit in mask register
void fsfuncirq_gc_mask_set_bit ( | d) ; |
struct irq_data * d
;irq_gc_mask_clr_bit — Mask chip via clearing bit in mask register
void fsfuncirq_gc_mask_clr_bit ( | d) ; |
struct irq_data * d
;irq_gc_ack_set_bit — Ack pending interrupt via setting bit
void fsfuncirq_gc_ack_set_bit ( | d) ; |
struct irq_data * d
;irq_alloc_generic_chip — Allocate a generic chip and initialize it
struct irq_chip_generic * fsfuncirq_alloc_generic_chip ( | name, | |
num_ct, | ||
irq_base, | ||
reg_base, | ||
handler) ; |
const char * name
;int num_ct
;unsigned int irq_base
;void __iomem * reg_base
;irq_flow_handler_t handler
;irq_alloc_domain_generic_chips — Allocate generic chips for an irq domain
int fsfuncirq_alloc_domain_generic_chips ( | d, | |
irqs_per_chip, | ||
num_ct, | ||
name, | ||
handler, | ||
clr, | ||
set, | ||
gcflags) ; |
struct irq_domain * d
;int irqs_per_chip
;int num_ct
;const char * name
;irq_flow_handler_t handler
;unsigned int clr
;unsigned int set
;enum irq_gc_flags gcflags
;d
irq domain for which to allocate chips
irqs_per_chip
Number of interrupts each chip handles
num_ct
Number of irq_chip_type instances associated with this
name
Name of the irq chip
handler
Default flow handler associated with these chips
clr
IRQ_* bits to clear in the mapping function
set
IRQ_* bits to set in the mapping function
gcflags
Generic chip specific setup flags
irq_get_domain_generic_chip — Get a pointer to the generic chip of a hw_irq
struct irq_chip_generic * fsfuncirq_get_domain_generic_chip ( | d, | |
hw_irq) ; |
struct irq_domain * d
;unsigned int hw_irq
;irq_setup_generic_chip — Setup a range of interrupts with a generic chip
void fsfuncirq_setup_generic_chip ( | gc, | |
msk, | ||
flags, | ||
clr, | ||
set) ; |
struct irq_chip_generic * gc
;u32 msk
;enum irq_gc_flags flags
;unsigned int clr
;unsigned int set
;irq_setup_alt_chip — Switch to alternative chip
int fsfuncirq_setup_alt_chip ( | d, | |
type) ; |
struct irq_data * d
;unsigned int type
;irq_remove_generic_chip — Remove a chip
void fsfuncirq_remove_generic_chip ( | gc, | |
msk, | ||
clr, | ||
set) ; |
struct irq_chip_generic * gc
;u32 msk
;unsigned int clr
;unsigned int set
;Table of Contents
This chapter contains the autogenerated documentation of the structures which are used in the generic IRQ layer.
struct irq_data — per irq and irq chip data passed down to chip functions
struct irq_data { u32 mask; unsigned int irq; unsigned long hwirq; unsigned int node; unsigned int state_use_accessors; struct irq_chip * chip; struct irq_domain * domain; void * handler_data; void * chip_data; struct msi_desc * msi_desc; cpumask_var_t affinity; };
precomputed bitmask for accessing the chip registers
interrupt number
hardware interrupt number, local to the interrupt domain
node index useful for balancing
status information for irq chip functions. Use accessor functions to deal with it
low level interrupt hardware access
Interrupt translation domain; responsible for mapping between hwirq number and linux irq number.
per-IRQ data for the irq_chip methods
platform-specific per-chip private data for the chip methods, to allow shared chip implementations
MSI descriptor
IRQ affinity on SMP
struct irq_chip — hardware interrupt chip descriptor
struct irq_chip { const char * name; unsigned int (* irq_startup) (struct irq_data *data); void (* irq_shutdown) (struct irq_data *data); void (* irq_enable) (struct irq_data *data); void (* irq_disable) (struct irq_data *data); void (* irq_ack) (struct irq_data *data); void (* irq_mask) (struct irq_data *data); void (* irq_mask_ack) (struct irq_data *data); void (* irq_unmask) (struct irq_data *data); void (* irq_eoi) (struct irq_data *data); int (* irq_set_affinity) (struct irq_data *data, const struct cpumask *dest, bool force); int (* irq_retrigger) (struct irq_data *data); int (* irq_set_type) (struct irq_data *data, unsigned int flow_type); int (* irq_set_wake) (struct irq_data *data, unsigned int on); void (* irq_bus_lock) (struct irq_data *data); void (* irq_bus_sync_unlock) (struct irq_data *data); void (* irq_cpu_online) (struct irq_data *data); void (* irq_cpu_offline) (struct irq_data *data); void (* irq_suspend) (struct irq_data *data); void (* irq_resume) (struct irq_data *data); void (* irq_pm_shutdown) (struct irq_data *data); void (* irq_calc_mask) (struct irq_data *data); void (* irq_print_chip) (struct irq_data *data, struct seq_file *p); unsigned long flags; };
name for /proc/interrupts
start up the interrupt (defaults to ->enable if NULL)
shut down the interrupt (defaults to ->disable if NULL)
enable the interrupt (defaults to chip->unmask if NULL)
disable the interrupt
start of a new interrupt
mask an interrupt source
ack and mask an interrupt source
unmask an interrupt source
end of interrupt
set the CPU affinity on SMP machines
resend an IRQ to the CPU
set the flow type (IRQ_TYPE_LEVEL/etc.) of an IRQ
enable/disable power-management wake-on of an IRQ
function to lock access to slow bus (i2c) chips
function to sync and unlock slow bus (i2c) chips
configure an interrupt source for a secondary CPU
un-configure an interrupt source for a secondary CPU
function called from core code on suspend once per chip
function called from core code on resume once per chip
function called from core code on shutdown once per chip
Optional function to set irq_data.mask for special cases
optional to print special chip info in show_interrupts
chip specific flags
struct irq_chip_regs — register offsets for struct irq_gci
struct irq_chip_regs { unsigned long enable; unsigned long disable; unsigned long mask; unsigned long ack; unsigned long eoi; unsigned long type; unsigned long polarity; };
Enable register offset to reg_base
Disable register offset to reg_base
Mask register offset to reg_base
Ack register offset to reg_base
Eoi register offset to reg_base
Type configuration register offset to reg_base
Polarity configuration register offset to reg_base
struct irq_chip_type — Generic interrupt chip instance for a flow type
struct irq_chip_type { struct irq_chip chip; struct irq_chip_regs regs; irq_flow_handler_t handler; u32 type; u32 mask_cache_priv; u32 * mask_cache; };
struct irq_chip_generic — Generic irq chip data structure
struct irq_chip_generic { raw_spinlock_t lock; void __iomem * reg_base; unsigned int irq_base; unsigned int irq_cnt; u32 mask_cache; u32 type_cache; u32 polarity_cache; u32 wake_enabled; u32 wake_active; unsigned int num_ct; void * private; unsigned long installed; unsigned long unused; struct irq_domain * domain; struct list_head list; struct irq_chip_type chip_types[0]; };
Lock to protect register and cache data access
Register base address (virtual)
Interrupt base nr for this chip
Number of interrupts handled by this chip
Cached mask register shared between all chip types
Cached type register
Cached polarity register
Interrupt can wakeup from suspend
Interrupt is marked as an wakeup from suspend source
Number of available irq_chip_type instances (usually 1)
Private data for non generic chip callbacks
bitfield to denote installed interrupts
bitfield to denote unused interrupts
irq domain pointer
List head for keeping track of instances
Array of interrupt irq_chip_types
Note, that irq_chip_generic can have multiple irq_chip_type implementations which can be associated to a particular irq line of an irq_chip_generic instance. That allows to share and protect state in an irq_chip_generic instance when we need to implement different flow mechanisms (level/edge) for it.
enum irq_gc_flags — Initialization flags for generic irq chips
enum irq_gc_flags { IRQ_GC_INIT_MASK_CACHE, IRQ_GC_INIT_NESTED_LOCK, IRQ_GC_MASK_CACHE_PER_TYPE, IRQ_GC_NO_MASK };
Initialize the mask_cache by reading mask reg
Set the lock class of the irqs to nested for
irq chips which need to call irq_set_wake
on
the parent irq. Usually GPIO implementations
Mask cache is chip type private
Do not calculate irq_data->mask
struct irqaction — per interrupt action descriptor
struct irqaction { irq_handler_t handler; void * dev_id; void __percpu * percpu_dev_id; struct irqaction * next; irq_handler_t thread_fn; struct task_struct * thread; unsigned int irq; unsigned int flags; unsigned long thread_flags; unsigned long thread_mask; const char * name; struct proc_dir_entry * dir; };
interrupt handler function
cookie to identify the device
cookie to identify the device
pointer to the next irqaction for shared interrupts
interrupt handler function for threaded interrupts
thread pointer for threaded interrupts
interrupt number
flags (see IRQF_* above)
flags related to thread
bitmask for keeping track of thread
activity
name of the device
pointer to the proc/irq/NN/name entry
struct irq_affinity_notify — context for notification of IRQ affinity changes
struct irq_affinity_notify { unsigned int irq; struct kref kref; struct work_struct work; void (* notify) (struct irq_affinity_notify *, const cpumask_t *mask); void (* release) (struct kref *ref); };
Interrupt to which notification applies
Reference count, for internal use
Work item, for internal use
Function to be called on change. This will be called in process context.
Function to be called on release. This will be called in process context. Once registered, the structure must only be freed when this function is called or later.
Table of Contents
This chapter contains the autogenerated documentation of the kernel API functions which are exported.
synchronize_irq — wait for pending IRQ handlers (on other CPUs)
void fsfuncsynchronize_irq ( | irq) ; |
unsigned int irq
;irq_set_affinity_notifier — control notification of IRQ affinity changes
int fsfuncirq_set_affinity_notifier ( | irq, | |
notify) ; |
unsigned int irq
;struct irq_affinity_notify * notify
;disable_irq_nosync — disable an irq without waiting
void fsfuncdisable_irq_nosync ( | irq) ; |
unsigned int irq
;disable_irq — disable an irq and wait for completion
void fsfuncdisable_irq ( | irq) ; |
unsigned int irq
;Disable the selected interrupt line. Enables and Disables are nested. This function waits for any pending IRQ handlers for this interrupt to complete before returning. If you use this function while holding a resource the IRQ handler may need you will deadlock.
This function may be called - with care - from IRQ context.
irq_set_irq_wake — control irq power management wakeup
int fsfuncirq_set_irq_wake ( | irq, | |
on) ; |
unsigned int irq
;unsigned int on
;setup_irq — setup an interrupt
int fsfuncsetup_irq ( | irq, | |
act) ; |
unsigned int irq
;struct irqaction * act
;remove_irq — free an interrupt
void fsfuncremove_irq ( | irq, | |
act) ; |
unsigned int irq
;struct irqaction * act
;free_irq — free an interrupt allocated with request_irq
void fsfuncfree_irq ( | irq, | |
dev_id) ; |
unsigned int irq
;void * dev_id
;Remove an interrupt handler. The handler is removed and if the interrupt line is no longer in use by any driver it is disabled. On a shared IRQ the caller must ensure the interrupt is disabled on the card it drives before calling this function. The function does not return until any executing interrupts for this IRQ have completed.
This function must not be called from interrupt context.
request_threaded_irq — allocate an interrupt line
int fsfuncrequest_threaded_irq ( | irq, | |
handler, | ||
thread_fn, | ||
irqflags, | ||
devname, | ||
dev_id) ; |
unsigned int irq
;irq_handler_t handler
;irq_handler_t thread_fn
;unsigned long irqflags
;const char * devname
;void * dev_id
;irq
Interrupt line to allocate
handler
Function to be called when the IRQ occurs. Primary handler for threaded interrupts If NULL and thread_fn != NULL the default primary handler is installed
thread_fn
Function called from the irq handler thread If NULL, no irq thread is created
irqflags
Interrupt type flags
devname
An ascii name for the claiming device
dev_id
A cookie passed back to the handler function
This call allocates interrupt resources and enables the interrupt line and IRQ handling. From the point this call is made your handler function may be invoked. Since your handler function must clear any interrupt the board raises, you must take care both to initialise your hardware and to set up the interrupt handler in the right order.
If you want to set up a threaded irq handler for your device
then you need to supply handler
and thread_fn
. handler
is
still called in hard interrupt context and has to check
whether the interrupt originates from the device. If yes it
needs to disable the interrupt on the device and return
IRQ_WAKE_THREAD which will wake up the handler thread and run
thread_fn
. This split handler design is necessary to support
shared interrupts.
Dev_id must be globally unique. Normally the address of the device data structure is used as the cookie. Since the handler receives this value it makes sense to use it.
If your interrupt is shared you must pass a non NULL dev_id as this is required when freeing the interrupt.
request_any_context_irq — allocate an interrupt line
int fsfuncrequest_any_context_irq ( | irq, | |
handler, | ||
flags, | ||
name, | ||
dev_id) ; |
unsigned int irq
;irq_handler_t handler
;unsigned long flags
;const char * name
;void * dev_id
;irq_set_chip — set the irq chip for an irq
int fsfuncirq_set_chip ( | irq, | |
chip) ; |
unsigned int irq
;struct irq_chip * chip
;irq_set_irq_type — set the irq trigger type for an irq
int fsfuncirq_set_irq_type ( | irq, | |
type) ; |
unsigned int irq
;unsigned int type
;irq_set_handler_data — set irq handler data for an irq
int fsfuncirq_set_handler_data ( | irq, | |
data) ; |
unsigned int irq
;void * data
;irq_set_chip_data — set irq chip data for an irq
int fsfuncirq_set_chip_data ( | irq, | |
data) ; |
unsigned int irq
;void * data
;handle_simple_irq — Simple and software-decoded IRQs.
void fsfunchandle_simple_irq ( | irq, | |
desc) ; |
unsigned int irq
;struct irq_desc * desc
;handle_level_irq — Level type irq handler
void fsfunchandle_level_irq ( | irq, | |
desc) ; |
unsigned int irq
;struct irq_desc * desc
;handle_edge_irq — edge type IRQ handler
void fsfunchandle_edge_irq ( | irq, | |
desc) ; |
unsigned int irq
;struct irq_desc * desc
;Interrupt occures on the falling and/or rising edge of a hardware signal. The occurrence is latched into the irq controller hardware and must be acked in order to be reenabled. After the ack another interrupt can happen on the same source even before the first one is handled by the associated event handler. If this happens it might be necessary to disable (mask) the interrupt depending on the controller hardware. This requires to reenable the interrupt inside of the loop which handles the interrupts which have arrived while the handler was running. If all pending interrupts are handled, the loop is left.
Table of Contents
This chapter contains the autogenerated documentation of the internal functions.
irq_reserve_irqs — mark irqs allocated
int fsfuncirq_reserve_irqs ( | from, | |
cnt) ; |
unsigned int from
;unsigned int cnt
;irq_get_next_irq — get next allocated irq number
unsigned int fsfuncirq_get_next_irq ( | offset) ; |
unsigned int offset
;dynamic_irq_cleanup — cleanup a dynamically allocated irq
void fsfuncdynamic_irq_cleanup ( | irq) ; |
unsigned int irq
;handle_bad_irq — handle spurious and unhandled irqs
void fsfunchandle_bad_irq ( | irq, | |
desc) ; |
unsigned int irq
;struct irq_desc * desc
;irq_set_msi_desc_off — set MSI descriptor data for an irq at offset
int fsfuncirq_set_msi_desc_off ( | irq_base, | |
irq_offset, | ||
entry) ; |
unsigned int irq_base
;unsigned int irq_offset
;struct msi_desc * entry
;irq_set_msi_desc — set MSI descriptor data for an irq
int fsfuncirq_set_msi_desc ( | irq, | |
entry) ; |
unsigned int irq
;struct msi_desc * entry
;irq_disable — Mark interupt disabled
void fsfuncirq_disable ( | desc) ; |
struct irq_desc * desc
;If the chip does not implement the irq_disable callback, we use a lazy disable approach. That means we mark the interrupt disabled, but leave the hardware unmasked. That's an optimization because we avoid the hardware access for the common case where no interrupt happens after we marked it disabled. If an interrupt happens, then the interrupt flow handler masks the line at the hardware level and marks it pending.
handle_fasteoi_irq — irq handler for transparent controllers
void fsfunchandle_fasteoi_irq ( | irq, | |
desc) ; |
unsigned int irq
;struct irq_desc * desc
;handle_edge_eoi_irq — edge eoi type IRQ handler
void fsfunchandle_edge_eoi_irq ( | irq, | |
desc) ; |
unsigned int irq
;struct irq_desc * desc
;handle_percpu_irq — Per CPU local irq handler
void fsfunchandle_percpu_irq ( | irq, | |
desc) ; |
unsigned int irq
;struct irq_desc * desc
;handle_percpu_devid_irq — Per CPU local irq handler with per cpu dev ids
void fsfunchandle_percpu_devid_irq ( | irq, | |
desc) ; |
unsigned int irq
;struct irq_desc * desc
;The following people have contributed to this document:
Thomas Gleixner<tglx@linutronix.de>
Ingo Molnar<mingo@elte.hu>