Date: Sun, 15 Sep 2002 17:55:55 -0700 (PDT) From: Jonathan Mini <mini@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 17545 for review Message-ID: <200209160055.g8G0ttBt074818@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://people.freebsd.org/~peter/p4db/chv.cgi?CH=17545 Change 17545 by mini@mini_stylus on 2002/09/15 17:55:22 It's _KERNEL, not _KERNEL_. Affected files ... .. //depot/projects/kse/sys/i386/isa/npx.c#21 edit .. //depot/projects/kse/sys/sys/kse.h#20 edit Differences ... ==== //depot/projects/kse/sys/i386/isa/npx.c#21 (text+ko) ==== @@ -563,7 +563,7 @@ register_t savecrit; savecrit = intr_disable(); - if (td == PCPU_GET(fpcurthread)) + if (curthread == PCPU_GET(fpcurthread)) npxsave(&PCPU_GET(curpcb)->pcb_save); intr_restore(savecrit); #ifdef NPX_DEBUG @@ -824,6 +824,9 @@ * and not necessarily for every context switch, but it is too hard to * access foreign pcb's. */ + +static int err_count = 0; + int npxdna() { @@ -833,9 +836,17 @@ if (!npx_exists) return (0); + if (PCPU_GET(fpcurthread) == curthread) { + printf("npxdna: fpcurthread == curthread %d times\n", + ++err_count); + stop_emulating(); + return (1); + } if (PCPU_GET(fpcurthread) != NULL) { - printf("npxdna: fpcurthread = %p, curthread = %p\n", - PCPU_GET(fpcurthread), curthread); + printf("npxdna: fpcurthread = %p (%d), curthread = %p (%d)\n", + PCPU_GET(fpcurthread), + PCPU_GET(fpcurthread)->td_proc->p_pid, + curthread, curthread->td_proc->p_pid); panic("npxdna"); } s = intr_disable(); @@ -951,7 +962,7 @@ } s = intr_disable(); - if (td == PCPU_GET(fpcurthread)) { + if (curthread == PCPU_GET(fpcurthread)) { fpusave(addr); #ifdef CPU_ENABLE_SSE if (!cpu_fxsr) @@ -972,7 +983,7 @@ } /* - * Set the state of the FPU; this must be called with interrupts disabled. + * Set the state of the FPU. */ void npxsetregs(td, addr) @@ -985,7 +996,7 @@ return; s = intr_disable(); - if (td == PCPU_GET(fpcurthread)) { + if (curthread == PCPU_GET(fpcurthread)) { fpurstor(addr); intr_restore(s); } else { ==== //depot/projects/kse/sys/sys/kse.h#20 (text+ko) ==== @@ -74,7 +74,7 @@ int tm_spare[8]; }; -#ifndef _KERNEL_ +#ifndef _KERNEL int kse_exit(void); int kse_wakeup(void); int kse_new(struct kse_mailbox *, int); To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe p4-projects" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200209160055.g8G0ttBt074818>