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

Go to the source code of this file.

Data Structures

struct  mm_segment_t
 
struct  async_tlb
 
struct  thread_struct
 

Macros

#define STACK_TOP_DELTA   8
 
#define KSTK_PTREGS_GAP   56
 
#define TASK_SIZE_MAX   PAGE_OFFSET
 
#define TASK_SIZE   TASK_SIZE_MAX
 
#define VDSO_BASE   (TASK_SIZE - PAGE_SIZE)
 
#define STACK_TOP   VDSO_BASE
 
#define STACK_TOP_MAX   TASK_SIZE_MAX
 
#define TASK_UNMAPPED_BASE   (PAGE_ALIGN(TASK_SIZE / 3))
 
#define HAVE_ARCH_PICK_MMAP_LAYOUT
 
#define INIT_THREAD
 
#define thread_saved_pc(t)   ((t)->thread.pc)
 
#define task_ksp0(task)   ((unsigned long)(task)->stack + THREAD_SIZE)
 
#define KSTK_TOP(task)   (task_ksp0(task) - STACK_TOP_DELTA)
 
#define task_pt_regs(task)   ((struct pt_regs *)(task_ksp0(task) - KSTK_PTREGS_GAP) - 1)
 
#define task_sp(task)   (task_pt_regs(task)->sp)
 
#define task_pc(task)   (task_pt_regs(task)->pc)
 
#define KSTK_EIP(task)   task_pc(task)
 
#define KSTK_ESP(task)   task_sp(task)
 
#define REGFMT   "0x%08lx"
 
#define hash_default   0
 
#define kstack_hash   0
 
#define uheap_hash   0
 
#define ARCH_HAS_PREFETCH
 
#define prefetch(x)   __builtin_prefetch(x)
 
#define PREFETCH_STRIDE   CHIP_L2_LINE_SIZE()
 
#define prefetch_L1(x)   __insn_prefetch_L1((void *)(x))
 
#define EX1_PL(ex1)   (((ex1) >> SPR_EX_CONTEXT_1_1__PL_SHIFT) & SPR_EX_CONTEXT_1_1__PL_RMASK)
 
#define EX1_ICS(ex1)   (((ex1) >> SPR_EX_CONTEXT_1_1__ICS_SHIFT) & SPR_EX_CONTEXT_1_1__ICS_RMASK)
 
#define PL_ICS_EX1(pl, ics)
 
#define USER_PL   0
 
#define KERNEL_PL   CONFIG_KERNEL_PL
 
#define CPU_LOG_MASK_VALUE   12
 
#define CPU_MASK_VALUE   ((1 << CPU_LOG_MASK_VALUE) - 1)
 
#define raw_smp_processor_id()   ((int)__insn_mfspr(SPR_SYSTEM_SAVE_K_0) & CPU_MASK_VALUE)
 
#define get_current_ksp0()   (__insn_mfspr(SPR_SYSTEM_SAVE_K_0) & ~CPU_MASK_VALUE)
 
#define next_current_ksp0(task)
 

Functions

voidcurrent_text_addr (void)
 
 DECLARE_PER_CPU (unsigned long, boot_sp)
 
 DECLARE_PER_CPU (unsigned long, boot_pc)
 
int kernel_thread (int(*fn)(void *), void *arg, unsigned long flags)
 
int do_work_pending (struct pt_regs *regs, u32 flags)
 
unsigned long get_wchan (struct task_struct *p)
 

Variables

struct seq_operations cpuinfo_op
 
char chip_model [64]
 
int node_controller []
 
int kdata_huge
 

Macro Definition Documentation

#define ARCH_HAS_PREFETCH

Definition at line 296 of file processor.h.

#define CPU_LOG_MASK_VALUE   12

Definition at line 347 of file processor.h.

#define CPU_MASK_VALUE   ((1 << CPU_LOG_MASK_VALUE) - 1)

Definition at line 348 of file processor.h.

#define EX1_ICS (   ex1)    (((ex1) >> SPR_EX_CONTEXT_1_1__ICS_SHIFT) & SPR_EX_CONTEXT_1_1__ICS_RMASK)

Definition at line 330 of file processor.h.

#define EX1_PL (   ex1)    (((ex1) >> SPR_EX_CONTEXT_1_1__PL_SHIFT) & SPR_EX_CONTEXT_1_1__PL_RMASK)

Definition at line 328 of file processor.h.

#define get_current_ksp0 ( )    (__insn_mfspr(SPR_SYSTEM_SAVE_K_0) & ~CPU_MASK_VALUE)

