From owner-cvs-src@FreeBSD.ORG Tue Nov 11 17:26:03 2003 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 D0BF716A4CE; Tue, 11 Nov 2003 17:26:03 -0800 (PST) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 58C1743FF5; Tue, 11 Nov 2003 17:26:03 -0800 (PST) (envelope-from marcel@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.12.9/8.12.9) with ESMTP id hAC1Q3XJ023415; Tue, 11 Nov 2003 17:26:03 -0800 (PST) (envelope-from marcel@repoman.freebsd.org) Received: (from marcel@localhost) by repoman.freebsd.org (8.12.9/8.12.9/Submit) id hAC1Q3fG023414; Tue, 11 Nov 2003 17:26:03 -0800 (PST) (envelope-from marcel) Message-Id: <200311120126.hAC1Q3fG023414@repoman.freebsd.org> From: Marcel Moolenaar Date: Tue, 11 Nov 2003 17:26:03 -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/ia64/ia64 interrupt.c machdep.c 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: Wed, 12 Nov 2003 01:26:04 -0000 marcel 2003/11/11 17:26:03 PST FreeBSD src repository Modified files: sys/ia64/ia64 interrupt.c machdep.c trap.c Log: Further work-out the handling of the high FP registers. The most important change is in cpu_switch() where we disable the high FP registers for the thread that we switch-out if the CPU currently has its high FP registers. This avoids that the high FP registers remain enabled for the thread even when the CPU has unloaded them or the thread migrated to another processor. Likewise, when we switch-in a thread of that has its high FP registers on the CPU, we enable them. This avoids an otherwise harmless, but unnecessary trap to have them enabled. The code that handles the disabled high FP trap (in trap()) has been turned into a critical section for the most part to avoid being preempted. If there's a race, we bail out and have the processor trap again if necessary. Avoid using the generic ia64_highfp_save() function when the context is predictable. The function adds unnecessary overhead. Don't use ia64_highfp_load() for the same reason. The function is now unused and can be removed. These changes make the lazy context switching of the high FP registers in an UP kernel functional. Revision Changes Path 1.42 +6 -2 src/sys/ia64/ia64/interrupt.c 1.169 +4 -0 src/sys/ia64/ia64/machdep.c 1.94 +38 -65 src/sys/ia64/ia64/trap.c