From patchwork Tue Mar 24 08:48:13 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masahiro Yamada X-Patchwork-Id: 197947 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-10.1 required=3.0 tests=DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id CE2A3C41621 for ; Tue, 24 Mar 2020 08:51:09 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id A0191208C3 for ; Tue, 24 Mar 2020 08:51:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1585039869; bh=CapmDDq+DEQ/uX/xUf3VhIOP+7/Tw+B0qe8PUUAMk6M=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=SbqxOJ7jm7z0NRy7Q5nBUkBaN7r5aVgcKSLECcgaHYaF7Q/iCG4aBZrEF6B7mPWem 8wgKnYfQynkBb7QboZLbajV3mm7r/3hz59l1GcRe8k8/SQC1zC7Y7Txn5XkldoJIbk lvHisnJdJIAoId+Pl5Ft6bXOOs+ygnMinLelDxSw= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727257AbgCXIvI (ORCPT ); Tue, 24 Mar 2020 04:51:08 -0400 Received: from conuserg-09.nifty.com ([210.131.2.76]:17144 "EHLO conuserg-09.nifty.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727239AbgCXIvI (ORCPT ); Tue, 24 Mar 2020 04:51:08 -0400 Received: from pug.e01.socionext.com (p14092-ipngnfx01kyoto.kyoto.ocn.ne.jp [153.142.97.92]) (authenticated) by conuserg-09.nifty.com with ESMTP id 02O8mgsf011219; Tue, 24 Mar 2020 17:48:53 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conuserg-09.nifty.com 02O8mgsf011219 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1585039734; bh=0n2SNVTASAHLSUpoQ5+c9e3R+yizJV+PNdqURrTAbRw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Vdr/w1ERj7s9sh0xtaMeTFMbLkW/1musxOa2cnHwWWSdZP7PvU8KmssioszE69Uv9 JJNyLcQi+0FbPRnDgIGtiSH/IciTEtRDm2MVeymDzI1JuaQ7Hgd30TzwIoqNHXj97Y f/wv2FyG2EMdR8gyKleb5He9HNnrXYOM7MLE+hEUg+trWz4Bq/A+YaysfvSc9IE5sv sNdWuKd/PJVwZ0/HT/W9ANcRQbgVwfBA8khb0Lq2aqATsAXHUhluPP+um0k/4OJP6h AfUkvbRlTMJ8gHayVzW0M2EbXaqWHS2TjPNG+AMaSgGCf0Xco0co3H7qR2vw60bwyQ 46xbabDUwtKUg== X-Nifty-SrcIP: [153.142.97.92] From: Masahiro Yamada To: linux-kernel@vger.kernel.org Cc: "David S . Miller" , Linus Torvalds , Kees Cook , clang-built-linux@googlegroups.com, Herbert Xu , linux-crypto@vger.kernel.org, Ingo Molnar , Thomas Gleixner , Borislav Petkov , Peter Zijlstra , "H . Peter Anvin" , x86@kernel.org, linux-kbuild@vger.kernel.org, Masahiro Yamada Subject: [PATCH 08/16] x86: add comments about the binutils version to support code in as-instr Date: Tue, 24 Mar 2020 17:48:13 +0900 Message-Id: <20200324084821.29944-9-masahiroy@kernel.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200324084821.29944-1-masahiroy@kernel.org> References: <20200324084821.29944-1-masahiroy@kernel.org> Sender: linux-crypto-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org We raise the minimal supported binutils version from time to time. The last bump was commit 1fb12b35e5ff ("kbuild: Raise the minimum required binutils version to 2.21"). We need to keep these as-instr checks because binutils 2.21 does not support them. I hope this will be a good hint which one can be dropped when we bump the minimal binutils version next time. As for the Clang/LLVM builds, we require very new LLVM version, so the LLVM integrated assembler supports all of them. Signed-off-by: Masahiro Yamada Acked-by: Jason A. Donenfeld --- arch/x86/Makefile | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/arch/x86/Makefile b/arch/x86/Makefile index f32ef7b8d5ca..4c57cb3018fb 100644 --- a/arch/x86/Makefile +++ b/arch/x86/Makefile @@ -178,10 +178,15 @@ ifeq ($(ACCUMULATE_OUTGOING_ARGS), 1) endif # does binutils support specific instructions? +# binutils >= 2.22 avx2_instr :=$(call as-instr,vpbroadcastb %xmm0$(comma)%ymm1,-DCONFIG_AS_AVX2=1) +# binutils >= 2.25 avx512_instr :=$(call as-instr,vpmovm2b %k1$(comma)%zmm5,-DCONFIG_AS_AVX512=1) +# binutils >= 2.24 sha1_ni_instr :=$(call as-instr,sha1msg1 %xmm0$(comma)%xmm1,-DCONFIG_AS_SHA1_NI=1) +# binutils >= 2.24 sha256_ni_instr :=$(call as-instr,sha256msg1 %xmm0$(comma)%xmm1,-DCONFIG_AS_SHA256_NI=1) +# binutils >= 2.23 adx_instr := $(call as-instr,adox %r10$(comma)%r10,-DCONFIG_AS_ADX=1) KBUILD_AFLAGS += $(avx2_instr) $(avx512_instr) $(sha1_ni_instr) $(sha256_ni_instr) $(adx_instr)