From owner-p4-projects@FreeBSD.ORG Fri Mar 31 16:55:42 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 3240C16A420; Fri, 31 Mar 2006 16:55:42 +0000 (UTC) X-Original-To: perforce@freebsd.org 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 CA32916A400 for ; Fri, 31 Mar 2006 16:55:41 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 94ED643D46 for ; Fri, 31 Mar 2006 16:55:41 +0000 (GMT) (envelope-from jhb@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id k2VGtcIf096252 for ; Fri, 31 Mar 2006 16:55:41 GMT (envelope-from jhb@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id k2VGtc7P096244 for perforce@freebsd.org; Fri, 31 Mar 2006 16:55:38 GMT (envelope-from jhb@freebsd.org) Date: Fri, 31 Mar 2006 16:55:38 GMT Message-Id: <200603311655.k2VGtc7P096244@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to jhb@freebsd.org using -f From: John Baldwin To: Perforce Change Reviews Cc: Subject: PERFORCE change 94357 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 31 Mar 2006 16:55:42 -0000 http://perforce.freebsd.org/chv.cgi?CH=94357 Change 94357 by jhb@jhb_slimer on 2006/03/31 16:54:47 Fixup comments. Affected files ... .. //depot/projects/smpng/sys/i386/isa/npx.c#53 edit Differences ... ==== //depot/projects/smpng/sys/i386/isa/npx.c#53 (text+ko) ==== @@ -236,7 +236,7 @@ /* * Probe routine. Initialize cr0 to give correct behaviour for [f]wait * whether the device exists or not (XXX should be elsewhere). Set flags - * to tell npxattach() what to do. Modify device struct if npx doesn't + * to tell npxattach() what to do. Setup an interrupt handler if npx does * need to use interrupts. Return 0 if device exists. */ static int @@ -252,11 +252,18 @@ KASSERT((rcr0() & (CR0_MP | CR0_NE)) == (CR0_MP | CR0_NE), ("cr0 busted")); + + /* + * Modern CPUs all have an FPU that uses the INT16 interface + * and provide a simple way to verify that, so handle the + * common case right away. + */ if (cpu_feature & CPUID_FPU) { hw_float = npx_exists = 1; npx_ex16 = 1; return (0); } + save_idt_npxtrap = idt[IDT_MF]; setidt(IDT_MF, probetrap, SDT_SYS386TGT, SEL_KPL, GSEL(GCODE_SEL, SEL_KPL));