Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Typedefs | Enumerations
irq.h File Reference
#include <linux/smp.h>
#include <linux/linkage.h>
#include <linux/cache.h>
#include <linux/spinlock.h>
#include <linux/cpumask.h>
#include <linux/gfp.h>
#include <linux/irqreturn.h>
#include <linux/irqnr.h>
#include <linux/errno.h>
#include <linux/topology.h>
#include <linux/wait.h>
#include <asm/irq.h>
#include <asm/ptrace.h>
#include <asm/irq_regs.h>
#include <linux/irqdesc.h>
#include <asm/hw_irq.h>

Go to the source code of this file.

Data Structures

struct  irq_data
 
struct  irq_chip
 

Macros

#define IRQF_MODIFY_MASK
 
#define IRQ_NO_BALANCING_MASK   (IRQ_PER_CPU | IRQ_NO_BALANCING)
 

Typedefs

typedef void(* irq_flow_handler_t )(unsigned int irq, struct irq_desc *desc)
 
typedef void(* irq_preflow_handler_t )(struct irq_data *data)
 

Enumerations

enum  {
  IRQ_TYPE_NONE = 0x00000000, IRQ_TYPE_EDGE_RISING = 0x00000001, IRQ_TYPE_EDGE_FALLING = 0x00000002, IRQ_TYPE_EDGE_BOTH = (IRQ_TYPE_EDGE_FALLING | IRQ_TYPE_EDGE_RISING),
  IRQ_TYPE_LEVEL_HIGH = 0x00000004, IRQ_TYPE_LEVEL_LOW = 0x00000008, IRQ_TYPE_LEVEL_MASK = (IRQ_TYPE_LEVEL_LOW | IRQ_TYPE_LEVEL_HIGH), IRQ_TYPE_SENSE_MASK = 0x0000000f,
  IRQ_TYPE_DEFAULT = IRQ_TYPE_SENSE_MASK, IRQ_TYPE_PROBE = 0x00000010, IRQ_LEVEL = (1 << 8), IRQ_PER_CPU = (1 << 9),
  IRQ_NOPROBE = (1 << 10), IRQ_NOREQUEST = (1 << 11), IRQ_NOAUTOEN = (1 << 12), IRQ_NO_BALANCING = (1 << 13),
  IRQ_MOVE_PCNTXT = (1 << 14), IRQ_NESTED_THREAD = (1 << 15), IRQ_NOTHREAD = (1 << 16), IRQ_PER_CPU_DEVID = (1 << 17)
}
 
enum  { IRQ_SET_MASK_OK = 0, IRQ_SET_MASK_OK_NOCOPY }
 
enum  {
  IRQD_TRIGGER_MASK = 0xf, IRQD_SETAFFINITY_PENDING = (1 << 8), IRQD_NO_BALANCING = (1 << 10), IRQD_PER_CPU = (1 << 11),
  IRQD_AFFINITY_SET = (1 << 12), IRQD_LEVEL = (1 << 13), IRQD_WAKEUP_STATE = (1 << 14), IRQD_MOVE_PCNTXT = (1 << 15),
  IRQD_IRQ_DISABLED = (1 << 16), IRQD_IRQ_MASKED = (1 << 17), IRQD_IRQ_INPROGRESS = (1 << 18)
}
 

: name for /proc/interrupts

struct irq_chip - hardware interrupt chip descriptor

: 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 to print special chip info in show_interrupts : chip specific flags

#define NR_IRQS_LEGACY   0
 
#define ARCH_IRQ_INIT_FLAGS   0
 
#define IRQ_DEFAULT_INIT_FLAGS   ARCH_IRQ_INIT_FLAGS
 
enum  {
  IRQCHIP_SET_TYPE_MASKED = (1 << 0), IRQCHIP_EOI_IF_HANDLED = (1 << 1), IRQCHIP_MASK_ON_SUSPEND = (1 << 2), IRQCHIP_ONOFFLINE_ENABLED = (1 << 3),
  IRQCHIP_SKIP_SET_WAKE = (1 << 4), IRQCHIP_ONESHOT_SAFE = (1 << 5)
}
 
int setup_irq (unsigned int irq, struct irqaction *new)
 
void remove_irq (unsigned int irq, struct irqaction *act)
 
int setup_percpu_irq (unsigned int irq, struct irqaction *new)
 
void remove_percpu_irq (unsigned int irq, struct irqaction *act)
 
