diff options
Diffstat (limited to 'sys/ia64/include')
-rw-r--r-- | sys/ia64/include/cpu.h | 14 | ||||
-rw-r--r-- | sys/ia64/include/globaldata.h | 17 | ||||
-rw-r--r-- | sys/ia64/include/globals.h | 8 | ||||
-rw-r--r-- | sys/ia64/include/md_var.h | 10 | ||||
-rw-r--r-- | sys/ia64/include/mutex.h | 2 | ||||
-rw-r--r-- | sys/ia64/include/param.h | 6 | ||||
-rw-r--r-- | sys/ia64/include/pcpu.h | 17 | ||||
-rw-r--r-- | sys/ia64/include/proc.h | 8 | ||||
-rw-r--r-- | sys/ia64/include/reg.h | 4 |
9 files changed, 45 insertions, 41 deletions
diff --git a/sys/ia64/include/cpu.h b/sys/ia64/include/cpu.h index 062bebc..d7dfde8 100644 --- a/sys/ia64/include/cpu.h +++ b/sys/ia64/include/cpu.h @@ -52,7 +52,7 @@ #include <machine/frame.h> -#define cpu_getstack(p) ((p)->p_frame->tf_r[FRAME_SP]) +#define cpu_getstack(td) ((td)->td_frame->tf_r[FRAME_SP]) /* * Arguments to hardclock and gatherstats encapsulate the previous @@ -99,7 +99,7 @@ struct clockframe { #ifdef _KERNEL struct pcb; -struct proc; +struct thread; struct reg; struct rpb; struct trapframe; @@ -109,7 +109,6 @@ extern volatile int mc_expected, mc_received; int badaddr __P((void *, size_t)); int badaddr_read __P((void *, size_t, void *)); -void child_return __P((struct proc *p)); u_int64_t console_restart __P((u_int64_t, u_int64_t, u_int64_t)); void do_sir __P((void)); void dumpconf __P((void)); @@ -118,10 +117,10 @@ void frametoreg __P((struct trapframe *, struct reg *)); long fswintrberr __P((void)); /* MAGIC */ int ia64_pa_access __P((u_long)); void ia64_init __P((void)); -void ia64_fpstate_check __P((struct proc *p)); -void ia64_fpstate_save __P((struct proc *p, int write)); -void ia64_fpstate_drop __P((struct proc *p)); -void ia64_fpstate_switch __P((struct proc *p)); +void ia64_fpstate_check __P((struct thread *p)); +void ia64_fpstate_save __P((struct thread *p, int write)); +void ia64_fpstate_drop __P((struct thread *p)); +void ia64_fpstate_switch __P((struct thread *p)); void init_prom_interface __P((struct rpb*)); void interrupt __P((u_int64_t, struct trapframe *)); void machine_check @@ -133,7 +132,6 @@ void regtoframe __P((struct reg *, struct trapframe *)); int savectx __P((struct pcb *)); void restorectx __P((struct pcb *)); void set_iointr __P((void (*)(void *, unsigned long))); -void switch_exit __P((struct proc *)); /* MAGIC */ void fork_trampoline __P((void)); /* MAGIC */ void syscall __P((int, u_int64_t *, struct trapframe *)); void trap __P((int vector, int imm, struct trapframe *framep)); diff --git a/sys/ia64/include/globaldata.h b/sys/ia64/include/globaldata.h index 308086c..50f4990 100644 --- a/sys/ia64/include/globaldata.h +++ b/sys/ia64/include/globaldata.h @@ -44,15 +44,14 @@ * point at the globaldata structure. */ struct globaldata { - struct proc *gd_curproc; /* current process */ - struct proc *gd_idleproc; /* idle process */ - struct proc *gd_fpcurproc; /* fp state owner */ - struct pcb *gd_curpcb; /* current pcb */ - struct timeval gd_switchtime; - int gd_switchticks; - u_int gd_cpuid; /* this cpu number */ - u_int gd_other_cpus; /* all other cpus */ - u_int64_t gd_idlepcbphys; /* pa of gd_idlepcb */ + struct thread *gd_curthread; /* current thread */ + struct thread *gd_idlethread; /* idle thread */ + struct thread *gd_fpcurthread; /* fp state owner */ + struct pcb *gd_curpcb; /* current pcb */ + struct timeval gd_switchtime; + int gd_switchticks; + u_int gd_cpuid; /* this cpu number */ + u_int gd_other_cpus; /* all other cpus */ u_int64_t gd_pending_ipis; /* pending IPI events */ struct pmap *gd_current_pmap; /* which pmap is active */ u_int32_t gd_next_asn; /* next ASN to allocate */ diff --git a/sys/ia64/include/globals.h b/sys/ia64/include/globals.h index 20ca26e..b953cf1 100644 --- a/sys/ia64/include/globals.h +++ b/sys/ia64/include/globals.h @@ -40,9 +40,11 @@ register struct globaldata *globalp __asm__("r13"); #define PCPU_PTR(member) (&GLOBALP->gd_ ## member) #define PCPU_SET(member,value) (GLOBALP->gd_ ## member = (value)) -#define CURPROC PCPU_GET(curproc) -#define CURTHD PCPU_GET(curproc) /* temporary */ -#define curproc PCPU_GET(curproc) +#define curthread PCPU_GET(curthread) +#define CURPROC (curthread->td_proc) +#define curproc (curthread->td_proc) +#define curksegrp (curthread->td_ksegrp) +#define curkse (curthread->td_kse) #endif /* _KERNEL */ diff --git a/sys/ia64/include/md_var.h b/sys/ia64/include/md_var.h index 2154611..789b389 100644 --- a/sys/ia64/include/md_var.h +++ b/sys/ia64/include/md_var.h @@ -39,7 +39,7 @@ extern int szsigcode; extern int Maxmem; struct fpreg; -struct proc; +struct thread; struct reg; void busdma_swi __P((void)); @@ -47,9 +47,9 @@ void cpu_halt __P((void)); void cpu_reset __P((void)); int is_physical_memory __P((vm_offset_t addr)); void swi_vm __P((void *)); -int fill_regs __P((struct proc *, struct reg *)); -int set_regs __P((struct proc *, struct reg *)); -int fill_fpregs __P((struct proc *, struct fpreg *)); -int set_fpregs __P((struct proc *, struct fpreg *)); +int fill_regs __P((struct thread *, struct reg *)); +int set_regs __P((struct thread *, struct reg *)); +int fill_fpregs __P((struct thread *, struct fpreg *)); +int set_fpregs __P((struct thread *, struct fpreg *)); #endif /* !_MACHINE_MD_VAR_H_ */ diff --git a/sys/ia64/include/mutex.h b/sys/ia64/include/mutex.h index 2e7916c..6581d70 100644 --- a/sys/ia64/include/mutex.h +++ b/sys/ia64/include/mutex.h @@ -55,7 +55,7 @@ add rLCK=MTX_LOCK,rLCK ;; \ rsm psr.i ; \ mov ar.ccv=MTX_UNOWNED ; \ - add rNEW=PC_CURPROC,rNEW ;; \ + add rNEW=PC_CURTHREAD,rNEW ;; \ ld8 rNEW=[rNEW] ;; \ 1: cmpxchg8.acq rOLD=[rLCK],rNEW,ar.ccv ;; \ cmp.eq p1,p0=MTX_UNOWNED,rOLD ;; \ diff --git a/sys/ia64/include/param.h b/sys/ia64/include/param.h index 8c8f91d..db87619 100644 --- a/sys/ia64/include/param.h +++ b/sys/ia64/include/param.h @@ -152,8 +152,10 @@ #define SSIZE 1 /* initial stack size/NBPG */ #define SINCR 1 /* increment of stack/NBPG */ -#define UPAGES 4 /* pages of u-area */ -#define USPACE (UPAGES * PAGE_SIZE) /* total size of u-area */ +#define KSTACK_PAGES 4 /* pages of kernel stack */ +#define UAREA_PAGES 1 /* pages of u-area */ + +/* #define KSTACK_GUARD */ /* compile in kstack guard page */ /* * Constants related to network buffer management. diff --git a/sys/ia64/include/pcpu.h b/sys/ia64/include/pcpu.h index 308086c..50f4990 100644 --- a/sys/ia64/include/pcpu.h +++ b/sys/ia64/include/pcpu.h @@ -44,15 +44,14 @@ * point at the globaldata structure. */ struct globaldata { - struct proc *gd_curproc; /* current process */ - struct proc *gd_idleproc; /* idle process */ - struct proc *gd_fpcurproc; /* fp state owner */ - struct pcb *gd_curpcb; /* current pcb */ - struct timeval gd_switchtime; - int gd_switchticks; - u_int gd_cpuid; /* this cpu number */ - u_int gd_other_cpus; /* all other cpus */ - u_int64_t gd_idlepcbphys; /* pa of gd_idlepcb */ + struct thread *gd_curthread; /* current thread */ + struct thread *gd_idlethread; /* idle thread */ + struct thread *gd_fpcurthread; /* fp state owner */ + struct pcb *gd_curpcb; /* current pcb */ + struct timeval gd_switchtime; + int gd_switchticks; + u_int gd_cpuid; /* this cpu number */ + u_int gd_other_cpus; /* all other cpus */ u_int64_t gd_pending_ipis; /* pending IPI events */ struct pmap *gd_current_pmap; /* which pmap is active */ u_int32_t gd_next_asn; /* next ASN to allocate */ diff --git a/sys/ia64/include/proc.h b/sys/ia64/include/proc.h index 9d900f0..aeacc2a 100644 --- a/sys/ia64/include/proc.h +++ b/sys/ia64/include/proc.h @@ -35,9 +35,9 @@ * Machine-dependent part of the proc struct for the Alpha. */ -struct mdproc { +struct mdthread { u_long md_flags; - struct user *md_uservirt; /* virtual address of p_addr */ + void *md_kstackvirt; /* virtual address of td_kstack */ vm_offset_t md_bspstore; /* initial ar.bspstore */ }; @@ -47,3 +47,7 @@ struct mdproc { #define MDP_UAC_SIGBUS 0x0040 /* Deliver SIGBUS upon unaligned access */ #define MDP_UAC_MASK (MDP_UAC_NOPRINT | MDP_UAC_NOFIX | MDP_UAC_SIGBUS) + +struct mdproc { + struct user *md_uservirt; /* virtual address of p_addr */ +}; diff --git a/sys/ia64/include/reg.h b/sys/ia64/include/reg.h index 31a06af..5ac4bfa 100644 --- a/sys/ia64/include/reg.h +++ b/sys/ia64/include/reg.h @@ -54,11 +54,11 @@ struct dbreg { #ifdef _KERNEL -struct proc; +struct thread; void restorehighfp __P((struct ia64_fpreg *)); void savehighfp __P((struct ia64_fpreg *)); -void setregs __P((struct proc *, u_long, u_long, u_long)); +void setregs __P((struct thread *, u_long, u_long, u_long)); #endif #endif /* _MACHINE_REG_H_ */ |