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 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 smtp.lore.kernel.org (Postfix) with ESMTPS id D926AC001DB for ; Fri, 4 Aug 2023 13:20:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=KKXpemP/AaRoKpCT9Pw1qhZn38vsOErXmN8wplY9PcM=; b=eSOhJhaOfblBxf oI0a/wKK9hbpWg+oSWJyF33LLhDwDeE9MHmPbfkrx0g9LwCSc64avj64BYPjVD6Su6TRsvielPDZL jYxVIyZxn5vlrtplEUBS4RMBRYcQ6LI+Ecp46auXUXWrOCA2y6JIYieBdyAAgyWiNRQNcUjfDg23a dnJWg5UAeMLTL824d0XGlYqTXtBTdkBhUR0MrXA9XUO6RucIm+kiUtKpUq/h/LYMwWTshqIF+WW+u C/x3j6ycGV5BXXKrlmpp9UdNvPhYMiymb/YSXk0jDdXH9enxnoIdxBHzjAfluQbwgdEpQZHWqV5zM 75Bvw/EGlsdwlo1QYCYg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qRuis-00CTyh-1m; Fri, 04 Aug 2023 13:20:06 +0000 Received: from dfw.source.kernel.org ([2604:1380:4641:c500::1]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qRuip-00CTy0-0y for linux-arm-kernel@lists.infradead.org; Fri, 04 Aug 2023 13:20:04 +0000 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 1EE866200E; Fri, 4 Aug 2023 13:20:02 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id C25E9C433C9; Fri, 4 Aug 2023 13:20:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1691155201; bh=R8tuKHHo7l977zWQct0n6sllHpAnQ9F+ZZQOhITZy1Q=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=rBwya3JhdnWXCFT1LXLCfjEZxTOz2/fHUZuKTJ+d4cnS8XwReLSfd7DzBIp+hDzSA GKsaOBisxMDn3peg0lnfJAPxOV7AWlcL92oAeG4+HOvIgxre9yf0Ykl/6sQoDtRy1z rWPwSzpi3/isZtt6A9ouK9NMRNhV00lW1tUuMqpFIryBGD4RKTQMpGhEctMoFbE5Kk 7duHBTKdRN8ALnrLI+prLeQo2Bbq0yg6Inqv4rSopQv+EBNFjkQLg+/fy/ufBeHRUE s0RjNm7WG8B/G2N8xjRnMU+K+pekt0g1sFqSDl32pOavMfyJ/+5yfTMD7BcWSiCeUx SZc9ByB+2k0fw== Date: Fri, 4 Aug 2023 14:19:57 +0100 From: Will Deacon To: Joey Gouly Cc: linux-arm-kernel@lists.infradead.org, nd@arm.com, catalin.marinas@arm.com Subject: Re: [PATCH v1 1/2] arm64: add HWCAP for FEAT_HBC (hinted conditional branches) Message-ID: <20230804131955.GA30339@willie-the-truck> References: <20230801100008.3125054-1-joey.gouly@arm.com> <20230801100008.3125054-2-joey.gouly@arm.com> <20230801151229.GI26253@willie-the-truck> <20230802115401.GA3350477@e124191.cambridge.arm.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20230802115401.GA3350477@e124191.cambridge.arm.com> User-Agent: Mutt/1.10.1 (2018-07-13) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230804_062003_450799_C1F41D5D X-CRM114-Status: GOOD ( 24.68 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Wed, Aug 02, 2023 at 12:54:01PM +0100, Joey Gouly wrote: > On Tue, Aug 01, 2023 at 04:12:30PM +0100, Will Deacon wrote: > > Hey Joey, > > > > On Tue, Aug 01, 2023 at 11:00:07AM +0100, Joey Gouly wrote: > > > Add a HWCAP for FEAT_HBC, so that userspace can make a decision on using > > > this feature. > > > > > > Signed-off-by: Joey Gouly > > > Cc: Catalin Marinas > > > Cc: Will Deacon > > > > [...] > > > > > diff --git a/arch/arm64/kernel/cpufeature.c b/arch/arm64/kernel/cpufeature.c > > > index f9d456fe132d..ac764c1dac36 100644 > > > --- a/arch/arm64/kernel/cpufeature.c > > > +++ b/arch/arm64/kernel/cpufeature.c > > > @@ -222,7 +222,7 @@ static const struct arm64_ftr_bits ftr_id_aa64isar1[] = { > > > static const struct arm64_ftr_bits ftr_id_aa64isar2[] = { > > > ARM64_FTR_BITS(FTR_VISIBLE, FTR_NONSTRICT, FTR_LOWER_SAFE, ID_AA64ISAR2_EL1_CSSC_SHIFT, 4, 0), > > > ARM64_FTR_BITS(FTR_VISIBLE, FTR_NONSTRICT, FTR_LOWER_SAFE, ID_AA64ISAR2_EL1_RPRFM_SHIFT, 4, 0), > > > - ARM64_FTR_BITS(FTR_HIDDEN, FTR_STRICT, FTR_HIGHER_SAFE, ID_AA64ISAR2_EL1_BC_SHIFT, 4, 0), > > > + ARM64_FTR_BITS(FTR_VISIBLE, FTR_STRICT, FTR_HIGHER_SAFE, ID_AA64ISAR2_EL1_BC_SHIFT, 4, 0), > > > ARM64_FTR_BITS(FTR_VISIBLE, FTR_STRICT, FTR_LOWER_SAFE, ID_AA64ISAR2_EL1_MOPS_SHIFT, 4, 0), > > > ARM64_FTR_BITS(FTR_VISIBLE_IF_IS_ENABLED(CONFIG_ARM64_PTR_AUTH), > > > FTR_STRICT, FTR_EXACT, ID_AA64ISAR2_EL1_APA3_SHIFT, 4, 0), > > > @@ -2844,6 +2844,7 @@ static const struct arm64_cpu_capabilities arm64_elf_hwcaps[] = { > > > HWCAP_CAP(ID_AA64ISAR2_EL1, RPRES, IMP, CAP_HWCAP, KERNEL_HWCAP_RPRES), > > > HWCAP_CAP(ID_AA64ISAR2_EL1, WFxT, IMP, CAP_HWCAP, KERNEL_HWCAP_WFXT), > > > HWCAP_CAP(ID_AA64ISAR2_EL1, MOPS, IMP, CAP_HWCAP, KERNEL_HWCAP_MOPS), > > > + HWCAP_CAP(ID_AA64ISAR2_EL1, BC, IMP, CAP_HWCAP, KERNEL_HWCAP_HBC), > > > #ifdef CONFIG_ARM64_SME > > > HWCAP_CAP(ID_AA64PFR1_EL1, SME, IMP, CAP_HWCAP, KERNEL_HWCAP_SME), > > > HWCAP_CAP(ID_AA64SMFR0_EL1, FA64, IMP, CAP_HWCAP, KERNEL_HWCAP_SME_FA64), > > > diff --git a/arch/arm64/kernel/cpuinfo.c b/arch/arm64/kernel/cpuinfo.c > > > index 58622dc85917..98fda8500535 100644 > > > --- a/arch/arm64/kernel/cpuinfo.c > > > +++ b/arch/arm64/kernel/cpuinfo.c > > > @@ -126,6 +126,7 @@ static const char *const hwcap_str[] = { > > > [KERNEL_HWCAP_SME_B16B16] = "smeb16b16", > > > [KERNEL_HWCAP_SME_F16F16] = "smef16f16", > > > [KERNEL_HWCAP_MOPS] = "mops", > > > + [KERNEL_HWCAP_HBC] = "hbc", > > > > I'm a bit confused from the Arm ARM as to the use of "hbc" vs "bc"... I > > don't really mind what we go for, but given this is userspace-visible, have > > you run the string past the toolchain folks at all? I guess I'm wary of > > what a future extension might look like and whether we'll be stuck with > > non-architectural terminology such as "hbc2" to advertise it if we go with > > your suggestion here rather than "bc". > > I just checked LLVM and binutils, they also call it 'hbc'. > > .arch armv8.7-a+hbc > > https://sourceware.org/git/?p=binutils-gdb.git;a=blob;f=gas/testsuite/gas/aarch64/hbc.s;h=23af6ba8edd662463ae3403e62d94ef838f87fd1;hb=HEAD#l35 > > https://github.com/llvm/llvm-project/blob/b31be75ff4d1aed94914d5ef53a903d034d5b6ad/llvm/lib/Target/AArch64/AsmParser/AArch64AsmParser.cpp#L3600 > > So it seems that's the name that has been settled on? If you're fine with > that, I will send a v2 fixing up the inline asm. Thanks for checking. If that's what they've gone for, then so be it! Will _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel