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 73B84C54EE9 for ; Sat, 17 Sep 2022 12:53:13 +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=12Ey9Bz6v+gRxhp6KzcNAtsV52zZNwzdb9DfFZUIU40=; b=IId49UjrpAyBki dqnM8N5EiDyGbu+2o3an3eiCGFUvtxop2KI/MZnNxOvvCwCYO/rxkoa72aEu3HlAqW2x2ZDRN3NXE z/JUzGhV1yDjea1XB0i7ZEr1tN25t4oe20c+laGbMm5a1o0bgSU0/MIaA6paOM/e6BTVrf4ez+6kH Nf9xT0DweolTund5JHWBnUEeTybvYhpKP5lG5Mg38PZVCpbc1uiawLY3NHcJJsklm4FRt061Ue2+7 /MlKQKwugiPdWAW6PTMPj9jTgneLckEH3IeqfPRccd/hwXj+Jo5sJGBcDC6Hjn1B34oePi9gDFRTL ceXX4zXiaNKidLaIvqaQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1oZXIs-005uYl-N6; Sat, 17 Sep 2022 12:52:14 +0000 Received: from foss.arm.com ([217.140.110.172]) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1oZXIp-005uXP-FY for linux-arm-kernel@lists.infradead.org; Sat, 17 Sep 2022 12:52:13 +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 46D0C153B; Sat, 17 Sep 2022 05:52:15 -0700 (PDT) Received: from FVFF77S0Q05N (unknown [10.57.17.93]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 3F1FB3F71A; Sat, 17 Sep 2022 05:52:07 -0700 (PDT) Date: Sat, 17 Sep 2022 13:52:04 +0100 From: Mark Rutland To: Catalin Marinas 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: X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220917_055211_585291_EE388BFE X-CRM114-Status: GOOD ( 11.41 ) 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 Fri, Sep 16, 2022 at 12:13:20PM +0100, Catalin Marinas wrote: > 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. I had assumed we'd add separate likely/unlikely forms that we can use independently per feature or callsite (since e.g. we want any errata caps to be unlikely); if we have specific cases we'd like to change I can go spin that shortly. Thanks, Mark. _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel