Linux Kernel
3.7.1
|
#include <linux/kernel.h>
#include <linux/linkage.h>
#include <linux/bitops.h>
#include <linux/preempt.h>
#include <linux/cpumask.h>
#include <linux/irqreturn.h>
#include <linux/irqnr.h>
#include <linux/hardirq.h>
#include <linux/irqflags.h>
#include <linux/smp.h>
#include <linux/percpu.h>
#include <linux/hrtimer.h>
#include <linux/kref.h>
#include <linux/workqueue.h>
#include <linux/atomic.h>
#include <asm/ptrace.h>
Go to the source code of this file.
Data Structures | |
struct | irqaction |
struct | softirq_action |
struct | tasklet_struct |
struct | tasklet_hrtimer |
Macros | |
#define | IRQF_TRIGGER_NONE 0x00000000 |
#define | IRQF_TRIGGER_RISING 0x00000001 |
#define | IRQF_TRIGGER_FALLING 0x00000002 |
#define | IRQF_TRIGGER_HIGH 0x00000004 |
#define | IRQF_TRIGGER_LOW 0x00000008 |
#define | IRQF_TRIGGER_MASK |
#define | IRQF_TRIGGER_PROBE 0x00000010 |
#define | IRQF_DISABLED 0x00000020 |
#define | IRQF_SHARED 0x00000080 |
#define | IRQF_PROBE_SHARED 0x00000100 |
#define | __IRQF_TIMER 0x00000200 |
#define | IRQF_PERCPU 0x00000400 |
#define | IRQF_NOBALANCING 0x00000800 |
#define | IRQF_IRQPOLL 0x00001000 |
#define | IRQF_ONESHOT 0x00002000 |
#define | IRQF_NO_SUSPEND 0x00004000 |
#define | IRQF_FORCE_RESUME 0x00008000 |
#define | IRQF_NO_THREAD 0x00010000 |
#define | IRQF_EARLY_RESUME 0x00020000 |
#define | IRQF_TIMER (__IRQF_TIMER | IRQF_NO_SUSPEND | IRQF_NO_THREAD) |
Typedefs | |
typedef irqreturn_t(* | irq_handler_t )(int, void *) |
Enumerations | |
enum | { IRQC_IS_HARDIRQ = 0, IRQC_IS_NESTED } |
#define __IRQF_TIMER 0x00000200 |
Definition at line 65 of file interrupt.h.
#define DECLARE_TASKLET | ( | name, | |
func, | |||
data | |||
) | struct tasklet_struct name = { NULL, 0, ATOMIC_INIT(0), func, data } |
Definition at line 514 of file interrupt.h.
#define DECLARE_TASKLET_DISABLED | ( | name, | |
func, | |||
data | |||
) | struct tasklet_struct name = { NULL, 0, ATOMIC_INIT(1), func, data } |
Definition at line 517 of file interrupt.h.
#define disable_irq_lockdep | ( | irq | ) | disable_irq(irq) |
Definition at line 372 of file interrupt.h.
#define disable_irq_nosync_lockdep | ( | irq | ) | disable_irq_nosync(irq) |
Definition at line 369 of file interrupt.h.
#define disable_irq_nosync_lockdep_irqsave | ( | irq, | |
flags | |||
) | disable_irq_nosync(irq) |
Definition at line 370 of file interrupt.h.
#define enable_irq_lockdep | ( | irq | ) | enable_irq(irq) |
Definition at line 373 of file interrupt.h.
#define enable_irq_lockdep_irqrestore | ( | irq, | |
flags | |||
) | enable_irq(irq) |
Definition at line 374 of file interrupt.h.
#define force_irqthreads (0) |
Definition at line 393 of file interrupt.h.
#define hard_irq_disable | ( | ) | do { } while(0) |
Definition at line 408 of file interrupt.h.
#define IRQF_DISABLED 0x00000020 |
Definition at line 62 of file interrupt.h.
#define IRQF_EARLY_RESUME 0x00020000 |
Definition at line 73 of file interrupt.h.
#define IRQF_FORCE_RESUME 0x00008000 |
Definition at line 71 of file interrupt.h.
#define IRQF_IRQPOLL 0x00001000 |
Definition at line 68 of file interrupt.h.
#define IRQF_NO_SUSPEND 0x00004000 |
Definition at line 70 of file interrupt.h.
#define IRQF_NO_THREAD 0x00010000 |
Definition at line 72 of file interrupt.h.
#define IRQF_NOBALANCING 0x00000800 |
Definition at line 67 of file interrupt.h.
#define IRQF_ONESHOT 0x00002000 |
Definition at line 69 of file interrupt.h.
#define IRQF_PERCPU 0x00000400 |
Definition at line 66 of file interrupt.h.
#define IRQF_PROBE_SHARED 0x00000100 |
Definition at line 64 of file interrupt.h.
#define IRQF_SHARED 0x00000080 |
Definition at line 63 of file interrupt.h.
#define IRQF_TIMER (__IRQF_TIMER | IRQF_NO_SUSPEND | IRQF_NO_THREAD) |
Definition at line 75 of file interrupt.h.
#define IRQF_TRIGGER_FALLING 0x00000002 |
Definition at line 32 of file interrupt.h.
#define IRQF_TRIGGER_HIGH 0x00000004 |
Definition at line 33 of file interrupt.h.
#define IRQF_TRIGGER_LOW 0x00000008 |
Definition at line 34 of file interrupt.h.
#define IRQF_TRIGGER_MASK |
Definition at line 35 of file interrupt.h.
#define IRQF_TRIGGER_NONE 0x00000000 |
Definition at line 30 of file interrupt.h.
#define IRQF_TRIGGER_PROBE 0x00000010 |
Definition at line 37 of file interrupt.h.
#define IRQF_TRIGGER_RISING 0x00000001 |
Definition at line 31 of file interrupt.h.
#define local_irq_enable_in_hardirq | ( | ) | local_irq_enable() |
Definition at line 214 of file interrupt.h.
#define or_softirq_pending | ( | x | ) | (local_softirq_pending() |= (x)) |
Definition at line 398 of file interrupt.h.
#define set_softirq_pending | ( | x | ) | (local_softirq_pending() = (x)) |
Definition at line 397 of file interrupt.h.
#define SOFTIRQ_STOP_IDLE_MASK (~(1 << RCU_SOFTIRQ)) |
Definition at line 433 of file interrupt.h.
#define tasklet_trylock | ( | t | ) | 1 |
Definition at line 544 of file interrupt.h.
#define tasklet_unlock | ( | t | ) | do { } while (0) |
Definition at line 546 of file interrupt.h.
#define tasklet_unlock_wait | ( | t | ) | do { } while (0) |
Definition at line 545 of file interrupt.h.
typedef irqreturn_t(* irq_handler_t)(int, void *) |
Definition at line 89 of file interrupt.h.
anonymous enum |
Definition at line 84 of file interrupt.h.
anonymous enum |
HI_SOFTIRQ | |
TIMER_SOFTIRQ | |
NET_TX_SOFTIRQ | |
NET_RX_SOFTIRQ | |
BLOCK_SOFTIRQ | |
BLOCK_IOPOLL_SOFTIRQ | |
TASKLET_SOFTIRQ | |
SCHED_SOFTIRQ | |
HRTIMER_SOFTIRQ | |
RCU_SOFTIRQ | |
NR_SOFTIRQS |
Definition at line 417 of file interrupt.h.
anonymous enum |
Definition at line 521 of file interrupt.h.
asmlinkage void __do_softirq | ( | void | ) |
__send_remote_softirq - try to schedule softirq work on a remote cpu : private SMP call function data area : the remote cpu : the currently executing cpu : the softirq for the work
Attempt to schedule softirq work on a remote cpu. If this cannot be done, the work is instead queued up on the local cpu.
Interrupts must be disabled.
void __tasklet_hi_schedule | ( | struct tasklet_struct * | t | ) |
void __tasklet_hi_schedule_first | ( | struct tasklet_struct * | t | ) |
void __tasklet_schedule | ( | struct tasklet_struct * | t | ) |
DECLARE_PER_CPU | ( | struct task_struct * | , |
ksoftirqd | |||
) |
devm_free_irq - free an interrupt : device to free interrupt for : Interrupt line to free : Device identity to free
Except for the extra argument, this function takes the same arguments and performs the same function as free_irq(). This function instead of free_irq() should be used to manually free IRQs allocated with devm_request_irq().
int __must_check devm_request_threaded_irq | ( | struct device * | dev, |
unsigned int | irq, | ||
irq_handler_t | handler, | ||
irq_handler_t | thread_fn, | ||
unsigned long | irqflags, | ||
const char * | devname, | ||
void * | dev_id | ||
) |
devm_request_threaded_irq - allocate an interrupt line for a managed device : device to request interrupt for : Interrupt line to allocate : Function to be called when the IRQ occurs : function to be called in a threaded interrupt context. NULL for devices which handle everything in : Interrupt type flags : An ascii name for the claiming device : A cookie passed back to the handler function
Except for the extra argument, this function takes the same arguments and performs the same function as request_irq(). IRQs requested with this function will be automatically freed on driver detach.
If an IRQ allocated with this function needs to be freed separately, devm_free_irq() must be used.
disable_irq - disable an irq and wait for completion : Interrupt to disable
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.
disable_irq_nosync - disable an irq without waiting : Interrupt to disable
Disable the selected interrupt line. Disables and Enables are nested. Unlike disable_irq(), this function does not ensure existing instances of the IRQ handler have completed before returning.
This function may be called from IRQ context.
asmlinkage void do_softirq | ( | void | ) |
enable_irq - enable handling of an irq : Interrupt to enable
Undoes the effect of one call to disable_irq(). If this matches the last disable, processing of interrupts on this IRQ line is re-enabled.
This function may be called from IRQ context only when desc->irq_data.chip->bus_lock and desc->chip->bus_sync_unlock are NULL !
free_irq - free an interrupt allocated with request_irq : Interrupt line to free : Device identity to free
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.
free_percpu_irq - free an interrupt allocated with request_percpu_irq : Interrupt line to free : Device identity to free
Remove a percpu interrupt handler. The handler is removed, but the interrupt line is not disabled. This must be done on each CPU 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.
irqreturn_t no_action | ( | int | cpl, |
void * | dev_id | ||
) |
void open_softirq | ( | int | nr, |
void(*)(struct softirq_action *) | action | ||
) |
probe_irq_mask - scan a bitmap of interrupt lines : mask of interrupts to consider
Scan the interrupt lines and return a bitmap of active autodetect interrupts. The interrupt probe logic state is then returned to its previous value.
Note: we need to scan all the irq's even though we will only return autodetect irq numbers - just so that we reset them all to a known state.
Definition at line 118 of file autoprobe.c.
probe_irq_off - end an interrupt autodetect : mask of potential interrupts (unused)
Scans the unused interrupt lines and returns the line which appears to have triggered the interrupt. If no interrupt was found then zero is returned. If more than one interrupt is found then minus the first candidate is returned to indicate their is doubt.
The interrupt probe logic state is returned to its previous value.
BUGS: When used in a module (which arguably shouldn't happen) nothing prevents two IRQ probe callers from overlapping. The results of this are non-optimal.
Definition at line 158 of file autoprobe.c.
probe_irq_on - begin an interrupt autodetect
Commence probing for an interrupt. The interrupts are scanned and a mask of potential interrupt lines is returned.
Definition at line 31 of file autoprobe.c.
int __must_check request_irq | ( | unsigned int | irq, |
irq_handler_t | handler, | ||
unsigned long | flags, | ||
const char * | name, | ||
void * | dev | ||
) |
void send_remote_softirq | ( | struct call_single_data * | cp, |
int | cpu, | ||
int | softirq | ||
) |
void tasklet_hrtimer_init | ( | struct tasklet_hrtimer * | ttimer, |
enum hrtimer_restart(*)(struct hrtimer *) | function, | ||
clockid_t | which_clock, | ||
enum hrtimer_mode | mode | ||
) |
tasklet_hrtimer_init - Init a tasklet/hrtimer combo for softirq callbacks : tasklet_hrtimer which is initialized : hrtimer callback function which gets called from softirq context : clock id (CLOCK_MONOTONIC/CLOCK_REALTIME) : hrtimer mode (HRTIMER_MODE_ABS/HRTIMER_MODE_REL)
void tasklet_kill | ( | struct tasklet_struct * | t | ) |
void tasklet_kill_immediate | ( | struct tasklet_struct * | t, |
unsigned int | cpu | ||
) |
char* softirq_to_name[NR_SOFTIRQS] |