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=-11.5 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_1 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 4D941C55178 for ; Fri, 30 Oct 2020 08:19:23 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (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 C2AF422210 for ; Fri, 30 Oct 2020 08:19:20 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="qAMMgd+N"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=kernel.org header.i=@kernel.org header.b="ok+t6cFV" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org C2AF422210 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+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=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References:Message-ID: Subject: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=sihQaDZNxVMBQxGBcrfVOnQad7If4oKBsjmExRHUAc0=; b=qAMMgd+NtFyL8oIz9ULbwd/uz cnk2HivHkjjw97AkZbz/Zhh2zE4Upjs2Y03lQAAMWnZVY/AUsz3TqAt+zpWTRl+1d4HTL5unVvcDd OqGf0u/vApt/Rj/eHXD70V+x5HWsMR+wOf4uMTDizsVvudsjAHKa2jL1CF4THDFMPbjAJATu4ivPH 2DJCdlTW17YWLSXEBOeIpS+HlqmtGJsDxbhrTdT66yKQPu3z5jjYpWvXAF4Ifs2iNmEq1+BW3dV9b eNrT2qimkqZ6vUStWNdswdPmLEfSoHjCHqN/BrPCSA/Jc7qp9f+W+cvigbI8//usXavyQs+kP0a0n hTuOz58ng==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kYPcg-0002pi-6U; Fri, 30 Oct 2020 08:18:58 +0000 Received: from mail.kernel.org ([198.145.29.99]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kYPcd-0002p6-4D for linux-arm-kernel@lists.infradead.org; Fri, 30 Oct 2020 08:18:55 +0000 Received: from willie-the-truck (236.31.169.217.in-addr.arpa [217.169.31.236]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id E267022228; Fri, 30 Oct 2020 08:18:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1604045934; bh=8rOcJqln/miOd3/MTJuG+pTgP9+bOBD+gWzstFD1mIM=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=ok+t6cFVSMvk9yCZJUphhwuMgW5HqneTdZkqc8rrov4e+TPjUe+KKm/vcUm3yiNoz n2v2L0HScgM/Lsuc0pRl8LBkOzajKkNYM0jV+ZvlnCiRqpX3R7dB6PzHdVNuIm4bAt 4HsJJaGhdJml2f8sOgLByYLUzmFq7z1S6ZylWjIU= Date: Fri, 30 Oct 2020 08:18:49 +0000 From: Will Deacon To: Mark Rutland Subject: Re: [PATCHv2 2/3] arm64: cpufeature: reorder cpus_have_{const,final}_cap() Message-ID: <20201030081848.GB32066@willie-the-truck> References: <20201026134931.28246-1-mark.rutland@arm.com> <20201026134931.28246-3-mark.rutland@arm.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20201026134931.28246-3-mark.rutland@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-20201030_041855_286043_2A028B2C X-CRM114-Status: GOOD ( 20.80 ) 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: maz@kernel.org, dbrazdil@google.com, kvmarm@lists.cs.columbia.edu, 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+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Mon, Oct 26, 2020 at 01:49:30PM +0000, Mark Rutland wrote: > In a subsequent patch we'll modify cpus_have_const_cap() to call > cpus_have_final_cap(), and hence we need to define cpus_have_final_cap() > first. > > To make subsequent changes easier to follow, this patch reorders the two > without making any other changes. > > There should be no functional change as a result of this patch. You say this... > > Signed-off-by: Mark Rutland > Cc: David Brazdil > Cc: Marc Zyngier > Cc: Will Deacon > --- > arch/arm64/include/asm/cpufeature.h | 16 ++++++++-------- > 1 file changed, 8 insertions(+), 8 deletions(-) > > diff --git a/arch/arm64/include/asm/cpufeature.h b/arch/arm64/include/asm/cpufeature.h > index f7e7144af174c..5d18c54507e6a 100644 > --- a/arch/arm64/include/asm/cpufeature.h > +++ b/arch/arm64/include/asm/cpufeature.h > @@ -428,35 +428,35 @@ static __always_inline bool __cpus_have_const_cap(int num) > } > > /* > - * Test for a capability, possibly with a runtime check. > + * Test for a capability without a runtime check. > * > - * Before capabilities are finalized, this behaves as cpus_have_cap(). > + * Before capabilities are finalized, this will BUG(). > * After capabilities are finalized, this is patched to avoid a runtime check. > * > * @num must be a compile-time constant. > */ > -static __always_inline bool cpus_have_const_cap(int num) > +static __always_inline bool cpus_have_final_cap(int num) > { > if (system_capabilities_finalized()) > return __cpus_have_const_cap(num); > else > - return cpus_have_cap(num); > + BUG(); ... but isn't the failure case of calling cpus_have_final_cap() early now different? What does BUG() do at EL2 w/ nVHE? Will _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel