Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Enumerations | Functions | Variables
processor.h File Reference
#include <asm/intrinsics.h>
#include <asm/kregs.h>
#include <asm/ptrace.h>
#include <asm/ustack.h>
#include <linux/cache.h>
#include <linux/compiler.h>
#include <linux/threads.h>
#include <linux/types.h>
#include <asm/fpu.h>
#include <asm/page.h>
#include <asm/percpu.h>
#include <asm/rse.h>
#include <asm/unwind.h>
#include <linux/atomic.h>

Go to the source code of this file.

Data Structures

struct  ia64_psr
 
union  ia64_isr
 
union  ia64_lid
 
union  ia64_tpr
 
union  ia64_itir
 
union  ia64_rr
 
struct  cpuinfo_ia64
 
struct  mm_segment_t
 
struct  thread_struct
 

Macros

#define __ARCH_WANT_UNLOCKED_CTXSW
 
#define ARCH_HAS_PREFETCH_SWITCH_STACK
 
#define IA64_NUM_PHYS_STACK_REG   96
 
#define IA64_NUM_DBG_REGS   8
 
#define DEFAULT_MAP_BASE   __IA64_UL_CONST(0x2000000000000000)
 
#define DEFAULT_TASK_SIZE   __IA64_UL_CONST(0xa000000000000000)
 
#define TASK_SIZE   DEFAULT_TASK_SIZE
 
#define TASK_UNMAPPED_BASE   (current->thread.map_base)
 
#define IA64_THREAD_FPH_VALID   (__IA64_UL(1) << 0) /* floating-point high state valid? */
 
#define IA64_THREAD_DBG_VALID   (__IA64_UL(1) << 1) /* debug registers valid? */
 
#define IA64_THREAD_PM_VALID   (__IA64_UL(1) << 2) /* performance registers valid? */
 
#define IA64_THREAD_UAC_NOPRINT   (__IA64_UL(1) << 3) /* don't log unaligned accesses */
 
#define IA64_THREAD_UAC_SIGBUS   (__IA64_UL(1) << 4) /* generate SIGBUS on unaligned acc. */
 
#define IA64_THREAD_MIGRATION
 
#define IA64_THREAD_FPEMU_NOPRINT   (__IA64_UL(1) << 6) /* don't log any fpswa faults */
 
#define IA64_THREAD_FPEMU_SIGFPE   (__IA64_UL(1) << 7) /* send a SIGFPE for fpswa faults */
 
#define IA64_THREAD_UAC_SHIFT   3
 
#define IA64_THREAD_UAC_MASK   (IA64_THREAD_UAC_NOPRINT | IA64_THREAD_UAC_SIGBUS)
 
#define IA64_THREAD_FPEMU_SHIFT   6
 
#define IA64_THREAD_FPEMU_MASK   (IA64_THREAD_FPEMU_NOPRINT | IA64_THREAD_FPEMU_SIGFPE)
 
#define IA64_NSEC_PER_CYC_SHIFT   30
 
#define local_cpu_data   (&__ia64_per_cpu_var(ia64_cpu_info))
 
#define cpu_data(cpu)   (&per_cpu(ia64_cpu_info, cpu))
 
#define SET_UNALIGN_CTL(task, value)
 
#define GET_UNALIGN_CTL(task, addr)
 
#define SET_FPEMU_CTL(task, value)
 
#define GET_FPEMU_CTL(task, addr)
 
#define INIT_THREAD_PM
 
#define INIT_THREAD
 
#define start_thread(regs, new_ip, new_sp)
 
#define release_thread(dead_task)
 
#define KSTK_EIP(tsk)
 
#define KSTK_ESP(tsk)   ((tsk)->thread.ksp)
 
#define ia64_get_kr(regnum)
 
#define ia64_set_kr(regnum, r)
 
#define ia64_is_local_fpu_owner(t)
 
#define ia64_set_local_fpu_owner(t)
 
#define ia64_drop_fpu(t)   ((t)->thread.last_fph_cpu = -1)
 
#define ia64_fph_enable()   do { ia64_rsm(IA64_PSR_DFH); ia64_srlz_d(); } while (0)
 
#define ia64_fph_disable()   do { ia64_ssm(IA64_PSR_DFH); ia64_srlz_d(); } while (0)
 
#define cpu_relax()   ia64_hint(ia64_hint_pause)
 
#define current_text_addr()   ({ void *_pc; _pc = (void *)ia64_getreg(_IA64_REG_IP); _pc; })
 
