summaryrefslogtreecommitdiffstats
path: root/sys/alpha/include
diff options
context:
space:
mode:
Diffstat (limited to 'sys/alpha/include')
-rw-r--r--sys/alpha/include/cpu.h14
-rw-r--r--sys/alpha/include/fpu.h2
-rw-r--r--sys/alpha/include/globaldata.h18
-rw-r--r--sys/alpha/include/globals.h8
-rw-r--r--sys/alpha/include/md_var.h10
-rw-r--r--sys/alpha/include/mutex.h2
-rw-r--r--sys/alpha/include/param.h6
-rw-r--r--sys/alpha/include/pcpu.h18
-rw-r--r--sys/alpha/include/pmap.h6
-rw-r--r--sys/alpha/include/proc.h5
-rw-r--r--sys/alpha/include/ptrace.h2
-rw-r--r--sys/alpha/include/reg.h2
-rw-r--r--sys/alpha/include/vmparam.h2
13 files changed, 52 insertions, 43 deletions
diff --git a/sys/alpha/include/cpu.h b/sys/alpha/include/cpu.h
index 69ed2ea..e5fd400 100644
--- a/sys/alpha/include/cpu.h
+++ b/sys/alpha/include/cpu.h
@@ -52,7 +52,7 @@
#include <machine/frame.h>
-#define cpu_getstack(p) (alpha_pal_rdusp())
+#define cpu_getstack(td) (alpha_pal_rdusp())
/*
* 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;
@@ -116,10 +116,10 @@ void XentSys __P((u_int64_t, u_int64_t, u_int64_t)); /* MAGIC */
void XentUna __P((u_int64_t, u_int64_t, u_int64_t)); /* MAGIC */
void alpha_init __P((u_long, u_long, u_long, u_long, u_long));
int alpha_pa_access __P((u_long));
-void alpha_fpstate_check __P((struct proc *p));
-void alpha_fpstate_save __P((struct proc *p, int write));
-void alpha_fpstate_drop __P((struct proc *p));
-void alpha_fpstate_switch __P((struct proc *p));
+void alpha_fpstate_check __P((struct thread *p));
+void alpha_fpstate_save __P((struct thread *p, int write));
+void alpha_fpstate_drop __P((struct thread *p));
+void alpha_fpstate_switch __P((struct thread *p));
int badaddr __P((void *, size_t));
int badaddr_read __P((void *, size_t, void *));
u_int64_t console_restart __P((u_int64_t, u_int64_t, u_int64_t));
@@ -138,7 +138,7 @@ void regdump __P((struct trapframe *));
void regtoframe __P((struct reg *, struct trapframe *));
void savectx __P((struct pcb *));
void set_iointr __P((void (*)(void *, unsigned long)));
-void switch_exit __P((struct proc *)); /* MAGIC */
+void switch_exit __P((struct thread *)); /* MAGIC */
void fork_trampoline __P((void)); /* MAGIC */
void syscall __P((u_int64_t, struct trapframe *));
void trap __P((unsigned long, unsigned long, unsigned long, unsigned long,
diff --git a/sys/alpha/include/fpu.h b/sys/alpha/include/fpu.h
index 250db28..712a1f9 100644
--- a/sys/alpha/include/fpu.h
+++ b/sys/alpha/include/fpu.h
@@ -117,7 +117,7 @@
#ifdef _KERNEL
-extern int fp_software_completion(u_int64_t regmask, struct proc *p);
+extern int fp_software_completion(u_int64_t regmask, struct thread *p);
#endif
diff --git a/sys/alpha/include/globaldata.h b/sys/alpha/include/globaldata.h
index d577fee..5d8514b 100644
--- a/sys/alpha/include/globaldata.h
+++ b/sys/alpha/include/globaldata.h
@@ -44,15 +44,15 @@
* point at the globaldata structure.
*/
struct globaldata {
- struct alpha_pcb gd_idlepcb; /* pcb for idling */
- 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 */
+ struct alpha_pcb gd_idlepcb; /* pcb for idling */
+ 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_idlepcbphys; /* pa of gd_idlepcb */
u_int64_t gd_pending_ipis; /* pending IPI events */
u_int32_t gd_next_asn; /* next ASN to allocate */
diff --git a/sys/alpha/include/globals.h b/sys/alpha/include/globals.h
index 313541b..46dab32 100644
--- a/sys/alpha/include/globals.h
+++ b/sys/alpha/include/globals.h
@@ -40,9 +40,11 @@ register struct globaldata *globalp __asm__("$8");
#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/alpha/include/md_var.h b/sys/alpha/include/md_var.h
index 41512d7..b4fdfe4 100644
--- a/sys/alpha/include/md_var.h
+++ b/sys/alpha/include/md_var.h
@@ -40,7 +40,7 @@ extern int Maxmem;
extern int busdma_swi_pending;
struct fpreg;
-struct proc;
+struct thread;
struct reg;
struct cam_sim;
struct pcicfg;
@@ -50,10 +50,10 @@ 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 *));
void alpha_register_pci_scsi __P((int bus, int slot, struct cam_sim *sim));
#ifdef _SYS_BUS_H_
struct resource *alpha_platform_alloc_ide_intr(int chan);
diff --git a/sys/alpha/include/mutex.h b/sys/alpha/include/mutex.h
index c141d6f..9192bb2 100644
--- a/sys/alpha/include/mutex.h
+++ b/sys/alpha/include/mutex.h
@@ -58,7 +58,7 @@ extern struct mtx clock_lock;
1: ldq_l a0, lck+MTX_LOCK; \
cmpeq a0, MTX_UNOWNED, a1; \
beq a1, 1b; \
- ldq a0, PC_CURPROC(globalp); \
+ ldq a0, PC_CURTHREAD(globalp); \
stq_c a0, lck+MTX_LOCK; \
beq a0, 1b; \
mb; \
diff --git a/sys/alpha/include/param.h b/sys/alpha/include/param.h
index 0a0206e..91dabba 100644
--- a/sys/alpha/include/param.h
+++ b/sys/alpha/include/param.h
@@ -133,8 +133,10 @@
#define SSIZE 1 /* initial stack size/NBPG */
#define SINCR 1 /* increment of stack/NBPG */
-#define UPAGES 2 /* pages of u-area */
-#define USPACE (UPAGES * PAGE_SIZE) /* total size of u-area */
+#define KSTACK_PAGES 2 /* pages of kstack (with pcb) */
+#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/alpha/include/pcpu.h b/sys/alpha/include/pcpu.h
index d577fee..5d8514b 100644
--- a/sys/alpha/include/pcpu.h
+++ b/sys/alpha/include/pcpu.h
@@ -44,15 +44,15 @@
* point at the globaldata structure.
*/
struct globaldata {
- struct alpha_pcb gd_idlepcb; /* pcb for idling */
- 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 */
+ struct alpha_pcb gd_idlepcb; /* pcb for idling */
+ 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_idlepcbphys; /* pa of gd_idlepcb */
u_int64_t gd_pending_ipis; /* pending IPI events */
u_int32_t gd_next_asn; /* next ASN to allocate */
diff --git a/sys/alpha/include/pmap.h b/sys/alpha/include/pmap.h
index 055ea36..959805e 100644
--- a/sys/alpha/include/pmap.h
+++ b/sys/alpha/include/pmap.h
@@ -220,6 +220,8 @@ extern char *ptvmmap; /* poor name! */
extern vm_offset_t virtual_avail;
extern vm_offset_t virtual_end;
+struct vmspace;
+
vm_offset_t pmap_steal_memory __P((vm_size_t));
void pmap_bootstrap __P((vm_offset_t, u_int));
void pmap_setdevram __P((unsigned long long basea, vm_offset_t sizea));
@@ -230,8 +232,8 @@ unsigned *pmap_pte __P((pmap_t, vm_offset_t)) __pure2;
vm_page_t pmap_use_pt __P((pmap_t, vm_offset_t));
void pmap_set_opt __P((unsigned *));
void pmap_set_opt_bsp __P((void));
-void pmap_deactivate __P((struct proc *p));
-void pmap_emulate_reference __P((struct proc *p, vm_offset_t v, int user, int write));
+void pmap_deactivate __P((struct thread *td));
+void pmap_emulate_reference __P((struct vmspace *vm, vm_offset_t v, int user, int write));
#endif /* _KERNEL */
diff --git a/sys/alpha/include/proc.h b/sys/alpha/include/proc.h
index b3f98f6..16cf1d5 100644
--- a/sys/alpha/include/proc.h
+++ b/sys/alpha/include/proc.h
@@ -43,7 +43,7 @@ struct mdbpt {
u_int32_t contents;
};
-struct mdproc {
+struct mdthread {
u_long md_flags;
struct pcb *md_pcbpaddr; /* phys addr of the pcb */
struct mdbpt md_sstep[2]; /* two single step breakpoints */
@@ -62,4 +62,7 @@ struct mdproc {
unaligned access */
#define MDP_UAC_MASK (MDP_UAC_NOPRINT | MDP_UAC_NOFIX | MDP_UAC_SIGBUS)
+struct mdproc {
+};
+
#endif /* !_MACHINE_PROC_H_ */
diff --git a/sys/alpha/include/ptrace.h b/sys/alpha/include/ptrace.h
index 5a9cf14..87a03af 100644
--- a/sys/alpha/include/ptrace.h
+++ b/sys/alpha/include/ptrace.h
@@ -48,7 +48,7 @@
#define FIX_SSTEP(p) ptrace_clear_single_step(p)
#ifdef _KERNEL
-int ptrace_clear_single_step(struct proc *_p);
+int ptrace_clear_single_step(struct thread *_p);
#endif
#endif
diff --git a/sys/alpha/include/reg.h b/sys/alpha/include/reg.h
index 5dfde65..b4a73f3 100644
--- a/sys/alpha/include/reg.h
+++ b/sys/alpha/include/reg.h
@@ -110,7 +110,7 @@ struct dbreg {
#ifdef _KERNEL
void restorefpstate __P((struct fpreg *));
void savefpstate __P((struct 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 /* _ALPHA_REG_H_ */
diff --git a/sys/alpha/include/vmparam.h b/sys/alpha/include/vmparam.h
index bd08553..29dcc99 100644
--- a/sys/alpha/include/vmparam.h
+++ b/sys/alpha/include/vmparam.h
@@ -62,7 +62,7 @@
* with a 32bit value. OSF1 manages to have a variable location for
* the user stack which we should probably also support.
*/
-#define USRSTACK (0x12000000LL - (UPAGES*PAGE_SIZE))
+#define USRSTACK (0x12000000LL)
/*
* Virtual memory related constants, all in bytes
OpenPOWER on IntegriCloud