diff options
Diffstat (limited to 'sys/i386')
-rw-r--r-- | sys/i386/i386/exception.s | 4 | ||||
-rw-r--r-- | sys/i386/i386/genassym.c | 5 | ||||
-rw-r--r-- | sys/i386/i386/globals.s | 5 | ||||
-rw-r--r-- | sys/i386/i386/machdep.c | 13 | ||||
-rw-r--r-- | sys/i386/i386/swtch.s | 6 | ||||
-rw-r--r-- | sys/i386/i386/tsc.c | 6 | ||||
-rw-r--r-- | sys/i386/include/globaldata.h | 3 | ||||
-rw-r--r-- | sys/i386/include/pcpu.h | 3 | ||||
-rw-r--r-- | sys/i386/isa/clock.c | 6 |
9 files changed, 25 insertions, 26 deletions
diff --git a/sys/i386/i386/exception.s b/sys/i386/i386/exception.s index 569d6c0..9802230 100644 --- a/sys/i386/i386/exception.s +++ b/sys/i386/i386/exception.s @@ -30,7 +30,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: exception.s,v 1.51 1998/04/17 22:36:27 des Exp $ + * $Id: exception.s,v 1.52 1998/05/17 11:51:53 phk Exp $ */ #include "npx.h" @@ -344,7 +344,7 @@ IDTVEC(int0x80_syscall) ENTRY(fork_trampoline) call _spl0 movl _curproc,%eax - addl $P_RUNTIME,%eax + addl $P_SWITCHTIME,%eax pushl %eax call _microuptime popl %eax diff --git a/sys/i386/i386/genassym.c b/sys/i386/i386/genassym.c index 771cab8..ee082a8 100644 --- a/sys/i386/i386/genassym.c +++ b/sys/i386/i386/genassym.c @@ -34,7 +34,7 @@ * SUCH DAMAGE. * * from: @(#)genassym.c 5.11 (Berkeley) 5/10/91 - * $Id: genassym.c,v 1.56 1998/05/17 22:12:07 tegge Exp $ + * $Id: genassym.c,v 1.57 1998/05/17 23:08:03 tegge Exp $ */ #include "opt_vm86.h" @@ -106,7 +106,7 @@ main() printf("#define\tP_WCHAN %p\n", &p->p_wchan); printf("#define\tP_FLAG %p\n", &p->p_flag); printf("#define\tP_PID %p\n", &p->p_pid); - printf("#define\tP_RUNTIME %p\n", &p->p_runtime); + printf("#define\tP_SWITCHTIME %p\n", &p->p_switchtime); #ifdef SMP printf("#define\tP_ONCPU %p\n", &p->p_oncpu); printf("#define\tP_LASTCPU %p\n", &p->p_lastcpu); @@ -208,6 +208,7 @@ main() printf("#define\tGD_NPXPROC %d\n", &globaldata->npxproc); printf("#define\tGD_CURPCB %d\n", &globaldata->curpcb); printf("#define\tGD_COMMON_TSS %d\n", &globaldata->common_tss); + printf("#define\tGD_SWITCHTIME %d\n", &globaldata->switchtime); #ifdef VM86 printf("#define\tGD_COMMON_TSSD %d\n", &globaldata->common_tssd); printf("#define\tGD_PRIVATE_TSS %d\n", &globaldata->private_tss); diff --git a/sys/i386/i386/globals.s b/sys/i386/i386/globals.s index 871bb67..a183a2a 100644 --- a/sys/i386/i386/globals.s +++ b/sys/i386/i386/globals.s @@ -23,7 +23,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: globals.s,v 1.3 1998/05/17 18:53:19 tegge Exp $ + * $Id: globals.s,v 1.4 1998/05/17 23:08:03 tegge Exp $ */ #include "opt_vm86.h" @@ -68,11 +68,12 @@ globaldata: .space GD_SIZEOF /* in data segment */ #endif - .globl _curproc,_curpcb,_npxproc,_common_tss + .globl _curproc,_curpcb,_npxproc,_common_tss,_switchtime .set _curproc,globaldata + GD_CURPROC .set _curpcb,globaldata + GD_CURPCB .set _npxproc,globaldata + GD_NPXPROC .set _common_tss,globaldata + GD_COMMON_TSS + .set _switchtime,globaldata + GD_SWITCHTIME #ifdef VM86 .globl _common_tssd,_private_tss,_my_tr diff --git a/sys/i386/i386/machdep.c b/sys/i386/i386/machdep.c index 9ffd017..dbfa555 100644 --- a/sys/i386/i386/machdep.c +++ b/sys/i386/i386/machdep.c @@ -35,7 +35,7 @@ * SUCH DAMAGE. * * from: @(#)machdep.c 7.4 (Berkeley) 6/3/91 - * $Id: machdep.c,v 1.295 1998/05/19 00:00:09 tegge Exp $ + * $Id: machdep.c,v 1.296 1998/05/19 08:58:46 phk Exp $ */ #include "apm.h" @@ -146,7 +146,6 @@ int bouncepages = 0; #endif #endif /* BOUNCE_BUFFERS */ -int msgbufmapped = 0; /* set when safe to use msgbuf */ int _udatasel, _ucodesel; u_int atdevbase; @@ -1525,15 +1524,7 @@ init386(first) pmap_enter(kernel_pmap, (vm_offset_t)msgbufp + off, avail_end + off, VM_PROT_ALL, TRUE); - cp = (char *)msgbufp; - msgbufp = (struct msgbuf *) (cp + MSGBUF_SIZE - sizeof(*msgbufp)); - if (msgbufp->msg_magic != MSG_MAGIC || msgbufp->msg_ptr != cp) { - bzero(cp, MSGBUF_SIZE); - msgbufp->msg_magic = MSG_MAGIC; - msgbufp->msg_size = (char *)msgbufp - cp; - msgbufp->msg_ptr = cp; - } - msgbufmapped = 1; + msgbufinit(msgbufp, MSGBUF_SIZE); /* make a call gate to reenter kernel with */ gdp = &ldt[LSYS5CALLS_SEL].gd; diff --git a/sys/i386/i386/swtch.s b/sys/i386/i386/swtch.s index 5641ee9..e952f68 100644 --- a/sys/i386/i386/swtch.s +++ b/sys/i386/i386/swtch.s @@ -33,7 +33,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: swtch.s,v 1.72 1998/05/12 18:37:10 dyson Exp $ + * $Id: swtch.s,v 1.73 1998/05/19 20:59:07 dufault Exp $ */ #include "npx.h" @@ -251,6 +251,10 @@ rem3id: .asciz "remrq.id" */ ALIGN_TEXT _idle: + xorl %eax,%eax + movl %eax, _switchtime + movl %eax, _switchtime+4 + #ifdef SMP /* when called, we have the mplock, intr disabled */ diff --git a/sys/i386/i386/tsc.c b/sys/i386/i386/tsc.c index 315e61a..671a3be 100644 --- a/sys/i386/i386/tsc.c +++ b/sys/i386/i386/tsc.c @@ -34,7 +34,7 @@ * SUCH DAMAGE. * * from: @(#)clock.c 7.2 (Berkeley) 5/12/91 - * $Id: clock.c,v 1.119 1998/04/05 01:04:48 tegge Exp $ + * $Id: clock.c,v 1.120 1998/05/19 18:48:30 phk Exp $ */ /* @@ -1129,7 +1129,7 @@ sysctl_machdep_tsc_freq SYSCTL_HANDLER_ARGS SYSCTL_PROC(_machdep, OID_AUTO, tsc_freq, CTLTYPE_INT | CTLFLAG_RW, 0, sizeof(u_int), sysctl_machdep_tsc_freq, "I", ""); -static u_int +static unsigned i8254_get_timecount(void) { u_int count; @@ -1158,7 +1158,7 @@ i8254_get_timecount(void) return (count); } -static u_int +static unsigned tsc_get_timecount(void) { return (rdtsc()); diff --git a/sys/i386/include/globaldata.h b/sys/i386/include/globaldata.h index af8e806..c6c5a17 100644 --- a/sys/i386/include/globaldata.h +++ b/sys/i386/include/globaldata.h @@ -23,7 +23,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: globaldata.h,v 1.3 1998/05/17 18:53:07 tegge Exp $ + * $Id: globaldata.h,v 1.4 1998/05/17 23:08:02 tegge Exp $ */ /* @@ -43,6 +43,7 @@ struct globaldata { struct proc *npxproc; struct pcb *curpcb; struct i386tss common_tss; + struct timeval switchtime; #ifdef VM86 struct segment_descriptor common_tssd; u_int private_tss; diff --git a/sys/i386/include/pcpu.h b/sys/i386/include/pcpu.h index af8e806..c6c5a17 100644 --- a/sys/i386/include/pcpu.h +++ b/sys/i386/include/pcpu.h @@ -23,7 +23,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: globaldata.h,v 1.3 1998/05/17 18:53:07 tegge Exp $ + * $Id: globaldata.h,v 1.4 1998/05/17 23:08:02 tegge Exp $ */ /* @@ -43,6 +43,7 @@ struct globaldata { struct proc *npxproc; struct pcb *curpcb; struct i386tss common_tss; + struct timeval switchtime; #ifdef VM86 struct segment_descriptor common_tssd; u_int private_tss; diff --git a/sys/i386/isa/clock.c b/sys/i386/isa/clock.c index 315e61a..671a3be 100644 --- a/sys/i386/isa/clock.c +++ b/sys/i386/isa/clock.c @@ -34,7 +34,7 @@ * SUCH DAMAGE. * * from: @(#)clock.c 7.2 (Berkeley) 5/12/91 - * $Id: clock.c,v 1.119 1998/04/05 01:04:48 tegge Exp $ + * $Id: clock.c,v 1.120 1998/05/19 18:48:30 phk Exp $ */ /* @@ -1129,7 +1129,7 @@ sysctl_machdep_tsc_freq SYSCTL_HANDLER_ARGS SYSCTL_PROC(_machdep, OID_AUTO, tsc_freq, CTLTYPE_INT | CTLFLAG_RW, 0, sizeof(u_int), sysctl_machdep_tsc_freq, "I", ""); -static u_int +static unsigned i8254_get_timecount(void) { u_int count; @@ -1158,7 +1158,7 @@ i8254_get_timecount(void) return (count); } -static u_int +static unsigned tsc_get_timecount(void) { return (rdtsc()); |