#define ia64_rotl(w, n)   ia64_rotr((w), (64) - (n))
 
#define ARCH_HAS_PREFETCH
 
#define ARCH_HAS_PREFETCHW
 
#define ARCH_HAS_SPINLOCK_PREFETCH
 
#define PREFETCH_STRIDE   L1_CACHE_BYTES
 
#define spin_lock_prefetch(x)   prefetchw(x)
 
#define ia64_platform_is(x)   (strcmp(x, ia64_platform_name) == 0)
 

Enumerations

enum  idle_boot_override {
  IDLE_NO_OVERRIDE =0, IDLE_HALT, IDLE_FORCE_MWAIT, IDLE_NOMWAIT,
  IDLE_POLL, IDLE_NO_OVERRIDE =0, IDLE_HALT, IDLE_NOMWAIT,
  IDLE_POLL, IDLE_FORCE_MWAIT
}
 

Functions

 DECLARE_PER_CPU (struct cpuinfo_ia64, ia64_cpu_info)
 
void print_cpu_info (struct cpuinfo_ia64 *)
 
pid_t kernel_thread (int(*fn)(void *), void *arg, unsigned long flags)
 
unsigned long get_wchan (struct task_struct *p)
 
void ia64_getreg_unknown_kr (void)
 
void ia64_setreg_unknown_kr (void)
 
void __ia64_init_fpu (void)
 
void __ia64_save_fpu (struct ia64_fpreg *fph)
 
void __ia64_load_fpu (struct ia64_fpreg *fph)
 
void ia64_save_debug_regs (unsigned long *save_area)
 
void ia64_load_debug_regs (unsigned long *save_area)
 
void default_idle (void)
 

Variables

unsigned long boot_option_idle_override
 

Macro Definition Documentation

#define __ARCH_WANT_UNLOCKED_CTXSW

Definition at line 22 of file processor.h.

#define ARCH_HAS_PREFETCH

Definition at line 692 of file processor.h.

#define ARCH_HAS_PREFETCH_SWITCH_STACK

Definition at line 23 of file processor.h.

#define ARCH_HAS_PREFETCHW

Definition at line 693 of file processor.h.

#define ARCH_HAS_SPINLOCK_PREFETCH

Definition at line 694 of file processor.h.

#define cpu_data (   cpu)    (&per_cpu(ia64_cpu_info, cpu))

Definition at line 242 of file processor.h.

#define cpu_relax (   void)    ia64_hint(ia64_hint_pause)

Definition at line 561 of file processor.h.

#define current_text_addr (   void)    ({ void *_pc; _pc = (void *)ia64_getreg(_IA64_REG_IP); _pc; })

Definition at line 638 of file processor.h.

#define DEFAULT_MAP_BASE   __IA64_UL_CONST(0x2000000000000000)

Definition at line 28 of file processor.h.

#define DEFAULT_TASK_SIZE   __IA64_UL_CONST(0xa000000000000000)

Definition at line 29 of file processor.h.

#define GET_FPEMU_CTL (   task,
  addr 
)
Value:
({ \
(int __user *) (addr)); \
})

Definition at line 268 of file processor.h.

#define GET_UNALIGN_CTL (   task,
  addr 
)
Value:
({ \
(int __user *) (addr)); \
})

Definition at line 256 of file processor.h.

#define ia64_drop_fpu (   t)    ((t)->thread.last_fph_cpu = -1)

Definition at line 431 of file processor.h.

#define ia64_fph_disable ( )    do { ia64_ssm(IA64_PSR_DFH); ia64_srlz_d(); } while (0)

Definition at line 440 of file processor.h.

#define ia64_fph_enable ( )    do { ia64_rsm(IA64_PSR_DFH); ia64_srlz_d(); } while (0)

Definition at line 439 of file processor.h.

#define ia64_get_kr (   regnum)
Value:
({ \
unsigned long r = 0; \
\
switch (regnum) { \
case 0: r = ia64_getreg(_IA64_REG_AR_KR0); break; \
case 1: r = ia64_getreg(_IA64_REG_AR_KR1); break; \
case 2: r = ia64_getreg(_IA64_REG_AR_KR2); break; \
case 3: r = ia64_getreg(_IA64_REG_AR_KR3); break; \
case 4: r = ia64_getreg(_IA64_REG_AR_KR4); break; \
case 5: r = ia64_getreg(_IA64_REG_AR_KR5); break; \
case 6: r = ia64_getreg(_IA64_REG_AR_KR6); break; \
case 7: r = ia64_getreg(_IA64_REG_AR_KR7); break; \
default: ia64_getreg_unknown_kr(); break; \
} \
r; \
})