void irq_cpu_online (void)
 
void irq_cpu_offline (void)
 
int __irq_set_affinity_locked (struct irq_data *data, const struct cpumask *cpumask)
 

Macro Definition Documentation

#define ARCH_IRQ_INIT_FLAGS   0

Definition at line 368 of file irq.h.

#define IRQ_DEFAULT_INIT_FLAGS   ARCH_IRQ_INIT_FLAGS

Definition at line 371 of file irq.h.

#define IRQ_NO_BALANCING_MASK   (IRQ_PER_CPU | IRQ_NO_BALANCING)

Definition at line 107 of file irq.h.

#define IRQF_MODIFY_MASK
Value:

Definition at line 102 of file irq.h.

#define NR_IRQS_LEGACY   0

Definition at line 364 of file irq.h.

Typedef Documentation

typedef void(* irq_flow_handler_t)(unsigned int irq, struct irq_desc *desc)

Definition at line 35 of file irq.h.

typedef void(* irq_preflow_handler_t)(struct irq_data *data)

Definition at line 37 of file irq.h.

Enumeration Type Documentation

anonymous enum
Enumerator:
IRQ_TYPE_NONE 
IRQ_TYPE_EDGE_RISING 
IRQ_TYPE_EDGE_FALLING 
IRQ_TYPE_EDGE_BOTH 
IRQ_TYPE_LEVEL_HIGH 
IRQ_TYPE_LEVEL_LOW 
IRQ_TYPE_LEVEL_MASK 
IRQ_TYPE_SENSE_MASK 
IRQ_TYPE_DEFAULT 
IRQ_TYPE_PROBE 
IRQ_LEVEL 
IRQ_PER_CPU 
IRQ_NOPROBE 
IRQ_NOREQUEST 
IRQ_NOAUTOEN 
IRQ_NO_BALANCING 
IRQ_MOVE_PCNTXT 
IRQ_NESTED_THREAD 
IRQ_NOTHREAD 
IRQ_PER_CPU_DEVID 

Definition at line 77 of file irq.h.

anonymous enum
Enumerator:
IRQ_SET_MASK_OK 
IRQ_SET_MASK_OK_NOCOPY 

Definition at line 115 of file irq.h.

anonymous enum
Enumerator:
IRQD_TRIGGER_MASK 
IRQD_SETAFFINITY_PENDING 
IRQD_NO_BALANCING 
IRQD_PER_CPU 
IRQD_AFFINITY_SET 
IRQD_LEVEL 
IRQD_WAKEUP_STATE 
IRQD_MOVE_PCNTXT 
IRQD_IRQ_DISABLED 
IRQD_IRQ_MASKED 
IRQD_IRQ_INPROGRESS 

Definition at line 173 of file irq.h.

anonymous enum
Enumerator:
IRQCHIP_SET_TYPE_MASKED 
IRQCHIP_EOI_IF_HANDLED 
IRQCHIP_MASK_ON_SUSPEND 
IRQCHIP_ONOFFLINE_ENABLED 
IRQCHIP_SKIP_SET_WAKE 
IRQCHIP_ONESHOT_SAFE 

Definition at line 346 of file irq.h.

Function Documentation

int __irq_set_affinity_locked ( struct irq_data data,
const struct cpumask cpumask 
)
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 remove_irq ( unsigned int  irq,
struct irqaction act 
)

remove_irq - free an interrupt : Interrupt line to free : irqaction for the interrupt

Used to remove interrupts statically setup by the early boot process.

Definition at line 1274 of file manage.c.

void remove_percpu_irq ( unsigned int  irq,
struct irqaction act 
)

remove_percpu_irq - free a per-cpu interrupt : Interrupt line to free : irqaction for the interrupt

Used to remove interrupts statically setup by the early boot process.

Definition at line 1554 of file manage.c.

int setup_irq ( unsigned int  irq,
struct irqaction act 
)

setup_irq - setup an interrupt : Interrupt line to setup : irqaction for the interrupt

Used to statically setup interrupts in the early boot process.

Definition at line 1170 of file manage.c.

int setup_percpu_irq ( unsigned int  irq,
struct irqaction act 
)

setup_percpu_irq - setup a per-cpu interrupt : Interrupt line to setup : irqaction for the interrupt

Used to statically setup per-cpu interrupts in the early boot process.

Definition at line 1593 of file manage.c.