From owner-cvs-src@FreeBSD.ORG Mon Feb 2 22:35:31 2004 Return-Path: Delivered-To: cvs-src@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 37FAA16A4CE; Mon, 2 Feb 2004 22:35:31 -0800 (PST) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 6F80143D1F; Mon, 2 Feb 2004 22:35:30 -0800 (PST) (envelope-from bde@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.12.10/8.12.10) with ESMTP id i136ZU0B007226; Mon, 2 Feb 2004 22:35:30 -0800 (PST) (envelope-from bde@repoman.freebsd.org) Received: (from bde@localhost) by repoman.freebsd.org (8.12.10/8.12.10/Submit) id i136ZUGW007225; Mon, 2 Feb 2004 22:35:30 -0800 (PST) (envelope-from bde) Message-Id: <200402030635.i136ZUGW007225@repoman.freebsd.org> From: Bruce Evans Date: Mon, 2 Feb 2004 22:35:30 -0800 (PST) To: src-committers@FreeBSD.org, cvs-src@FreeBSD.org, cvs-all@FreeBSD.org X-FreeBSD-CVS-Branch: HEAD Subject: cvs commit: src/sys/i386/i386 trap.c X-BeenThere: cvs-src@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: CVS commit messages for the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 03 Feb 2004 06:35:31 -0000 bde 2004/02/02 22:35:30 PST FreeBSD src repository Modified files: sys/i386/i386 trap.c Log: Removed bogus checks that (PCPU_GET(curpcb) != NULL). Rev.1.586 of machdep.c fixed the missing early initialization of curpcb, so curpcb is now always set together with curthread and it cannot be NULL except before the IDT has been set up (so trap() is unreachable) or after a memory error. In any case, it was often used without checking. curcpb shouldn't exist anyway. It doesn't exist for most non-i386 arches. It just caches curthread->td_pcb in a global. This was a better idea before it was per-cpu. trap() and some other places can get at it more efficiently using td->td_pcb instead of PCPU_GET(curpcb). The main exception is support.s which mostly wants only curpcb->pcb_onfault. Revision Changes Path 1.263 +1 -3 src/sys/i386/i386/trap.c