From owner-p4-projects Sun Sep 15 17:55:59 2002 Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 62C1437B401; Sun, 15 Sep 2002 17:55:56 -0700 (PDT) Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 0E49D37B400 for ; Sun, 15 Sep 2002 17:55:56 -0700 (PDT) Received: from freefall.freebsd.org (freefall.FreeBSD.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id A5FAB43E6A for ; Sun, 15 Sep 2002 17:55:55 -0700 (PDT) (envelope-from mini@freebsd.org) Received: from freefall.freebsd.org (perforce@localhost [127.0.0.1]) by freefall.freebsd.org (8.12.4/8.12.4) with ESMTP id g8G0ttJU074821 for ; Sun, 15 Sep 2002 17:55:55 -0700 (PDT) (envelope-from mini@freebsd.org) Received: (from perforce@localhost) by freefall.freebsd.org (8.12.4/8.12.4/Submit) id g8G0ttBt074818 for perforce@freebsd.org; Sun, 15 Sep 2002 17:55:55 -0700 (PDT) Date: Sun, 15 Sep 2002 17:55:55 -0700 (PDT) Message-Id: <200209160055.g8G0ttBt074818@freefall.freebsd.org> X-Authentication-Warning: freefall.freebsd.org: perforce set sender to mini@freebsd.org using -f From: Jonathan Mini Subject: PERFORCE change 17545 for review To: Perforce Change Reviews Sender: owner-p4-projects@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG 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