Definition at line 371 of file processor.h.

#define ia64_is_local_fpu_owner (   t)
Value:
({ \
struct task_struct *__ia64_islfo_task = (t); \
(__ia64_islfo_task->thread.last_fph_cpu == smp_processor_id() \
&& __ia64_islfo_task == (struct task_struct *) ia64_get_kr(IA64_KR_FPU_OWNER)); \
})

Definition at line 413 of file processor.h.

#define IA64_NSEC_PER_CYC_SHIFT   30

Definition at line 65 of file processor.h.

#define IA64_NUM_DBG_REGS   8

Definition at line 26 of file processor.h.

#define IA64_NUM_PHYS_STACK_REG   96

Definition at line 25 of file processor.h.

#define ia64_platform_is (   x)    (strcmp(x, ia64_platform_name) == 0)

Definition at line 718 of file processor.h.

#define ia64_rotl (   w,
  n 
)    ia64_rotr((w), (64) - (n))

Definition at line 678 of file processor.h.

#define ia64_set_kr (   regnum,
  r 
)
Value:
({ \
switch (regnum) { \
case 0: ia64_setreg(_IA64_REG_AR_KR0, r); break; \
case 1: ia64_setreg(_IA64_REG_AR_KR1, r); break; \
case 2: ia64_setreg(_IA64_REG_AR_KR2, r); break; \
case 3: ia64_setreg(_IA64_REG_AR_KR3, r); break; \
case 4: ia64_setreg(_IA64_REG_AR_KR4, r); break; \
case 5: ia64_setreg(_IA64_REG_AR_KR5, r); break; \
case 6: ia64_setreg(_IA64_REG_AR_KR6, r); break; \
case 7: ia64_setreg(_IA64_REG_AR_KR7, r); break; \
default: ia64_setreg_unknown_kr(); break; \
} \
})

Definition at line 389 of file processor.h.

#define ia64_set_local_fpu_owner (   t)
Value:
do { \
struct task_struct *__ia64_slfo_task = (t); \
__ia64_slfo_task->thread.last_fph_cpu = smp_processor_id(); \
ia64_set_kr(IA64_KR_FPU_OWNER, (unsigned long) __ia64_slfo_task); \
} while (0)

Definition at line 424 of file processor.h.

#define IA64_THREAD_DBG_VALID   (__IA64_UL(1) << 1) /* debug registers valid? */

Definition at line 46 of file processor.h.

#define IA64_THREAD_FPEMU_MASK   (IA64_THREAD_FPEMU_NOPRINT | IA64_THREAD_FPEMU_SIGFPE)

Definition at line 57 of file processor.h.

#define IA64_THREAD_FPEMU_NOPRINT   (__IA64_UL(1) << 6) /* don't log any fpswa faults */

Definition at line 51 of file processor.h.

#define IA64_THREAD_FPEMU_SHIFT   6

Definition at line 56 of file processor.h.

#define IA64_THREAD_FPEMU_SIGFPE   (__IA64_UL(1) << 7) /* send a SIGFPE for fpswa faults */

Definition at line 52 of file processor.h.

#define IA64_THREAD_FPH_VALID   (__IA64_UL(1) << 0) /* floating-point high state valid? */

Definition at line 45 of file processor.h.

#define IA64_THREAD_MIGRATION
Value:
(__IA64_UL(1) << 5) /* require migration
sync at ctx sw */

Definition at line 50 of file processor.h.

#define IA64_THREAD_PM_VALID   (__IA64_UL(1) << 2) /* performance registers valid? */

Definition at line 47 of file processor.h.

#define IA64_THREAD_UAC_MASK   (IA64_THREAD_UAC_NOPRINT | IA64_THREAD_UAC_SIGBUS)

Definition at line 55 of file processor.h.

#define IA64_THREAD_UAC_NOPRINT   (__IA64_UL(1) << 3) /* don't log unaligned accesses */

Definition at line 48 of file processor.h.

#define IA64_THREAD_UAC_SHIFT   3

Definition at line 54 of file processor.h.

#define IA64_THREAD_UAC_SIGBUS   (__IA64_UL(1) << 4) /* generate SIGBUS on unaligned acc. */

Definition at line 49 of file processor.h.

