Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Macros | Functions
irqflags.h File Reference
#include <arch/interrupts.h>
#include <arch/chip.h>
#include <asm/percpu.h>
#include <arch/spr_def.h>

Go to the source code of this file.

Macros

#define LINUX_MASKABLE_INTERRUPTS   (~(INT_MASK(INT_PERF_COUNT)))
 
#define interrupt_mask_set(n)   __insn_mtspr(SPR_INTERRUPT_MASK_SET_K, (1UL << (n)))
 
#define interrupt_mask_reset(n)   __insn_mtspr(SPR_INTERRUPT_MASK_RESET_K, (1UL << (n)))
 
#define interrupt_mask_check(n)   ((__insn_mfspr(SPR_INTERRUPT_MASK_K) >> (n)) & 1)
 
#define interrupt_mask_set_mask(mask)   __insn_mtspr(SPR_INTERRUPT_MASK_SET_K, (mask))
 
#define interrupt_mask_reset_mask(mask)   __insn_mtspr(SPR_INTERRUPT_MASK_RESET_K, (mask))
 
#define interrupt_mask_save_mask()   __insn_mfspr(SPR_INTERRUPT_MASK_K)
 
#define interrupt_mask_restore_mask(mask)   __insn_mtspr(SPR_INTERRUPT_MASK_K, (mask))
 
#define INITIAL_INTERRUPTS_ENABLED   INT_MASK(INT_MEM_ERROR)
 
#define arch_local_irq_disable()   interrupt_mask_set_mask(LINUX_MASKABLE_INTERRUPTS)
 
#define arch_local_irq_disable_all()   interrupt_mask_set_mask(-1ULL)
 
#define arch_local_irq_enable()   interrupt_mask_reset_mask(__get_cpu_var(interrupts_enabled_mask))
 
#define arch_local_irq_restore(disabled)
 
#define arch_irqs_disabled_flags(flags)   ((flags) != 0)
 
#define arch_irqs_disabled()   interrupt_mask_check(INT_MEM_ERROR)
 
#define arch_local_save_flags()   arch_irqs_disabled()
 
#define arch_local_irq_save()
 
#define arch_local_irq_mask(interrupt)   (__get_cpu_var(interrupts_enabled_mask) &= ~INT_MASK(interrupt))
 
#define arch_local_irq_mask_now(interrupt)
 
#define arch_local_irq_unmask(interrupt)   (__get_cpu_var(interrupts_enabled_mask) |= INT_MASK(interrupt))
 
#define arch_local_irq_unmask_now(interrupt)
 

Functions

 DECLARE_PER_CPU (unsigned long long, interrupts_enabled_mask)
 

Macro Definition Documentation

#define arch_irqs_disabled (   void)    interrupt_mask_check(INT_MEM_ERROR)

Definition at line 155 of file irqflags.h.

#define arch_irqs_disabled_flags (   flags)    ((flags) != 0)

Definition at line 152 of file irqflags.h.

#define arch_local_irq_disable (   void)    interrupt_mask_set_mask(LINUX_MASKABLE_INTERRUPTS)

Definition at line 132 of file irqflags.h.

#define arch_local_irq_disable_all ( )    interrupt_mask_set_mask(-1ULL)

Definition at line 136 of file irqflags.h.

#define arch_local_irq_enable (   void)    interrupt_mask_reset_mask(__get_cpu_var(interrupts_enabled_mask))

Definition at line 140 of file irqflags.h.

#define arch_local_irq_mask (   interrupt)    (__get_cpu_var(interrupts_enabled_mask) &= ~INT_MASK(interrupt))

Definition at line 167 of file irqflags.h.

#define arch_local_irq_mask_now (   interrupt)
Value:
do { \
arch_local_irq_mask(interrupt); \
interrupt_mask_set(interrupt); \
} while (0)

Definition at line 171 of file irqflags.h.

#define arch_local_irq_restore (   disabled)
Value:
do { \
if (disabled) \
arch_local_irq_disable(); \
} while (0)

Definition at line 144 of file irqflags.h.

#define arch_local_irq_save (   void)
Value:
({ \
unsigned long __flags = arch_local_save_flags(); \
arch_local_irq_disable(); \
__flags; })

Definition at line 161 of file irqflags.h.

#define arch_local_irq_unmask (   interrupt)    (__get_cpu_var(interrupts_enabled_mask) |= INT_MASK(interrupt))

Definition at line 177 of file irqflags.h.

#define arch_local_irq_unmask_now (   interrupt)
Value:
do { \
arch_local_irq_unmask(interrupt); \
if (!irqs_disabled()) \
interrupt_mask_reset(interrupt); \
} while (0)

Definition at line 181 of file irqflags.h.

#define arch_local_save_flags (   void)    arch_irqs_disabled()

Definition at line 158 of file irqflags.h.

#define INITIAL_INTERRUPTS_ENABLED   INT_MASK(INT_MEM_ERROR)

Definition at line 129 of file irqflags.h.

#define interrupt_mask_check (   n)    ((__insn_mfspr(SPR_INTERRUPT_MASK_K) >> (n)) & 1)

Definition at line 106 of file irqflags.h.

#define interrupt_mask_reset (   n)    __insn_mtspr(SPR_INTERRUPT_MASK_RESET_K, (1UL << (n)))

Definition at line 104 of file irqflags.h.

#define interrupt_mask_reset_mask (   mask)    __insn_mtspr(SPR_INTERRUPT_MASK_RESET_K, (mask))

Definition at line 110 of file irqflags.h.

#define interrupt_mask_restore_mask (   mask)    __insn_mtspr(SPR_INTERRUPT_MASK_K, (mask))

Definition at line 114 of file irqflags.h.

#define interrupt_mask_save_mask ( )    __insn_mfspr(SPR_INTERRUPT_MASK_K)

Definition at line 112 of file irqflags.h.

#define interrupt_mask_set (   n)    __insn_mtspr(SPR_INTERRUPT_MASK_SET_K, (1UL << (n)))

Definition at line 102 of file irqflags.h.

#define interrupt_mask_set_mask (   mask)    __insn_mtspr(SPR_INTERRUPT_MASK_SET_K, (mask))

Definition at line 108 of file irqflags.h.

#define LINUX_MASKABLE_INTERRUPTS   (~(INT_MASK(INT_PERF_COUNT)))

Definition at line 43 of file irqflags.h.

Function Documentation

DECLARE_PER_CPU ( unsigned long  long,
interrupts_enabled_mask   
)