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 EF653ECAAD8 for ; Fri, 16 Sep 2022 11:14:39 +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=AJ7XfwpG+CRnA6YIbUKfPkf8MfeDFslBlSQ2mdbicyo=; b=3ZUUebYXekcMcS +3vpPRZlss0jI39jqGCRJCWOpyAchfsp4n10hgOUw0dvU2vd1m//Fiei1pl2+m3GvvS2N03OLPCz6 Xp8xzJV2jfjETMI+zE3nt9SYR7loTs6xp2qnUjI/aSjeyd2hpOQOjNgSBPjklmKwyRo8UuLsakvzo crTuvdFuM7HivVfq9of54JieSxMGdHuLwEJK0kh5bAktxCc7qUJVVJ28k+jZRiO+nmSR6YNuCC1Bz y/HousyqozdEc77JOSbFM/hInjk96Ag7WlcgPBWDyCLnJEQp0X2woJzZMH35vpXUOMY+lIqJe7DPJ 7yZEkXho9/GnpdhmYq0Q==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1oZ9Hr-00CYF6-PT; Fri, 16 Sep 2022 11:13:35 +0000 Received: from ams.source.kernel.org ([2604:1380:4601:e00::1]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1oZ9Ho-00CYC6-Gp for linux-arm-kernel@lists.infradead.org; Fri, 16 Sep 2022 11:13:34 +0000 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 654BAB8264B; Fri, 16 Sep 2022 11:13:27 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id A3815C433D6; Fri, 16 Sep 2022 11:13:24 +0000 (UTC) Date: Fri, 16 Sep 2022 12:13:20 +0100 From: Catalin Marinas To: Mark Rutland Cc: linux-arm-kernel@lists.infradead.org, ardb@kernel.org, james.morse@arm.com, joey.gouly@arm.com, maz@kernel.org, will@kernel.org Subject: Re: [PATCH v2 7/8] arm64: alternatives: add alternative_has_feature_*() Message-ID: References: <20220912162210.3626215-1-mark.rutland@arm.com> <20220912162210.3626215-8-mark.rutland@arm.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20220912162210.3626215-8-mark.rutland@arm.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220916_041332_713633_6A9665E8 X-CRM114-Status: GOOD ( 10.88 ) 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 Mon, Sep 12, 2022 at 05:22:09PM +0100, Mark Rutland wrote: > @@ -465,7 +464,7 @@ static __always_inline bool __cpus_have_const_cap(int num) > { > if (num >= ARM64_NCAPS) > return false; > - return static_branch_unlikely(&cpu_hwcap_keys[num]); > + return alternative_has_feature_unlikely(num); > } I wonder whether we should move this to "likely" (as a subsequent patch). It would save a branch as new CPUs turn up supporting the new features. We may want to keep errata workarounds as "unlikely" though as they tend not to stick around in future CPUs. -- Catalin _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel