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 5ABAFC3DA49 for ; Fri, 2 Aug 2024 10:18:54 +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:Content-Type:MIME-Version: References:In-Reply-To:Subject:Cc:To:From:Message-ID: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=yfmKNtuA0LyH9qRX0l6ee5LwMUJcGbJJxd6PRE3H3WU=; b=LY++GrG+37mCmohF8L7rF8eBEN kXSE9iOzrEmlGaOg6Uc1b1T/5zdDu9k28b+A5oRDzkKONptZdMcnMkGB5NOonN8XVxPKpm4Spw1+4 wtkVlqlq8XBa0v8db743UGE8Y2x7UbhQQ5yztB1CI3Pf+pddja4B3nuSZGNtsxGDz+GzrjVmNZbBc nDJ8vmHIoMI+rYUiv/lf4GEmx9+ThXXyn+4oE9+ayZrqcWgm/HCKw07dZmrLLSGXEgoiz4SSslLSs H1GZerNw0SrgdMyO1VuZ6h3osmlXRR7BbzY0NvJjJEqMMaXMzHN/KC6qaWKNSF8/pUDrNLOokFzcl HuO97oHQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sZpMt-00000008R09-3p0b; Fri, 02 Aug 2024 10:18:39 +0000 Received: from dfw.source.kernel.org ([139.178.84.217]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sZpMP-00000008QyB-1dbv for linux-arm-kernel@lists.infradead.org; Fri, 02 Aug 2024 10:18:10 +0000 Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by dfw.source.kernel.org (Postfix) with ESMTP id 5475D60B31; Fri, 2 Aug 2024 10:18:08 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id EBDDBC32782; Fri, 2 Aug 2024 10:18:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1722593888; bh=kvoKzS0IztQvn5AgI26ilOgUw3dNyaJkblMXJH1ezUE=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=GjHnsXog63DamH/jXjBtK7UwnWtrtH9FwvxiKh4v+sFRM82HE5+JT2Lj9VQg2R0kK /AWKhMD9i/OU2Qpt768NO/bgXi98JJyjyomPt7IKSXrx3QNZUlWXC8IuOrfiHE1ZaG LsNtl7RhXV5FNPykiohDK1JtpkC439C4vJ5Hg3YwRRAniTqqLFEEndhrq8oDTrSuns 5dDJ2MQEBIcSN52YlcHtEg2VRmCMN26AxOJbUPWsJ8bD5kW+85/6Ft++PwkMObzylI vOzQlZLAHznjETCxw2sOGYJsX7AwG64Vmv7/mF3GQ02N+bZb0jSjF7EsC7O8iApl9e Mt8KqmOIa5JtQ== Received: from sofa.misterjones.org ([185.219.108.64] helo=goblin-girl.misterjones.org) by disco-boy.misterjones.org with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.95) (envelope-from ) id 1sZpML-0004mH-US; Fri, 02 Aug 2024 11:18:06 +0100 Date: Fri, 02 Aug 2024 11:18:05 +0100 Message-ID: <86frrn1b4y.wl-maz@kernel.org> From: Marc Zyngier To: Mark Rutland Cc: linux-arm-kernel@lists.infradead.org, akos.denke@arm.com, andre.przywara@arm.com, luca.fancellu@arm.com Subject: Re: [BOOT-WRAPPER 00/11] Cleanup initialization In-Reply-To: <20240729161501.1806271-1-mark.rutland@arm.com> References: <20240729161501.1806271-1-mark.rutland@arm.com> User-Agent: Wanderlust/2.15.9 (Almost Unreal) SEMI-EPG/1.14.7 (Harue) FLIM-LB/1.14.9 (=?UTF-8?B?R29qxY0=?=) APEL-LB/10.8 EasyPG/1.0.0 Emacs/29.3 (aarch64-unknown-linux-gnu) MULE/6.0 (HANACHIRUSATO) MIME-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") Content-Type: text/plain; charset=US-ASCII X-SA-Exim-Connect-IP: 185.219.108.64 X-SA-Exim-Rcpt-To: mark.rutland@arm.com, linux-arm-kernel@lists.infradead.org, akos.denke@arm.com, andre.przywara@arm.com, luca.fancellu@arm.com X-SA-Exim-Mail-From: maz@kernel.org X-SA-Exim-Scanned: No (on disco-boy.misterjones.org); SAEximRunCond expanded to false X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240802_031809_597849_2209D326 X-CRM114-Status: GOOD ( 19.25 ) 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 Mon, 29 Jul 2024 17:14:50 +0100, Mark Rutland wrote: > > These patches cleanup the boot-wrapper initialization logic to make it > more consistent and easier to extend in C code in future. The big > changes are: > > * The kernel is always entered via an exception return. This allows us > to initialize PSTATE consistently, and will allow us to adjust the > SPSR dynamically in C code in future if necessary. > > * Regardless of the entered exception level, CPU state is initialized > under cpu_init_arch(), allowing for logic to be shared regardless of > which exception level was entered. > > * CPUs are initialized sequentially, which allows better for better > logging within the boot-wrapper. > > Mark. > > Mark Rutland (11): > Always enter AArch32 kernels in ARM mode > aarch64: Remove redundant EL1 entry logic > aarch64: Implement cpu_init_arch() > aarch64: Always enter kernel via exception return > aarch32: Refactor inital entry > aarch32: Implement cpu_init_arch() > aarch32: Always enter kernel via exception return > Unify assembly setup paths > Simplify spin logic > Add printing functions > Boot CPUs sequentially > > arch/aarch32/boot.S | 95 ++++++++++---------- > arch/aarch32/include/asm/{gic-v3.h => gic.h} | 2 +- > arch/aarch32/init.c | 30 +++++-- > arch/aarch64/boot.S | 66 ++++---------- > arch/aarch64/include/asm/{gic-v3.h => gic.h} | 2 +- > arch/aarch64/init.c | 30 +++++-- > arch/aarch64/spin.S | 14 +-- > common/boot.c | 20 ++--- > common/gic-v3.c | 2 +- > common/gic.c | 2 +- > common/init.c | 50 +++++++++-- > common/platform.c | 35 ++++++++ > common/psci.c | 16 +--- > include/boot.h | 8 +- > include/gic.h | 16 ++++ > include/platform.h | 4 + > 16 files changed, 221 insertions(+), 171 deletions(-) > rename arch/aarch32/include/asm/{gic-v3.h => gic.h} (91%) > rename arch/aarch64/include/asm/{gic-v3.h => gic.h} (92%) > create mode 100644 include/gic.h This looks good to me. With the issue reported by Lucas fixed and an extra comment in patch #3: Acked-by: Marc Zyngier M. -- Without deviation from the norm, progress is not possible.