Definition at line 354 of file processor.h.

#define hash_default   0

Definition at line 287 of file processor.h.

#define HAVE_ARCH_PICK_MMAP_LAYOUT

Definition at line 195 of file processor.h.

#define INIT_THREAD
Value:
{ \
.ksp = (unsigned long)init_stack + THREAD_SIZE - STACK_TOP_DELTA, \
.interrupt_mask = -1ULL \
}

Definition at line 197 of file processor.h.

#define KERNEL_PL   CONFIG_KERNEL_PL

Definition at line 344 of file processor.h.

#define kstack_hash   0

Definition at line 288 of file processor.h.

#define KSTK_EIP (   task)    task_pc(task)

Definition at line 245 of file processor.h.

#define KSTK_ESP (   task)    task_sp(task)

Definition at line 246 of file processor.h.

#define KSTK_PTREGS_GAP   56

Definition at line 161 of file processor.h.

#define KSTK_TOP (   task)    (task_ksp0(task) - STACK_TOP_DELTA)

Definition at line 239 of file processor.h.

#define next_current_ksp0 (   task)
Value:
({ \
unsigned long __ksp0 = task_ksp0(task); \
int __cpu = raw_smp_processor_id(); \
BUG_ON(__ksp0 & CPU_MASK_VALUE); \
__ksp0 | __cpu; \
})

Definition at line 356 of file processor.h.

#define PL_ICS_EX1 (   pl,
  ics 
)
Value:

Definition at line 332 of file processor.h.

#define prefetch (   x )    __builtin_prefetch(x)

Definition at line 297 of file processor.h.

#define prefetch_L1 (   x)    __insn_prefetch_L1((void *)(x))

Definition at line 304 of file processor.h.

#define PREFETCH_STRIDE   CHIP_L2_LINE_SIZE()

Definition at line 298 of file processor.h.

#define raw_smp_processor_id ( )    ((int)__insn_mfspr(SPR_SYSTEM_SAVE_K_0) & CPU_MASK_VALUE)

Definition at line 352 of file processor.h.

#define REGFMT   "0x%08lx"

Definition at line 252 of file processor.h.

#define STACK_TOP   VDSO_BASE

Definition at line 184 of file processor.h.

#define STACK_TOP_DELTA   8

Definition at line 151 of file processor.h.

#define STACK_TOP_MAX   TASK_SIZE_MAX

Definition at line 187 of file processor.h.

#define task_ksp0 (   task)    ((unsigned long)(task)->stack + THREAD_SIZE)

Definition at line 236 of file processor.h.

#define task_pc (   task)    (task_pt_regs(task)->pc)

Definition at line 243 of file processor.h.

#define task_pt_regs (   task)    ((struct pt_regs *)(task_ksp0(task) - KSTK_PTREGS_GAP) - 1)

Definition at line 240 of file processor.h.

#define TASK_SIZE   TASK_SIZE_MAX

Definition at line 178 of file processor.h.

#define TASK_SIZE_MAX   PAGE_OFFSET

Definition at line 169 of file processor.h.

#define task_sp (   task)    (task_pt_regs(task)->sp)

Definition at line 242 of file processor.h.

#define TASK_UNMAPPED_BASE   (PAGE_ALIGN(TASK_SIZE / 3))

Definition at line 193 of file processor.h.

#define thread_saved_pc (   t)    ((t)->thread.pc)

Definition at line 231 of file processor.h.

#define uheap_hash   0

Definition at line 289 of file processor.h.

#define USER_PL   0

Definition at line 340 of file processor.h.

#define VDSO_BASE   (TASK_SIZE - PAGE_SIZE)

Definition at line 182 of file processor.h.

Function Documentation

void* current_text_addr ( void  )
DECLARE_PER_CPU ( unsigned  long,
boot_sp   
)
DECLARE_PER_CPU ( unsigned  long,
boot_pc   
)
int do_work_pending ( struct pt_regs regs,
u32  flags 
)

Definition at line 545 of file process.c.

unsigned long get_wchan ( struct task_struct p)

Definition at line 419 of file process.c.

int kernel_thread ( int(*)(void *)  fn,
void arg,
unsigned long  flags 
)

Definition at line 333 of file process.c.

Variable Documentation

char chip_model[64]
struct seq_operations cpuinfo_op

Definition at line 1479 of file setup.c.

int kdata_huge

Definition at line 211 of file init.c.

int node_controller[]

Definition at line 89 of file setup.c.