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=-3.8 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=no 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 7D5D9C55178 for ; Fri, 30 Oct 2020 14:19:37 +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 EF43420825 for ; Fri, 30 Oct 2020 14:19:36 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="l1xlKgka" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org EF43420825 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=arm.com 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=HuQ2BOHxjltv/MJL2iUlQ0zgiTy3izwDbEheCYTo6vY=; b=l1xlKgkalts+bg6B6dtpuTJo+ sYYyNOOTc/qo4+tHsEgxzxxaJ7NB42tv3eSC9KwenwPXNdbDvpmzZJJglLWl78UjgZMfVr1KkmR6A 9oi4EDLjVMHOeKd9JKEkYdb20bIxbBX/49ZT0fTm5FPrndvj36MJ6GsdK3JVYW4bm97GdjfMvvMQT mObTeQ575X2+qOrfBVqCzn0e8um64Cs9mc6XrqwmWPzXoehbYjSUDptfxpCq80Nm2xwa/jlu0cI43 W1j5cFYBvULp15+J10AsDsIVWiSLsM6E6rkdagDs9S4/M7Q3YEtFecolhNPoOsM5lvJxaXk33VcAy HJ9W0ySXg==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kYVF9-0006We-1t; Fri, 30 Oct 2020 14:19:03 +0000 Received: from foss.arm.com ([217.140.110.172]) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kYVF6-0006W0-BN for linux-arm-kernel@lists.infradead.org; Fri, 30 Oct 2020 14:19:01 +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 4FD6B139F; Fri, 30 Oct 2020 07:18:55 -0700 (PDT) Received: from C02TD0UTHF1T.local (unknown [10.57.53.28]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 0355D3F68F; Fri, 30 Oct 2020 07:18:53 -0700 (PDT) Date: Fri, 30 Oct 2020 14:18:51 +0000 From: Mark Rutland To: Will Deacon Subject: Re: [PATCHv2 2/3] arm64: cpufeature: reorder cpus_have_{const,final}_cap() Message-ID: <20201030141851.GC50718@C02TD0UTHF1T.local> References: <20201026134931.28246-1-mark.rutland@arm.com> <20201026134931.28246-3-mark.rutland@arm.com> <20201030081848.GB32066@willie-the-truck> <20201030082013.GC32066@willie-the-truck> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20201030082013.GC32066@willie-the-truck> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20201030_101900_451630_6979FCA1 X-CRM114-Status: GOOD ( 19.19 ) 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 Fri, Oct 30, 2020 at 08:20:14AM +0000, Will Deacon wrote: > On Fri, Oct 30, 2020 at 08:18:48AM +0000, Will Deacon wrote: > > 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... [...] > > > -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? > > Ah no, sorry, I see you're just moving things around and the diff makes it > look confusing (that and I've been up since 5:30 for KVM Forum). Indeed; the diff was even more confusing before I split this from the changes in the next patch! > So on closer inspection: > > Acked-by: Will Deacon Cheers! Mark. _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel