Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S966633AbbBCUuu (ORCPT ); Tue, 3 Feb 2015 15:50:50 -0500 Received: from cantor2.suse.de ([195.135.220.15]:60993 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755915AbbBCUuq (ORCPT ); Tue, 3 Feb 2015 15:50:46 -0500 Date: Wed, 4 Feb 2015 07:50:33 +1100 From: NeilBrown To: Paul Bolle Cc: Jan Beulich , Valentin Rothberg , mingo@elte.hu, tglx@linutronix.de, hpa@zytor.com, james.t.kukunas@linux.intel.com, linux-kernel@vger.kernel.org Subject: Re: [PATCH] x86/raid6: correctly check for assembler capabilities Message-ID: <20150204075033.25fb2317@notabene.brown> In-Reply-To: <1422995490.23894.32.camel@x220> References: <54C2148E02000078000588FB@mail.emea.novell.com> <1422995490.23894.32.camel@x220> X-Mailer: Claws Mail 3.10.1-162-g4d0ed6 (GTK+ 2.24.25; x86_64-suse-linux-gnu) MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; boundary="Sig_/rfayqZj7iuV1UC6Eyk4YjbD"; protocol="application/pgp-signature" Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 3522 Lines: 91 --Sig_/rfayqZj7iuV1UC6Eyk4YjbD Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable On Tue, 03 Feb 2015 21:31:30 +0100 Paul Bolle wrote: > On Fri, 2015-01-23 at 08:29 +0000, Jan Beulich wrote: > > Just like for AVX2 (which simply needs an #if -> #ifdef conversion), > > SSSE3 assembler support should be checked for before using it. > >=20 > > Signed-off-by: Jan Beulich > > Cc: Jim Kukunas > > Cc: Neil Brown >=20 > This patch became commit be46ac86a81b ("x86/raid6: correctly check for > assembler capabilities") in today's linux-next (ie, next-20150203). I > noticed because a script I use to check linux-next spotted a potential > problem with it. >=20 > > --- > > arch/x86/Makefile | 1 + > > lib/raid6/algos.c | 2 +- > > lib/raid6/recov_avx2.c | 2 +- > > lib/raid6/recov_ssse3.c | 6 ++++++ > > 4 files changed, 9 insertions(+), 2 deletions(-) > >=20 > > --- 3.19-rc5/arch/x86/Makefile > > +++ 3.19-rc5-raid6-SSSE3/arch/x86/Makefile > > @@ -148,6 +148,7 @@ cfi-sections :=3D $(call as-instr,.cfi_sec > > =20 > > # does binutils support specific instructions? > > asinstr :=3D $(call as-instr,fxsaveq (%rax),-DCONFIG_AS_FXSAVEQ=3D1) > > +asinstr +=3D $(call as-instr,pshufb %xmm0$(comma)%xmm0,-DCONFIG_AS_SSS= E3=3D1) >=20 > This Makefile defines a preprocessor macro with a CONFIG_ prefix. Almost > all macros with that prefix are defined through the kconfig system. A > handful, like CONFIG_AS_SSSE3 and a few other macros defined in this > Makefile, are not. Apparently this is a pet peeve I share with few > people, but would any other prefix than CONFIG_ work for you too? Actually the prefix of this macro is "CONFIG_AS_", not "CONFIG_" :-) CONFIG_AS_ is reserved for assembly magic, and is never used by the the kconfig system. (Well..... I might have made bits of that up, but "git grep 'config AS_'" doesn't find anything). NeilBrown >=20 > > asinstr +=3D $(call as-instr,crc32l %eax$(comma)%eax,-DCONFIG_AS_CRC32= =3D1) > > avx_instr :=3D $(call as-instr,vxorps %ymm0$(comma)%ymm1$(comma)%ymm2,= -DCONFIG_AS_AVX=3D1) > > avx2_instr :=3D$(call as-instr,vpbroadcastb %xmm0$(comma)%ymm1,-DCONFI= G_AS_AVX2=3D1) >=20 >=20 > Paul Bolle --Sig_/rfayqZj7iuV1UC6Eyk4YjbD Content-Type: application/pgp-signature Content-Description: OpenPGP digital signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQIVAwUBVNE0mTnsnt1WYoG5AQJYQA//bBJd/Esh+Cq3RRdha6O13XYC2U/S6Ec5 6V51QeuRw+9nIP/8YCwiCzvoj9niOLJzAkeUX81IF2ic/aRpdp9UcldeQ5ugrtC2 9ptZltVvtx7M9YBPeO4ohX5+W3WOK1+ea25pEzB1pQ90mJqo8iDRmxQZMtna+dZ5 b5vS4i3z85uQY0vdXUNiq+CBb4i5NcrCjRuHwn5Anr+F5I6KnIzb/V2WZWsvIe/k GoX5HCKgwREqYDja5cTlpHazo1VXEqJq+978JkHTn7K+GK2yjlTyY/LBVcUWt/Q/ 8/BTbYsqKXw0ah1ix38DATu9U+ssK4BJ9SHyQs2NBSlNbjiJgo45lQ7MVOEwI+jD yta+qKFCS36MAey9aS4pES0yy9ddPjVsgYzGCuJoZEoAF/Uu7zFcEzynwpo5WynL YvjbI2SQdRCWLWN5Tftz/CKXgCEID5pIhnGkEjXMln/AvW4ofs3aJhq3jiPPOpBH Bfobt9LGAJoxJ9a9XqXd38GUd0/cU1cN0eMkVOAGFKg8tvBuZ/1gIQfO8oosknAa OAxWm4GVHoa/oNP1ivPhX2nyTPLeCyvpK1Yn1y6iPUh7TjlwJa7ar8js81Mpucob CuSshUVypQZQXavHQ7OkG0UNGEfelahCS5IRJ0XnQcA8UFON9uSK53C8ntnuprF0 gvF39vtnBXs= =f8jE -----END PGP SIGNATURE----- --Sig_/rfayqZj7iuV1UC6Eyk4YjbD-- -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/