diff options
author | Niklas Hallqvist <niklas@cvs.openbsd.org> | 2004-06-13 21:49:30 +0000 |
---|---|---|
committer | Niklas Hallqvist <niklas@cvs.openbsd.org> | 2004-06-13 21:49:30 +0000 |
commit | 2dd254afa61a7c0cc5ae920b463d3d4266852804 (patch) | |
tree | 7adbebef3be24ba910fd83ee1ba09e1577ae21a8 /sys/arch/sparc64 | |
parent | 4d62e331dcde739b4067d712dd602c0927ce11b3 (diff) |
debranch SMP, have fun
Diffstat (limited to 'sys/arch/sparc64')
-rw-r--r-- | sys/arch/sparc64/include/cpu.h | 32 | ||||
-rw-r--r-- | sys/arch/sparc64/sparc64/genassym.cf | 1 | ||||
-rw-r--r-- | sys/arch/sparc64/sparc64/locore.s | 4 |
3 files changed, 5 insertions, 32 deletions
diff --git a/sys/arch/sparc64/include/cpu.h b/sys/arch/sparc64/include/cpu.h index 9d73cd48b84..278f7a3031b 100644 --- a/sys/arch/sparc64/include/cpu.h +++ b/sys/arch/sparc64/include/cpu.h @@ -1,4 +1,4 @@ -/* $OpenBSD: cpu.h,v 1.24 2003/07/10 15:26:54 jason Exp $ */ +/* $OpenBSD: cpu.h,v 1.25 2004/06/13 21:49:20 niklas Exp $ */ /* $NetBSD: cpu.h,v 1.28 2001/06/14 22:56:58 thorpej Exp $ */ /* @@ -75,33 +75,7 @@ #include <machine/reg.h> #include <machine/intr.h> -/*#include <sys/sched.h> */ - -/* - * CPU states. - * XXX Not really scheduler state, but no other good place to put - * it right now, and it really is per-CPU. - */ -#define CP_USER 0 -#define CP_NICE 1 -#define CP_SYS 2 -#define CP_INTR 3 -#define CP_IDLE 4 -#define CPUSTATES 5 - -/* - * Per-CPU scheduler state. - */ -struct schedstate_percpu { - struct timeval spc_runtime; /* time curproc started running */ - __volatile int spc_flags; /* flags; see below */ - u_int spc_schedticks; /* ticks for schedclock() */ - u_int64_t spc_cp_time[CPUSTATES]; /* CPU state statistics */ - u_char spc_curpriority; /* usrpri of curproc */ - int spc_rrticks; /* ticks until roundrobin() */ - int spc_pscnt; /* prof/stat counter */ - int spc_psdiv; /* prof/stat divisor */ -}; +#include <sys/proc.h> /* * The cpu_info structure is part of a 64KB structure mapped both the kernel @@ -203,7 +177,7 @@ extern int want_ast; * or after the current trap/syscall if in system mode. */ extern int want_resched; /* resched() was called */ -#define need_resched() (want_resched = 1, want_ast = 1) +#define need_resched(ci) (want_resched = 1, want_ast = 1) /* * Give a profiling tick to the current process when the user profiling diff --git a/sys/arch/sparc64/sparc64/genassym.cf b/sys/arch/sparc64/sparc64/genassym.cf index f2c55d313b1..cde690d07d1 100644 --- a/sys/arch/sparc64/sparc64/genassym.cf +++ b/sys/arch/sparc64/sparc64/genassym.cf @@ -132,6 +132,7 @@ member p_pid member P_FPSTATE p_md.md_fpstate export SRUN +export SONPROC # user structure fields define USIZ sizeof(struct user) diff --git a/sys/arch/sparc64/sparc64/locore.s b/sys/arch/sparc64/sparc64/locore.s index 2705d2b30cc..b6fdf4746aa 100644 --- a/sys/arch/sparc64/sparc64/locore.s +++ b/sys/arch/sparc64/sparc64/locore.s @@ -1,4 +1,4 @@ -/* $OpenBSD: locore.s,v 1.44 2004/04/23 04:18:17 marc Exp $ */ +/* $OpenBSD: locore.s,v 1.45 2004/06/13 21:49:21 niklas Exp $ */ /* $NetBSD: locore.s,v 1.137 2001/08/13 06:10:10 jdolecek Exp $ */ /* @@ -5879,10 +5879,8 @@ Lsw_scan: * p->p_cpu = curcpu(); */ #endif /* defined(MULTIPROCESSOR) */ -#ifdef notyet mov SONPROC, %o0 ! p->p_stat = SONPROC stb %o0, [%l3 + P_STAT] -#endif /* notyet */ sethi %hi(_C_LABEL(want_resched)), %o0 st %g0, [%o0 + %lo(_C_LABEL(want_resched))] ! want_resched = 0; ldx [%l3 + P_ADDR], %l1 ! newpcb = p->p_addr; |