From owner-svn-src-head@FreeBSD.ORG Sat Nov 22 23:17:02 2008 Return-Path: Delivered-To: svn-src-head@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id AE22F1065670; Sat, 22 Nov 2008 23:17:02 +0000 (UTC) (envelope-from scottl@samsco.org) Received: from pooker.samsco.org (pooker.samsco.org [168.103.85.57]) by mx1.freebsd.org (Postfix) with ESMTP id 1E8A48FC1E; Sat, 22 Nov 2008 23:17:01 +0000 (UTC) (envelope-from scottl@samsco.org) Received: from phobos.local ([192.168.254.200]) (authenticated bits=0) by pooker.samsco.org (8.14.2/8.14.2) with ESMTP id mAMN8xJW021129; Sat, 22 Nov 2008 16:08:59 -0700 (MST) (envelope-from scottl@samsco.org) Message-ID: <4928910B.1020403@samsco.org> Date: Sat, 22 Nov 2008 16:08:59 -0700 From: Scott Long User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X; en-US; rv:1.8.1.13) Gecko/20080313 SeaMonkey/1.1.9 MIME-Version: 1.0 To: Kostik Belousov References: <200811220555.mAM5tuIJ007781@svn.freebsd.org> <20081122112949.GA6408@deviant.kiev.zoral.com.ua> <3c1674c90811221326m41e229f7p6abbc0eb473e900e@mail.gmail.com> <49288222.5060205@samsco.org> <20081122221953.GO6408@deviant.kiev.zoral.com.ua> In-Reply-To: <20081122221953.GO6408@deviant.kiev.zoral.com.ua> X-Enigmail-Version: 0.95.6 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-4.4 required=3.8 tests=ALL_TRUSTED,AWL,BAYES_00 autolearn=ham version=3.1.8 X-Spam-Checker-Version: SpamAssassin 3.1.8 (2007-02-13) on pooker.samsco.org Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org, kmacy@FreeBSD.org Subject: Re: svn commit: r185162 - in head: . sys/amd64/include sys/arm/include sys/conf sys/dev/bce sys/dev/cxgb sys/dev/cxgb/sys sys/dev/cxgb/ulp/iw_cxgb sys/dev/mxge sys/dev/nxge sys/i386/include sys/i386/in... X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 22 Nov 2008 23:17:02 -0000 Kostik Belousov wrote: > On Sat, Nov 22, 2008 at 03:05:22PM -0700, Scott Long wrote: >> A neat hack would be for the kernel linker to scan the text and do a >> drop-in replacement of the opcode that is appropriate for the platform. >> I can't see how a CPU_XXX definition would work because it's just a >> compile time construct, one that can be included with any kernel >> compile. > > Yes, it is possible to do that. Less drastic change is to directly > check features. I moved slow code to separate section to eliminate > unconditional jump in fast path. > Only compile-tested. > As long as it works, I think it's a step in the right direction; I'm assuming that cpu_feature is a symbol filled in at runtime and not a macro for the cpuid instruction, right? Scott