#define INIT_THREAD
Value:
{ \
.flags = 0, \
.on_ustack = 0, \
.ksp = 0, \
.map_base = DEFAULT_MAP_BASE, \
.last_fph_cpu = -1, \
INIT_THREAD_PM \
.dbr = {0, }, \
.ibr = {0, }, \
.fph = {{{{0}}}, } \
}

Definition at line 297 of file processor.h.

#define INIT_THREAD_PM

Definition at line 290 of file processor.h.

#define KSTK_EIP (   tsk)
Value:
({ \
struct pt_regs *_regs = task_pt_regs(tsk); \
_regs->cr_iip + ia64_psr(_regs)->ri; \
})

Definition at line 359 of file processor.h.

#define KSTK_ESP (   tsk)    ((tsk)->thread.ksp)

Definition at line 366 of file processor.h.

#define local_cpu_data   (&__ia64_per_cpu_var(ia64_cpu_info))

Definition at line 241 of file processor.h.

#define PREFETCH_STRIDE   L1_CACHE_BYTES

Definition at line 695 of file processor.h.

#define release_thread (   dead_task)

Definition at line 337 of file processor.h.

#define SET_FPEMU_CTL (   task,
  value 
)
Value:
({ \
(task)->thread.flags = (((task)->thread.flags & ~IA64_THREAD_FPEMU_MASK) \
0; \
})

Definition at line 262 of file processor.h.

#define SET_UNALIGN_CTL (   task,
  value 
)
Value:
({ \
(task)->thread.flags = (((task)->thread.flags & ~IA64_THREAD_UAC_MASK) \
0; \
})

Definition at line 250 of file processor.h.

#define spin_lock_prefetch (   x)    prefetchw(x)

Definition at line 709 of file processor.h.

#define start_thread (   regs,
  new_ip,
  new_sp 
)
Value:
do { \
regs->cr_ipsr = ((regs->cr_ipsr | (IA64_PSR_BITS_TO_SET | IA64_PSR_CPL)) \
regs->cr_iip = new_ip; \
regs->ar_rsc = 0xf; /* eager mode, privilege level 3 */ \
regs->ar_rnat = 0; \
regs->ar_bspstore = current->thread.rbs_bot; \
regs->ar_fpsr = FPSR_DEFAULT; \
regs->loadrs = 0; \
regs->r8 = get_dumpable(current->mm); /* set "don't zap registers" flag */ \
regs->r12 = new_sp - 16; /* allocate 16 byte scratch area */ \
if (unlikely(!get_dumpable(current->mm))) { \
/* \
* Zap scratch regs to avoid leaking bits between processes with different \
* uid/privileges. \
*/ \
regs->ar_pfs = 0; regs->b0 = 0; regs->pr = 0; \
regs->r1 = 0; regs->r9 = 0; regs->r11 = 0; regs->r13 = 0; regs->r15 = 0; \
} \
} while (0)

Definition at line 310 of file processor.h.

#define TASK_SIZE   DEFAULT_TASK_SIZE

Definition at line 37 of file processor.h.

#define TASK_UNMAPPED_BASE   (current->thread.map_base)

Definition at line 43 of file processor.h.

Enumeration Type Documentation

Enumerator:
IDLE_NO_OVERRIDE 
IDLE_HALT 
IDLE_FORCE_MWAIT 
IDLE_NOMWAIT 
IDLE_POLL 
IDLE_NO_OVERRIDE 
IDLE_HALT 
IDLE_NOMWAIT 
IDLE_POLL 
IDLE_FORCE_MWAIT 

Definition at line 713 of file processor.h.

Function Documentation

void __ia64_init_fpu ( void  )
void __ia64_load_fpu ( struct ia64_fpreg fph)
void __ia64_save_fpu ( struct ia64_fpreg fph)
DECLARE_PER_CPU ( struct cpuinfo_ia64  ,
ia64_cpu_info   
)
void default_idle ( void  )

Definition at line 29 of file process.c.

unsigned long get_wchan ( struct task_struct p)

Definition at line 419 of file process.c.

void ia64_getreg_unknown_kr ( void  )
void ia64_load_debug_regs ( unsigned long save_area)
void ia64_save_debug_regs ( unsigned long save_area)
void ia64_setreg_unknown_kr ( void  )
pid_t kernel_thread ( int(*)(void *)  fn,
void arg,
unsigned long  flags 
)

Definition at line 333 of file process.c.

void print_cpu_info ( struct cpuinfo_ia64 )

Variable Documentation

unsigned long boot_option_idle_override

Definition at line 58 of file process.c.