summaryrefslogtreecommitdiffstats
path: root/sys/amd64/include
diff options
context:
space:
mode:
Diffstat (limited to 'sys/amd64/include')
-rw-r--r--sys/amd64/include/cpu.h4
-rw-r--r--sys/amd64/include/fpu.h2
-rw-r--r--sys/amd64/include/md_var.h8
-rw-r--r--sys/amd64/include/mptable.h18
-rw-r--r--sys/amd64/include/mutex.h2
-rw-r--r--sys/amd64/include/npx.h2
-rw-r--r--sys/amd64/include/pcb_ext.h2
-rw-r--r--sys/amd64/include/pcpu.h26
-rw-r--r--sys/amd64/include/proc.h3
-rw-r--r--sys/amd64/include/reg.h8
10 files changed, 39 insertions, 36 deletions
diff --git a/sys/amd64/include/cpu.h b/sys/amd64/include/cpu.h
index 04ef7a0..a7783a0 100644
--- a/sys/amd64/include/cpu.h
+++ b/sys/amd64/include/cpu.h
@@ -56,8 +56,8 @@
#define cpu_exec(p) /* nothing */
#define cpu_swapin(p) /* nothing */
-#define cpu_getstack(p) ((p)->p_frame->tf_esp)
-#define cpu_setstack(p, ap) ((p)->p_frame->tf_esp = (ap))
+#define cpu_getstack(td) ((td)->td_frame->tf_esp)
+#define cpu_setstack(td, ap) ((td)->td_frame->tf_esp = (ap))
#define TRAPF_USERMODE(framep) \
((ISPL((framep)->tf_cs) == SEL_UPL) || ((framep)->tf_eflags & PSL_VM))
diff --git a/sys/amd64/include/fpu.h b/sys/amd64/include/fpu.h
index 67ce661..589a4be 100644
--- a/sys/amd64/include/fpu.h
+++ b/sys/amd64/include/fpu.h
@@ -142,7 +142,7 @@ union savefpu {
#ifdef _KERNEL
int npxdna __P((void));
-void npxexit __P((struct proc *p));
+void npxexit __P((struct thread *td));
void npxinit __P((int control));
void npxsave __P((union savefpu *addr));
int npxtrap __P((void));
diff --git a/sys/amd64/include/md_var.h b/sys/amd64/include/md_var.h
index bc9cb75..c3564c2 100644
--- a/sys/amd64/include/md_var.h
+++ b/sys/amd64/include/md_var.h
@@ -61,7 +61,7 @@ extern char sigcode[];
extern int szsigcode, szosigcode;
typedef void alias_for_inthand_t __P((u_int cs, u_int ef, u_int esp, u_int ss));
-struct proc;
+struct thread;
struct reg;
struct fpreg;
struct dbreg;
@@ -80,9 +80,9 @@ void doreti_popl_es __P((void)) __asm(__STRING(doreti_popl_es));
void doreti_popl_es_fault __P((void)) __asm(__STRING(doreti_popl_es_fault));
void doreti_popl_fs __P((void)) __asm(__STRING(doreti_popl_fs));
void doreti_popl_fs_fault __P((void)) __asm(__STRING(doreti_popl_fs_fault));
-int fill_fpregs __P((struct proc *, struct fpreg *));
-int fill_regs __P((struct proc *p, struct reg *regs));
-int fill_dbregs __P((struct proc *p, struct dbreg *dbregs));
+int fill_fpregs __P((struct thread *, struct fpreg *));
+int fill_regs __P((struct thread *p, struct reg *regs));
+int fill_dbregs __P((struct thread *p, struct dbreg *dbregs));
void fillw __P((int /*u_short*/ pat, void *base, size_t cnt));
void i486_bzero __P((void *buf, size_t len));
void i586_bcopy __P((const void *from, void *to, size_t len));
diff --git a/sys/amd64/include/mptable.h b/sys/amd64/include/mptable.h
index d912e0c..f558524 100644
--- a/sys/amd64/include/mptable.h
+++ b/sys/amd64/include/mptable.h
@@ -26,7 +26,7 @@
*/
#include "opt_cpu.h"
-#include "opt_upages.h"
+#include "opt_kstack_pages.h"
#ifdef SMP
#include <machine/smptests.h>
@@ -1960,8 +1960,8 @@ start_all_aps(u_int boot_addr)
SMPpt[pg] = (pt_entry_t)(PG_V | PG_RW | vtophys(gd));
/* allocate and set up an idle stack data page */
- stack = (char *)kmem_alloc(kernel_map, UPAGES*PAGE_SIZE);
- for (i = 0; i < UPAGES; i++)
+ stack = (char *)kmem_alloc(kernel_map, KSTACK_PAGES * PAGE_SIZE); /* XXXKSE */
+ for (i = 0; i < KSTACK_PAGES; i++)
SMPpt[pg + 1 + i] = (pt_entry_t)
(PG_V | PG_RW | vtophys(PAGE_SIZE * i + stack));
@@ -1977,7 +1977,7 @@ start_all_aps(u_int boot_addr)
outb(CMOS_DATA, BIOS_WARM); /* 'warm-start' */
#endif
- bootSTK = &SMP_prvspace[x].idlestack[UPAGES*PAGE_SIZE];
+ bootSTK = &SMP_prvspace[x].idlekstack[KSTACK_PAGES * PAGE_SIZE];
bootAP = x;
/* attempt to start the Application Processor */
@@ -2019,8 +2019,8 @@ start_all_aps(u_int boot_addr)
*/
/* Allocate and setup BSP idle stack */
- stack = (char *)kmem_alloc(kernel_map, UPAGES * PAGE_SIZE);
- for (i = 0; i < UPAGES; i++)
+ stack = (char *)kmem_alloc(kernel_map, KSTACK_PAGES * PAGE_SIZE);
+ for (i = 0; i < KSTACK_PAGES; i++)
SMPpt[1 + i] = (pt_entry_t)
(PG_V | PG_RW | vtophys(PAGE_SIZE * i + stack));
@@ -2241,7 +2241,7 @@ ap_init(void)
* Set curproc to our per-cpu idleproc so that mutexes have
* something unique to lock with.
*/
- PCPU_SET(curproc, PCPU_GET(idleproc));
+ PCPU_SET(curthread, PCPU_GET(idlethread));
PCPU_SET(spinlocks, NULL);
/* lock against other AP's that are waking up */
@@ -2323,7 +2323,7 @@ forwarded_statclock(struct trapframe frame)
{
mtx_lock_spin(&sched_lock);
- statclock_process(curproc, TRAPF_PC(&frame), TRAPF_USERMODE(&frame));
+ statclock_process(curthread->td_kse, TRAPF_PC(&frame), TRAPF_USERMODE(&frame));
mtx_unlock_spin(&sched_lock);
}
@@ -2354,7 +2354,7 @@ forwarded_hardclock(struct trapframe frame)
{
mtx_lock_spin(&sched_lock);
- hardclock_process(curproc, TRAPF_USERMODE(&frame));
+ hardclock_process(curthread, TRAPF_USERMODE(&frame));
mtx_unlock_spin(&sched_lock);
}
diff --git a/sys/amd64/include/mutex.h b/sys/amd64/include/mutex.h
index b0fe512..ae37b23 100644
--- a/sys/amd64/include/mutex.h
+++ b/sys/amd64/include/mutex.h
@@ -250,7 +250,7 @@ extern struct mtx clock_lock;
pushl %ecx ; \
pushl %ebx ; \
movl $(MTX_UNOWNED) , %eax ; \
- movl PCPU(CURPROC), %ebx ; \
+ movl PCPU(CURTHREAD), %ebx ; \
pushfl ; \
popl %ecx ; \
cli ; \
diff --git a/sys/amd64/include/npx.h b/sys/amd64/include/npx.h
index 67ce661..589a4be 100644
--- a/sys/amd64/include/npx.h
+++ b/sys/amd64/include/npx.h
@@ -142,7 +142,7 @@ union savefpu {
#ifdef _KERNEL
int npxdna __P((void));
-void npxexit __P((struct proc *p));
+void npxexit __P((struct thread *td));
void npxinit __P((int control));
void npxsave __P((union savefpu *addr));
int npxtrap __P((void));
diff --git a/sys/amd64/include/pcb_ext.h b/sys/amd64/include/pcb_ext.h
index 7d6fb08..c6f9fc0 100644
--- a/sys/amd64/include/pcb_ext.h
+++ b/sys/amd64/include/pcb_ext.h
@@ -53,7 +53,7 @@ struct pcb_ldt {
#ifdef _KERNEL
-int i386_extend_pcb __P((struct proc *));
+int i386_extend_pcb __P((struct thread *));
void set_user_ldt __P((struct pcb *));
struct pcb_ldt *user_ldt_alloc __P((struct pcb *, int));
void user_ldt_free __P((struct pcb *));
diff --git a/sys/amd64/include/pcpu.h b/sys/amd64/include/pcpu.h
index 37388aa..f02354d 100644
--- a/sys/amd64/include/pcpu.h
+++ b/sys/amd64/include/pcpu.h
@@ -52,19 +52,19 @@
* other processors"
*/
struct globaldata {
- struct globaldata *gd_prvspace; /* self-reference */
- struct proc *gd_curproc; /* current process */
- struct proc *gd_idleproc; /* idle process */
- struct proc *gd_npxproc;
- struct pcb *gd_curpcb; /* current pcb */
- struct timeval gd_switchtime;
- struct i386tss gd_common_tss;
- int gd_switchticks;
- struct segment_descriptor gd_common_tssd;
- struct segment_descriptor *gd_tss_gdt;
- int gd_currentldt;
- u_int gd_cpuid; /* this cpu number */
- u_int gd_other_cpus; /* all other cpus */
+ struct globaldata *gd_prvspace; /* self-reference */
+ struct thread *gd_curthread;
+ struct thread *gd_npxthread;
+ struct pcb *gd_curpcb;
+ struct thread *gd_idlethread;
+ struct timeval gd_switchtime;
+ struct i386tss gd_common_tss;
+ int gd_switchticks;
+ struct segment_descriptor gd_common_tssd;
+ struct segment_descriptor *gd_tss_gdt;
+ int gd_currentldt;
+ u_int gd_cpuid;
+ u_int gd_other_cpus;
SLIST_ENTRY(globaldata) gd_allcpu;
struct lock_list_entry *gd_spinlocks;
#ifdef KTR_PERCPU
diff --git a/sys/amd64/include/proc.h b/sys/amd64/include/proc.h
index 4217c4f..9e9e449 100644
--- a/sys/amd64/include/proc.h
+++ b/sys/amd64/include/proc.h
@@ -42,6 +42,9 @@
/*
* Machine-dependent part of the proc structure for i386.
*/
+struct mdthread {
+};
+
struct mdproc {
};
diff --git a/sys/amd64/include/reg.h b/sys/amd64/include/reg.h
index 47856a3..f4c6ae5 100644
--- a/sys/amd64/include/reg.h
+++ b/sys/amd64/include/reg.h
@@ -143,10 +143,10 @@ struct dbreg {
/*
* XXX these interfaces are MI, so they should be declared in a MI place.
*/
-int set_fpregs __P((struct proc *, struct fpreg *));
-int set_regs __P((struct proc *p, struct reg *regs));
-void setregs __P((struct proc *, u_long, u_long, u_long));
-int set_dbregs __P((struct proc *p, struct dbreg *dbregs));
+int set_fpregs __P((struct thread *, struct fpreg *));
+int set_regs __P((struct thread *p, struct reg *regs));
+void setregs __P((struct thread *, u_long, u_long, u_long));
+int set_dbregs __P((struct thread *p, struct dbreg *dbregs));
#endif
#endif /* !_MACHINE_REG_H_ */
OpenPOWER on IntegriCloud