From mboxrd@z Thu Jan 1 00:00:00 1970 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.0 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE, SPF_PASS,URIBL_BLOCKED,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 70FB4C43331 for ; Wed, 25 Mar 2020 11:41:32 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 222E72076A for ; Wed, 25 Mar 2020 11:41:32 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="dfKXa6Cm" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 222E72076A Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=r20dEyqTi1AlGTJT9TdW7zo1dNf3IVcJv4EOT1S8bCQ=; b=dfKXa6Cm06ODUj Ja/ugC0oL4xIVhnHkSrrZP91fSgSn/MIIPq1brmm8UnQyQzZu4EJacx3J6uwn2FV/vGQcuWPOA3Qg 7vtvkQB8p+bmc6ATmTn/KEOZZHx4csZPOXvpB6iD/PyCoqds9ZTXaYF7Im0ahXmRnUkC9RNXIeBBq eOZEXbmSegPLW2RlceVQfT5Hz9aO97K4QbrfIgvNCiz4n26qoYmhB2h2iZWQIdGUc6nDxv5fQMJ+0 S+gOAdiFPvwptgQJvqV8DWrFIp06jDpOnXuOnKiimjYw/a+sL7ZO2cPVd9xdai3n8gwWxvxjelK/Y yZDFAeMrjAiaqUIXFJZQ==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1jH4PW-0001UQ-DO; Wed, 25 Mar 2020 11:41:26 +0000 Received: from foss.arm.com ([217.140.110.172]) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1jH4PM-0001KQ-22 for linux-arm-kernel@lists.infradead.org; Wed, 25 Mar 2020 11:41:17 +0000 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 7CD6E31B; Wed, 25 Mar 2020 04:41:15 -0700 (PDT) Received: from localhost (unknown [10.37.6.21]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 014E13F71F; Wed, 25 Mar 2020 04:41:14 -0700 (PDT) From: Mark Brown To: Catalin Marinas , Will Deacon , Eric Biggers , Ard Biesheuvel Subject: [PATCH 1/3] arm64: asm: Provide macro to control enabling architecture extensions Date: Wed, 25 Mar 2020 11:41:08 +0000 Message-Id: <20200325114110.23491-2-broonie@kernel.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200325114110.23491-1-broonie@kernel.org> References: <20200325114110.23491-1-broonie@kernel.org> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200325_044116_141866_08EBC3BE X-CRM114-Status: GOOD ( 11.32 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Mark Brown , linux-crypto@vger.kernel.org, linux-arm-kernel@lists.infradead.org Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org Currently several assembler files override the default architecture to enable extensions in order to allow them to implement optimised routines for systems with those extensions. Since inserting BTI landing pads into assembler functions will require us to change the default architecture we need a way to enable extensions without hard coding the architecture. The assembler has the .arch_extension feature but this was introduced for arm64 in gas 2.26 which is too modern for us to rely on it. We could just update the base architecture used by these assembler files but this would mean the assembler would no longer catch attempts to use newer instructions so instead introduce a macro which sets the default architecture centrally. Doing this will also make our use of .arch and .cpu to select the base architecture more consistent. Signed-off-by: Mark Brown --- arch/arm64/include/asm/linkage.h | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/arch/arm64/include/asm/linkage.h b/arch/arm64/include/asm/linkage.h index ebee3113a62f..e5856c75720b 100644 --- a/arch/arm64/include/asm/linkage.h +++ b/arch/arm64/include/asm/linkage.h @@ -20,4 +20,10 @@ SYM_FUNC_END(x); \ SYM_FUNC_END_ALIAS(__pi_##x) +/* + * Enable additional architecture extensions (eg, for optimized asm + * routines). + */ +#define ARM64_EXTENSIONS(x) .arch armv8-a+x + #endif -- 2.20.1 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel