Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Functions
chip.c File Reference
#include <linux/irq.h>
#include <linux/msi.h>
#include <linux/module.h>
#include <linux/interrupt.h>
#include <linux/kernel_stat.h>
#include <trace/events/irq.h>
#include "internals.h"

Go to the source code of this file.

Functions

int irq_set_chip (unsigned int irq, struct irq_chip *chip)
 
 EXPORT_SYMBOL (irq_set_chip)
 
int irq_set_irq_type (unsigned int irq, unsigned int type)
 
 EXPORT_SYMBOL (irq_set_irq_type)
 
int irq_set_handler_data (unsigned int irq, void *data)
 
 EXPORT_SYMBOL (irq_set_handler_data)
 
int irq_set_msi_desc (unsigned int irq, struct msi_desc *entry)
 
int irq_set_chip_data (unsigned int irq, void *data)
 
 EXPORT_SYMBOL (irq_set_chip_data)
 
struct irq_datairq_get_irq_data (unsigned int irq)
 
 EXPORT_SYMBOL_GPL (irq_get_irq_data)
 
int irq_startup (struct irq_desc *desc, bool resend)
 
void irq_shutdown (struct irq_desc *desc)
 
void irq_enable (struct irq_desc *desc)
 
void irq_disable (struct irq_desc *desc)
 
void irq_percpu_enable (struct irq_desc *desc, unsigned int cpu)
 
void irq_percpu_disable (struct irq_desc *desc, unsigned int cpu)
 
void mask_irq (struct irq_desc *desc)
 
void unmask_irq (struct irq_desc *desc)
 
void handle_nested_irq (unsigned int irq)
 
 EXPORT_SYMBOL_GPL (handle_nested_irq)
 
void handle_simple_irq (unsigned int irq, struct irq_desc *desc)
 
 EXPORT_SYMBOL_GPL (handle_simple_irq)
 
void handle_level_irq (unsigned int irq, struct irq_desc *desc)
 
 EXPORT_SYMBOL_GPL (handle_level_irq)
 
void handle_fasteoi_irq (unsigned int irq, struct irq_desc *desc)
 
void handle_edge_irq (unsigned int irq, struct irq_desc *desc)
 
 EXPORT_SYMBOL (handle_edge_irq)
 
void handle_percpu_irq (unsigned int irq, struct irq_desc *desc)
 
void handle_percpu_devid_irq (unsigned int irq, struct irq_desc *desc)
 
void __irq_set_handler (unsigned int irq, irq_flow_handler_t handle, int is_chained, const char *name)
 
 EXPORT_SYMBOL_GPL (__irq_set_handler)
 
void irq_set_chip_and_handler_name (unsigned int irq, struct irq_chip *chip, irq_flow_handler_t handle, const char *name)
 
 EXPORT_SYMBOL_GPL (irq_set_chip_and_handler_name)
 
void irq_modify_status (unsigned int irq, unsigned long clr, unsigned long set)
 
 EXPORT_SYMBOL_GPL (irq_modify_status)
 
void irq_cpu_online (void)
 
void irq_cpu_offline (void)
 

Function Documentation

void __irq_set_handler ( unsigned int  irq,
irq_flow_handler_t  handle,
int  is_chained,
const char name 
)

Definition at line 630 of file chip.c.

EXPORT_SYMBOL ( irq_set_chip  )
EXPORT_SYMBOL ( irq_set_irq_type  )
EXPORT_SYMBOL ( irq_set_handler_data  )
EXPORT_SYMBOL ( irq_set_chip_data  )
EXPORT_SYMBOL ( handle_edge_irq  )
EXPORT_SYMBOL_GPL ( irq_get_irq_data  )
EXPORT_SYMBOL_GPL ( handle_nested_irq  )
EXPORT_SYMBOL_GPL ( handle_simple_irq  )
EXPORT_SYMBOL_GPL ( handle_level_irq  )
EXPORT_SYMBOL_GPL ( __irq_set_handler  )
EXPORT_SYMBOL_GPL ( irq_set_chip_and_handler_name  )
EXPORT_SYMBOL_GPL ( irq_modify_status  )
void handle_edge_irq ( unsigned int  irq,
struct irq_desc desc 
)

handle_edge_irq - edge type IRQ handler : the interrupt number : the interrupt description structure for this irq

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.

Definition at line 479 of file chip.c.

void handle_fasteoi_irq ( unsigned int  irq,
struct irq_desc desc 
)

handle_fasteoi_irq - irq handler for transparent controllers : the interrupt number : the interrupt description structure for this irq

Only a single callback will be issued to the chip: an ->eoi() call when the interrupt has been serviced. This enables support for modern forms of interrupt handlers, which handle the flow details in hardware, transparently.

