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 79515C3DA4A for ; Thu, 22 Aug 2024 09:55:49 +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=Y4olIiL4p9UTqCLwimTFEYXngcc3zi2M3nP2mbEdgMY=; b=dleKfRImRlUO/i+XDR/8LXItf/ YB4IyGzctXOcjryJeSprmJGE67g+s+J5Tcs+f91RCHG+JBTvoBn7UZkEc1maUGnHM3ibUfZb4Yo+v +FdwpCm/jx+IA+jm0CWbaWpv1RCG0Et5j23NJqOWhCJO3uCmQJAUqZCSZOTaL4JoNmek8jq8efg02 RoNGLdmQucnm4hq0nmQZgkEYQJbs2Kq/EFlZF/XlSfeiwtSb7It4El2bWM+H8MCGnMM/8X8xlVaWr vIqTC8BGaApdankZayd1+t/V7BJNUDNnkBJ+bS6PTzBybj6h75JVh+3PHxvDtFlT18CTAw3Kucc2P KdhWEaDg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sh4XY-0000000CLWj-14Nj; Thu, 22 Aug 2024 09:55:36 +0000 Received: from foss.arm.com ([217.140.110.172]) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sh4Wo-0000000CLSm-1W3c for linux-arm-kernel@lists.infradead.org; Thu, 22 Aug 2024 09:54:51 +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 DC079DA7; Thu, 22 Aug 2024 02:55:15 -0700 (PDT) Received: from J2N7QTR9R3 (usa-sjc-imap-foss1.foss.arm.com [10.121.207.14]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id B90B03F66E; Thu, 22 Aug 2024 02:54:48 -0700 (PDT) Date: Thu, 22 Aug 2024 10:54:46 +0100 From: Mark Rutland To: Andre Przywara Cc: linux-arm-kernel@lists.infradead.org, akos.denke@arm.com, luca.fancellu@arm.com, maz@kernel.org Subject: Re: [BOOT-WRAPPER v2 08/10] Simplify spin logic Message-ID: References: <20240812101555.3558589-1-mark.rutland@arm.com> <20240812101555.3558589-9-mark.rutland@arm.com> <20240821175525.07cf69b2@donnerap.manchester.arm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20240821175525.07cf69b2@donnerap.manchester.arm.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240822_025450_472450_13C48368 X-CRM114-Status: GOOD ( 21.37 ) 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 Wed, Aug 21, 2024 at 05:55:25PM +0100, Andre Przywara wrote: > On Mon, 12 Aug 2024 11:15:53 +0100 > Mark Rutland wrote: > > > The logic for initial boot is more complicated than it needs to be, > > with both first_spin() having a special case for CPU0 that requires an > > additional argument to be passed to spin(). > > > > Simplify this by moving the special-case logic for CPU0 into > > first_spin(). This removes the need to provide a dummy mailbox for CPU0 > > to spin on, simplfiies callers of first_spin() and spin(), which no > > longer need to pass a dummy mailbox or 'is_entry' for CPU0. > > Ah, that's a nice one! Indeed this looks much cleaner now. The change > looks good to me, just some small thing below: > > > Signed-off-by: Mark Rutland > > Acked-by: Marc Zyngier > > Cc: Akos Denke > > Cc: Andre Przywara > > Cc: Luca Fancellu > > --- > > arch/aarch64/spin.S | 11 +---------- > > common/boot.c | 20 ++++++++------------ > > common/psci.c | 2 +- > > include/boot.h | 2 +- > > 4 files changed, 11 insertions(+), 24 deletions(-) > > > > diff --git a/arch/aarch64/spin.S b/arch/aarch64/spin.S > > index 375f732..a7879d4 100644 > > --- a/arch/aarch64/spin.S > > +++ b/arch/aarch64/spin.S > > @@ -23,15 +23,6 @@ ASM_FUNC(start_bootmethod) > > * Primary CPU (x0 = 0) jumps to kernel, the other ones wait for an > > * address to appear in mbox > > I think this comment is a bit out of place now, either remove it entirely, > or hint that first_spin will take care of the difference between mbox and > kernel entrypoint. I'll delete it. > Regardless: > > Reviewed-by: Andre Przywara Thanks! Mark.