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 572E2D18134 for ; Mon, 14 Oct 2024 17:17:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:In-Reply-To:Content-Type: MIME-Version:References:Message-ID:Subject:Cc:To:From:Date:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=Wx8YuqTbAKJPhrzEVdFJQyOnFmMskkCN/ZGOnF0tTSg=; b=WsZaAZt4p9Jl6HteCoPMExM9p/ R+r4pCBTUM+KxzboJwyn0nfrsyHPcli74SZvfejxKJRFBOa7Xu9nECtDwXGXODLDoMUzOAsKt7qNY zuk537WyhQKdDrC2T+fU7kxckXtwr0I4YsHBBBZnPmLGWRY4N+dDQDPJ4wyO8FpbOFehzHZjR/oZl 6X71Kt4hMF024J5+aWy7iFFASPLT3AtlvH4F6jN45tCInMsDSLTV3Uf+kNY/mlB6ZhxSlcu/N9TKj exqbM5GaYhhbdKZnK63dJvG/gU7cwygw/xuVMGmdi3ZYydrPzQBqc2K4y+ZFnL1Rc5HPA82VzR5Gc yk+DyAaw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1t0OhI-000000061Ix-2jw5; Mon, 14 Oct 2024 17:17:32 +0000 Received: from nyc.source.kernel.org ([2604:1380:45d1:ec00::3]) by bombadil.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1t0Odb-000000060VS-2VQe for linux-arm-kernel@lists.infradead.org; Mon, 14 Oct 2024 17:13:44 +0000 Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by nyc.source.kernel.org (Postfix) with ESMTP id F3A6CA42660; Mon, 14 Oct 2024 17:13:33 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id D0AACC4CEC3; Mon, 14 Oct 2024 17:13:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1728926022; bh=BFDFBNLh3i833ZPAN947vJe7sG/p2kqU8tSaNVCxZTU=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=XAnEv1XRcOxQw4FyiU7doX5ocZaMjkbbfdrvA72aLc1zoTqVKXniOHPZZ+tA2Cfb6 gsmG/+cx7HqbkPUJ6ECRZKBQAyKGqOJv7uj1RuotTsFCgAVbreF9/575lsNSZRHeGd JYa83IQOblA4eYmeSq9D3/ai6h6lmOhVn3U2PDw/RvOlozRcj5ntCnxPfqaRONDReF 3IeFaWtJ+Bn1I/ABZoe7heNn8fTEcyl2XD8AmxkhEZldZbhzj4CWbqeW2LVeJiFq+3 gVeCpKGiEjQX9G+MCJXE7F7EmRtJp3iEiyX6Rxlz6QsqXJJgFF0xv2f/56l5FlcNrm sbdumF/ikNeLw== Date: Mon, 14 Oct 2024 18:13:38 +0100 From: Will Deacon To: Joey Gouly Cc: linux-arm-kernel@lists.infradead.org, catalin.marinas@arm.com Subject: Re: [PATCH v1] arm64: cpufeature: add POE to cpucap_is_possible() Message-ID: <20241014171337.GA18341@willie-the-truck> References: <20241008140121.2774348-1-joey.gouly@arm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20241008140121.2774348-1-joey.gouly@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-20241014_101343_734344_8BC82D3A X-CRM114-Status: GOOD ( 16.33 ) 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: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Tue, Oct 08, 2024 at 03:01:21PM +0100, Joey Gouly wrote: > Since de66cb37ab6 ("arm64: Add cpucap_is_possible()"), > alternative_has_cap_unlikely() includes the IS_ENABLED() check. > > Add CONFIG_ARM64_POE to cpucap_is_possible() to avoid the explicit check. > > Signed-off-by: Joey Gouly > Cc: Catalin Marinas > Cc: Will Deacon > --- > > Small cosmetic change I noticed when looking at some other patches. > > arch/arm64/include/asm/cpucaps.h | 2 ++ > arch/arm64/include/asm/cpufeature.h | 3 +-- > 2 files changed, 3 insertions(+), 2 deletions(-) > > diff --git a/arch/arm64/include/asm/cpucaps.h b/arch/arm64/include/asm/cpucaps.h > index a6e5b07b64fd..a08a1212ffbb 100644 > --- a/arch/arm64/include/asm/cpucaps.h > +++ b/arch/arm64/include/asm/cpucaps.h > @@ -42,6 +42,8 @@ cpucap_is_possible(const unsigned int cap) > return IS_ENABLED(CONFIG_ARM64_BTI); > case ARM64_HAS_TLB_RANGE: > return IS_ENABLED(CONFIG_ARM64_TLB_RANGE); > + case ARM64_HAS_S1POE: > + return IS_ENABLED(CONFIG_ARM64_POE); > case ARM64_UNMAP_KERNEL_AT_EL0: > return IS_ENABLED(CONFIG_UNMAP_KERNEL_AT_EL0); > case ARM64_WORKAROUND_843419: > diff --git a/arch/arm64/include/asm/cpufeature.h b/arch/arm64/include/asm/cpufeature.h > index 3d261cc123c1..4b6bc0bac9b9 100644 > --- a/arch/arm64/include/asm/cpufeature.h > +++ b/arch/arm64/include/asm/cpufeature.h > @@ -834,8 +834,7 @@ static inline bool system_supports_lpa2(void) > > static inline bool system_supports_poe(void) > { > - return IS_ENABLED(CONFIG_ARM64_POE) && > - alternative_has_cap_unlikely(ARM64_HAS_S1POE); > + return alternative_has_cap_unlikely(ARM64_HAS_S1POE); > } > > int do_emulate_mrs(struct pt_regs *regs, u32 sys_reg, u32 rt); > -- > 2.25.1 Acked-by: Will Deacon Will