Definition at line 421 of file chip.c.

void handle_level_irq ( unsigned int  irq,
struct irq_desc desc 
)

handle_level_irq - Level type irq handler : the interrupt number : the interrupt description structure for this irq

Level type interrupts are active as long as the hardware line has the active level. This may require to mask the interrupt and unmask it after the associated handler has acknowledged the device, so the interrupt line is back to inactive.

Definition at line 370 of file chip.c.

void handle_nested_irq ( unsigned int  irq)

Definition at line 265 of file chip.c.

void handle_percpu_devid_irq ( unsigned int  irq,
struct irq_desc desc 
)

handle_percpu_devid_irq - Per CPU local irq handler with per cpu dev ids : the interrupt number : the interrupt description structure for this irq

Per CPU interrupts on SMP machines without locking requirements. Same as handle_percpu_irq() above but with the following extras:

action->percpu_dev_id is a pointer to percpu variables which contain the real device id for the cpu on which this handler is called

Definition at line 609 of file chip.c.

void handle_percpu_irq ( unsigned int  irq,
struct irq_desc desc 
)

handle_percpu_irq - Per CPU local irq handler : the interrupt number : the interrupt description structure for this irq

Per CPU interrupts on SMP machines without locking requirements

Definition at line 582 of file chip.c.

void handle_simple_irq ( unsigned int  irq,
struct irq_desc desc 
)

handle_simple_irq - Simple and software-decoded IRQs. : the interrupt number : the interrupt description structure for this irq

Simple interrupts are either sent from a demultiplexing interrupt handler or come from hardware, where no interrupt hardware control is necessary.

Note: The caller is expected to handle the ack, clear, mask and unmask issues if necessary.

Definition at line 318 of file chip.c.

void irq_cpu_offline ( void  )

irq_cpu_offline - Invoke all irq_cpu_offline functions.

Iterate through all irqs and invoke the chip.irq_cpu_offline() for each.

Definition at line 738 of file chip.c.

void irq_cpu_online ( void  )

irq_cpu_online - Invoke all irq_cpu_online functions.

Iterate through all irqs and invoke the chip.irq_cpu_online() for each.

Definition at line 708 of file chip.c.

void irq_disable ( struct irq_desc desc)

Definition at line 202 of file chip.c.

void irq_enable ( struct irq_desc desc)

Definition at line 192 of file chip.c.

struct irq_data* irq_get_irq_data ( unsigned int  irq)
read

Definition at line 133 of file chip.c.

void irq_modify_status ( unsigned int  irq,
unsigned long  clr,
unsigned long  set 
)

Definition at line 676 of file chip.c.

void irq_percpu_disable ( struct irq_desc desc,
unsigned int  cpu 
)

Definition at line 220 of file chip.c.

void irq_percpu_enable ( struct irq_desc desc,
unsigned int  cpu 
)

Definition at line 211 of file chip.c.

int irq_set_chip ( unsigned int  irq,
struct irq_chip chip 
)

irq_set_chip - set the irq chip for an irq : irq number : pointer to irq chip description structure

Definition at line 28 of file chip.c.

void irq_set_chip_and_handler_name ( unsigned int  irq,
struct irq_chip chip,
irq_flow_handler_t  handle,
const char name 
)

Definition at line 668 of file chip.c.

int irq_set_chip_data ( unsigned int  irq,
void data 
)

irq_set_chip_data - set irq chip data for an irq : Interrupt number : Pointer to chip specific data

Set the hardware irq chip data for an irq

Definition at line 120 of file chip.c.

int irq_set_handler_data ( unsigned int  irq,
void data 
)

irq_set_handler_data - set irq handler data for an irq : Interrupt number : Pointer to interrupt specific data

Set the hardware irq controller data for an irq

Definition at line 79 of file chip.c.

int irq_set_irq_type ( unsigned int  irq,
unsigned int  type 
)

irq_set_type - set the irq trigger type for an irq : irq number : IRQ_TYPE_{LEVEL,EDGE}_* value - see include/linux/irq.h

Definition at line 56 of file chip.c.

int irq_set_msi_desc ( unsigned int  irq,
struct msi_desc entry 
)

irq_set_msi_desc - set MSI descriptor data for an irq : Interrupt number : Pointer to MSI descriptor data

Set the MSI descriptor entry for an irq

Definition at line 99 of file chip.c.

void irq_shutdown ( struct irq_desc desc)

Definition at line 179 of file chip.c.

int irq_startup ( struct irq_desc desc,
bool  resend 
)

Definition at line 161 of file chip.c.

void mask_irq ( struct irq_desc desc)

Definition at line 241 of file chip.c.

void unmask_irq ( struct irq_desc desc)

Definition at line 249 of file chip.c.