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

Go to the source code of this file.

Data Structures

struct  system_cpuinfo_parisc
 
struct  cpuinfo_parisc
 
struct  mm_segment_t
 
struct  thread_struct
 

Macros

#define KERNEL_STACK_SIZE   (4*PAGE_SIZE)
 
#define current_ia(x)   __asm__("blr 0,%0\n\tnop" : "=r"(x))
 
#define current_text_addr()   ({ void *pc; current_ia(pc); pc; })
 
#define TASK_SIZE_OF(tsk)   ((tsk)->thread.task_size)
 
#define TASK_SIZE   TASK_SIZE_OF(current)
 
#define TASK_UNMAPPED_BASE   (current->thread.map_base)
 
#define DEFAULT_TASK_SIZE32   (0xFFF00000UL)
 
#define DEFAULT_MAP_BASE32   (0x40000000UL)
 
#define DEFAULT_TASK_SIZE   DEFAULT_TASK_SIZE32
 
#define DEFAULT_MAP_BASE   DEFAULT_MAP_BASE32
 
#define CPU_HVERSION   ((boot_cpu_data.hversion >> 4) & 0x0FFF)
 
#define ARCH_MIN_TASKALIGN   8
 
#define task_pt_regs(tsk)   ((struct pt_regs *)&((tsk)->thread.regs))
 
#define PARISC_UAC_NOPRINT   (1UL << 0) /* see prctl and unaligned.c */
 
#define PARISC_UAC_SIGBUS   (1UL << 1)
 
#define PARISC_KERNEL_DEATH   (1UL << 31) /* see die_if_kernel()... */
 
#define PARISC_UAC_SHIFT   0
 
#define PARISC_UAC_MASK   (PARISC_UAC_NOPRINT|PARISC_UAC_SIGBUS)
 
#define SET_UNALIGN_CTL(task, value)
 
#define GET_UNALIGN_CTL(task, addr)
 
#define INIT_THREAD
 
#define start_thread_som(regs, new_pc, new_sp)
 
#define USER_WIDE_MODE   0
 
#define start_thread(regs, new_pc, new_sp)
 
#define KSTK_EIP(tsk)   ((tsk)->thread.regs.iaoq[0])
 
#define KSTK_ESP(tsk)   ((tsk)->thread.regs.gr[30])
 
#define cpu_relax()   barrier()
 

Typedefs

typedef unsigned int elf_caddr_t
 

Functions

 DECLARE_PER_CPU (struct cpuinfo_parisc, cpu_data)
 
unsigned long thread_saved_pc (struct task_struct *t)
 
void show_trace (struct task_struct *task, unsigned long *stack)
 
void release_thread (struct task_struct *)
 
int kernel_thread (int(*fn)(void *), void *arg, unsigned long flags)
 
void map_hpux_gateway_page (struct task_struct *tsk, struct mm_struct *mm)
 
unsigned long get_wchan (struct task_struct *p)
 

Variables

struct system_cpuinfo_parisc __attribute__
 
struct system_cpuinfo_parisc boot_cpu_data
 

Macro Definition Documentation

#define ARCH_MIN_TASKALIGN   8

Definition at line 121 of file processor.h.

#define CPU_HVERSION   ((boot_cpu_data.hversion >> 4) & 0x0FFF)

Definition at line 115 of file processor.h.

#define cpu_relax (   void)    barrier()

Definition at line 338 of file processor.h.

#define current_ia (   x)    __asm__("blr 0,%0\n\tnop" : "=r"(x))

Definition at line 32 of file processor.h.

#define current_text_addr (   void)    ({ void *pc; current_ia(pc); pc; })

Definition at line 34 of file processor.h.

#define DEFAULT_MAP_BASE   DEFAULT_MAP_BASE32

Definition at line 48 of file processor.h.

#define DEFAULT_MAP_BASE32   (0x40000000UL)

Definition at line 41 of file processor.h.

#define DEFAULT_TASK_SIZE   DEFAULT_TASK_SIZE32

Definition at line 47 of file processor.h.

#define DEFAULT_TASK_SIZE32   (0xFFF00000UL)

Definition at line 40 of file processor.h.

#define GET_UNALIGN_CTL (   task,
  addr 
)
Value:
({ \
put_user(((task)->thread.flags & PARISC_UAC_MASK) \
>> PARISC_UAC_SHIFT, (int __user *) (addr)); \
})

Definition at line 148 of file processor.h.

#define INIT_THREAD
Value:
{ \
.regs = { .gr = { 0, }, \
.fr = { 0, }, \
.sr = { 0, }, \
.iasq = { 0, }, \
.iaoq = { 0, }, \
.cr27 = 0, \
}, \
.task_size = DEFAULT_TASK_SIZE, \
.map_base = DEFAULT_MAP_BASE, \
.flags = 0 \
}

Definition at line 154 of file processor.h.

#define KERNEL_STACK_SIZE   (4*PAGE_SIZE)

Definition at line 23 of file processor.h.

#define KSTK_EIP (   tsk)    ((tsk)->thread.regs.iaoq[0])

Definition at line 335 of file processor.h.

#define KSTK_ESP (   tsk)    ((tsk)->thread.regs.gr[30])

Definition at line 336 of file processor.h.

#define PARISC_KERNEL_DEATH   (1UL << 31) /* see die_if_kernel()... */

Definition at line 135 of file processor.h.

#define PARISC_UAC_MASK   (PARISC_UAC_NOPRINT|PARISC_UAC_SIGBUS)

Definition at line 138 of file processor.h.

#define PARISC_UAC_NOPRINT   (1UL << 0) /* see prctl and unaligned.c */

Definition at line 133 of file processor.h.

#define PARISC_UAC_SHIFT   0

Definition at line 137 of file processor.h.

#define PARISC_UAC_SIGBUS   (1UL << 1)

Definition at line 134 of file processor.h.

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

Definition at line 140 of file processor.h.

#define start_thread (   regs,
  new_pc,
  new_sp 
)
Value:
do { \
elf_addr_t *sp = (elf_addr_t *)new_sp; \
__u32 spaceid = (__u32)current->mm->context; \
elf_addr_t pc = (elf_addr_t)new_pc | 3; \
elf_caddr_t *argv = (elf_caddr_t *)bprm->exec + 1; \
\
regs->iasq[0] = spaceid; \
regs->iasq[1] = spaceid; \
regs->iaoq[0] = pc; \
regs->iaoq[1] = pc + 4; \
regs->sr[3] = 0xffff; \
regs->sr[4] = spaceid; \
regs->sr[5] = spaceid; \
regs->sr[6] = spaceid; \
regs->sr[7] = spaceid; \
regs->gr[ 0] = USER_PSW | (USER_WIDE_MODE ? PSW_W : 0); \
regs->fr[ 0] = 0LL; \
regs->fr[ 1] = 0LL; \
regs->fr[ 2] = 0LL; \
regs->fr[ 3] = 0LL; \
regs->gr[30] = (((unsigned long)sp + 63) &~ 63) | (USER_WIDE_MODE ? 1 : 0); \
regs->gr[31] = pc; \
get_user(regs->gr[25], (argv - 1)); \
regs->gr[24] = (long) argv; \
regs->gr[23] = 0; \
} while(0)

Definition at line 295 of file processor.h.

#define start_thread_som (   regs,
  new_pc,
  new_sp 
)
Value:
do { \
unsigned long *sp = (unsigned long *)new_sp; \
__u32 spaceid = (__u32)current->mm->context; \
unsigned long pc = (unsigned long)new_pc; \
/* offset pc for priv. level */ \
pc |= 3; \
\
regs->iasq[0] = spaceid; \
regs->iasq[1] = spaceid; \
regs->iaoq[0] = pc; \
regs->iaoq[1] = pc + 4; \
regs->sr[3] = 0xffff; \
regs->sr[4] = spaceid; \
regs->sr[5] = spaceid; \
regs->sr[6] = spaceid; \
regs->sr[7] = spaceid; \
regs->gr[ 0] = USER_PSW; \
regs->gr[30] = ((new_sp)+63)&~63; \
regs->gr[31] = pc; \
get_user(regs->gr[26],&sp[0]); \
get_user(regs->gr[25],&sp[-1]); \
get_user(regs->gr[24],&sp[-2]); \
get_user(regs->gr[23],&sp[-3]); \
} while(0)

Definition at line 192 of file processor.h.

#define task_pt_regs (   tsk)    ((struct pt_regs *)&((tsk)->thread.regs))

Definition at line 130 of file processor.h.

#define TASK_SIZE   TASK_SIZE_OF(current)

Definition at line 37 of file processor.h.

#define TASK_SIZE_OF (   tsk)    ((tsk)->thread.task_size)

Definition at line 36 of file processor.h.

#define TASK_UNMAPPED_BASE   (current->thread.map_base)

Definition at line 38 of file processor.h.

#define USER_WIDE_MODE   0

Definition at line 292 of file processor.h.

Typedef Documentation

typedef unsigned int elf_caddr_t

Definition at line 190 of file processor.h.

Function Documentation

DECLARE_PER_CPU ( struct cpuinfo_parisc  ,
cpu_data   
)
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.

void map_hpux_gateway_page ( struct task_struct tsk,
struct mm_struct mm 
)
void release_thread ( struct task_struct )

Definition at line 233 of file process.c.

void show_trace ( struct task_struct task,
unsigned long stack 
)

Definition at line 49 of file traps.c.

unsigned long thread_saved_pc ( struct task_struct t)

Definition at line 404 of file process.c.

Variable Documentation

Definition at line 38 of file setup.c.