From owner-svn-src-all@FreeBSD.ORG Thu Mar 17 20:33:32 2011 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5A92F106564A; Thu, 17 Mar 2011 20:33:32 +0000 (UTC) (envelope-from peterjeremy@acm.org) Received: from fallbackmx09.syd.optusnet.com.au (fallbackmx09.syd.optusnet.com.au [211.29.132.242]) by mx1.freebsd.org (Postfix) with ESMTP id DA5548FC16; Thu, 17 Mar 2011 20:33:31 +0000 (UTC) Received: from mail13.syd.optusnet.com.au (mail13.syd.optusnet.com.au [211.29.132.194]) by fallbackmx09.syd.optusnet.com.au (8.13.1/8.13.1) with ESMTP id p2HJvbOW020767; Fri, 18 Mar 2011 06:57:37 +1100 Received: from server.vk2pj.dyndns.org (c220-239-116-103.belrs4.nsw.optusnet.com.au [220.239.116.103]) by mail13.syd.optusnet.com.au (8.13.1/8.13.1) with ESMTP id p2HJvVH8009828 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Fri, 18 Mar 2011 06:57:32 +1100 X-Bogosity: Ham, spamicity=0.000000 Received: from server.vk2pj.dyndns.org (localhost.vk2pj.dyndns.org [127.0.0.1]) by server.vk2pj.dyndns.org (8.14.4/8.14.4) with ESMTP id p2HJvVV2066002; Fri, 18 Mar 2011 06:57:31 +1100 (EST) (envelope-from peter@server.vk2pj.dyndns.org) Received: (from peter@localhost) by server.vk2pj.dyndns.org (8.14.4/8.14.4/Submit) id p2HJvTJk066001; Fri, 18 Mar 2011 06:57:29 +1100 (EST) (envelope-from peter) Date: Fri, 18 Mar 2011 06:57:29 +1100 From: Peter Jeremy To: Jung-uk Kim Message-ID: <20110317195729.GA65858@server.vk2pj.dyndns.org> References: <201103152145.p2FLjAlt060256@svn.freebsd.org> <201103161233.16347.jkim@FreeBSD.org> <20110316174553.GA6367@freebsd.org> <201103161634.08104.jkim@FreeBSD.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="T4sUOijqQbZv57TR" Content-Disposition: inline In-Reply-To: <201103161634.08104.jkim@FreeBSD.org> X-PGP-Key: http://members.optusnet.com.au/peterjeremy/pubkey.asc User-Agent: Mutt/1.5.21 (2010-09-15) Cc: src-committers@FreeBSD.org, Roman Divacky , Bruce Evans , svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, Maxim Dounin Subject: Re: svn commit: r219679 - head/sys/i386/include X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 17 Mar 2011 20:33:32 -0000 --T4sUOijqQbZv57TR Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On 2011-Mar-16 16:34:04 -0400, Jung-uk Kim wrote: >On Wednesday 16 March 2011 01:45 pm, Roman Divacky wrote: >> if we drop i486 I think it makes sense to require something that >> has at least SSE2, thus we can have the same expectations as on >> amd64. I think it's stil a bit early for that - especially the SSE2 requirement. >This is a proof-of-concept patch for sys/x86/isa/clock.c: > >http://people.freebsd.org/~jkim/clock.diff > >You see the complexity, just because I wanted to load 64-bit value=20 >atomically... :-( An alternative approach is to have _fetch_frequency() be uint64_t (*_fetch_frequency)(uint64_t *); if i386 and I486 are defined (otherwise it's just the #define (*(p))) then initialise it to either atomic_fetch_quad_i386 or atomic_fetch_quad_i586 as part of the CPU detection process. This is the way bcopy() is/was handled on Pentium. Another approach would be to always have cmpxchg8b instructions (followed by a suitably large NOP) always inlined in the code and if it traps, patch the code to call a function that emulates it. --=20 Peter Jeremy --T4sUOijqQbZv57TR Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.17 (FreeBSD) iEYEARECAAYFAk2CZ6kACgkQ/opHv/APuIf4HgCglRSBF80GZRoaO3asSrakTbct VKoAoI9R8PNjJjwCUnvVIyuvNqobcboa =7WMx -----END PGP SIGNATURE----- --T4sUOijqQbZv57TR--