From owner-freebsd-arch@FreeBSD.ORG Sun Oct 21 06:10:24 2012 Return-Path: Delivered-To: freebsd-arch@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 71E5A2D7 for ; Sun, 21 Oct 2012 06:10:24 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from mail.zoral.com.ua (mx0.zoral.com.ua [91.193.166.200]) by mx1.freebsd.org (Postfix) with ESMTP id 088308FC12 for ; Sun, 21 Oct 2012 06:10:22 +0000 (UTC) Received: from skuns.kiev.zoral.com.ua (localhost [127.0.0.1]) by mail.zoral.com.ua (8.14.2/8.14.2) with ESMTP id q9L6AOgh064105; Sun, 21 Oct 2012 09:10:24 +0300 (EEST) (envelope-from kostikbel@gmail.com) Received: from deviant.kiev.zoral.com.ua (kostik@localhost [127.0.0.1]) by deviant.kiev.zoral.com.ua (8.14.5/8.14.5) with ESMTP id q9L6AC5a062979; Sun, 21 Oct 2012 09:10:12 +0300 (EEST) (envelope-from kostikbel@gmail.com) Received: (from kostik@localhost) by deviant.kiev.zoral.com.ua (8.14.5/8.14.5/Submit) id q9L6ABd7062973; Sun, 21 Oct 2012 09:10:11 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: deviant.kiev.zoral.com.ua: kostik set sender to kostikbel@gmail.com using -f Date: Sun, 21 Oct 2012 09:10:11 +0300 From: Konstantin Belousov To: Peter Wemm , Konstantin Belousov , freebsd-arch@freebsd.org Subject: Re: using SSE2 in kernel C code (improving AES-NI module) Message-ID: <20121021061011.GG35915@deviant.kiev.zoral.com.ua> References: <20121019233833.GS1967@funkthat.com> <20121020054847.GB35915@deviant.kiev.zoral.com.ua> <20121020171124.GU1967@funkthat.com> <20121021024726.GA1563@funkthat.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="m8pCv11XKdWQJ6wE" Content-Disposition: inline In-Reply-To: <20121021024726.GA1563@funkthat.com> User-Agent: Mutt/1.5.21 (2010-09-15) X-Virus-Scanned: clamav-milter 0.95.2 at skuns.kiev.zoral.com.ua X-Virus-Status: Clean X-Spam-Status: No, score=-4.0 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00 autolearn=ham version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on skuns.kiev.zoral.com.ua X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 21 Oct 2012 06:10:24 -0000 --m8pCv11XKdWQJ6wE Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sat, Oct 20, 2012 at 07:47:26PM -0700, John-Mark Gurney wrote: > Peter Wemm wrote this message on Sat, Oct 20, 2012 at 11:10 -0700: > > Or, another option.. do something like genassym or the many other > > kernel build tools. aicasm builds and runs a userland tool to > > generate something to build into the kernel. With sufficient > > cross-contamination safeguards I wonder if something similar might be > > able to be done here. >=20 > Well, looks like I may this working... Turns out I can't name the file > .s otherwise config puts it in SFILES which causes all sorts of problems.. > So, I went w/ .nos, does any one else have any suggestions? >=20 > how does this look to people: > aesni_wrap2.nos optional aesni = \ > dependency "$S/crypto/aesni/aesni_wrap2.c" = \ > compile-with "${CC} -O3 -fPIC -S -o aesni_wrap2.nos $S/crypto/= aesni/aesni_wrap2.c" \ =20 > no-obj no-implicit-rule before-depend = \ > clean "aesni_wrap2.nos" > aesni_wrap2.o optional aesni = \ > dependency "aesni_wrap2.nos" = \ > compile-with "${NORMAL_S} aesni_wrap2.nos" = \ > no-implicit-rule = \ > clean "aesni_wrap2.o" >=20 > We'll have to do something similar in the module Makefile, but that is > easier... >=20 > Also, I thought we had a better way to note that some devices depend > upon others than just throwing a depend error... If you include aesni > w/o crypto, you get error about missing cryptodev_if.h... >=20 Hm, if such thing is possible, why do you need to compile through the =2ES at all ? All you need is to specify the special compiling flags, including -msse and -msse2. Note, you shall not need -fPIC, at least for amd64. I would suggest to use -O2, as well as to try to honour the -g settings. Most likely, you can put the ${CFLAGS} on the command line, followed by -msse -msse2. --m8pCv11XKdWQJ6wE Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.12 (FreeBSD) iEYEARECAAYFAlCDkcMACgkQC3+MBN1Mb4ijFQCgutJynPglzNMBaAWsGeHQlQ9D o8AAn1bRvECRuO0K4Gvrs1rmpCd4COda =OA4o -----END PGP SIGNATURE----- --m8pCv11XKdWQJ6wE--