From patchwork Mon Oct 9 13:23:35 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Julien Grall X-Patchwork-Id: 9993227 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 7A84A603B5 for ; Mon, 9 Oct 2017 13:26:13 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 6CB6F287DA for ; Mon, 9 Oct 2017 13:26:13 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 619FC287E9; Mon, 9 Oct 2017 13:26:13 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.2 required=2.0 tests=BAYES_00, RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 18EC1287DB for ; Mon, 9 Oct 2017 13:26:13 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1e1Y2F-0007yd-Ao; Mon, 09 Oct 2017 13:23:55 +0000 Received: from mail6.bemta5.messagelabs.com ([195.245.231.135]) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1e1Y2E-0007yS-GL for xen-devel@lists.xen.org; Mon, 09 Oct 2017 13:23:54 +0000 Received: from [85.158.139.211] by server-7.bemta-5.messagelabs.com id FE/CD-02216-9687BD95; Mon, 09 Oct 2017 13:23:53 +0000 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFnrMLMWRWlGSWpSXmKPExsVysyfVTTez4na kwbtHPBZLPi5mcWD0OLr7N1MAYxRrZl5SfkUCa8acXY2sBU85K+b92M7WwPiWvYuRi0NIYDOj xP6L59ggnNOMEq0bmlm7GDk52AQ0Je58/sQEYosISEtc+3yZEcRmFoiUOPzhBzuILSwQLXHw3 XywOIuAqsSGNU1gvbwCFhJPLqwFi0sIyEvsarsIFucUsJSYtnk6M4gtBFRz+cMO1gmM3AsYGV YxahSnFpWlFukaWeglFWWmZ5TkJmbm6BoamOrlphYXJ6an5iQmFesl5+duYgR6uJ6BgXEHY98 qv0OMkhxMSqK8UwpuRwrxJeWnVGYkFmfEF5XmpBYfYpTh4FCS4LUvB8oJFqWmp1akZeYAQw0m LcHBoyTCW14KlOYtLkjMLc5Mh0idYtTl6Lh59w+TEEtefl6qlDivL8gMAZCijNI8uBGwsL/EK CslzMvIwMAgxFOQWpSbWYIq/4pRnINRSZj3UxnQFJ7MvBK4Ta+AjmACOoKx+AbIESWJCCmpBk b+tLZStcOmhtXdHckLqr5fD2w3eKFS88MoLiLgrdbfJ+WfVDVj26JWJkc7X0ljkjRXSJXm8OM snPn48Pp/Yotevlrz9cJG3jlir4TKPZ/VJ/KK1k7wjLqsUDN3f4mjkXDlkXKtf1ZdtcLvOPLW f3baUbZsYY2QuMaKH+zea3/4r+Xr29zwSImlOCPRUIu5qDgRAKkaZ652AgAA X-Env-Sender: julien.grall@arm.com X-Msg-Ref: server-11.tower-206.messagelabs.com!1507555432!86354615!1 X-Originating-IP: [217.140.101.70] X-SpamReason: No, hits=0.0 required=7.0 tests= X-StarScan-Received: X-StarScan-Version: 9.4.45; banners=-,-,- X-VirusChecked: Checked Received: (qmail 41184 invoked from network); 9 Oct 2017 13:23:53 -0000 Received: from foss.arm.com (HELO foss.arm.com) (217.140.101.70) by server-11.tower-206.messagelabs.com with SMTP; 9 Oct 2017 13:23:53 -0000 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.72.51.249]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 6D4E51435; Mon, 9 Oct 2017 06:23:52 -0700 (PDT) Received: from e108454-lin.cambridge.arm.com (e108454-lin.cambridge.arm.com [10.1.206.53]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 81DBF3F578; Mon, 9 Oct 2017 06:23:51 -0700 (PDT) From: Julien Grall To: xen-devel@lists.xen.org Date: Mon, 9 Oct 2017 14:23:35 +0100 Message-Id: <20171009132341.1678-5-julien.grall@arm.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20171009132341.1678-1-julien.grall@arm.com> References: <20171009132341.1678-1-julien.grall@arm.com> Cc: andre.przywara@arm.com, Julien Grall , sstabellini@kernel.org Subject: [Xen-devel] [PATCH v4 04/10] xen/arm: Switch to SYS_STATE_boot just after end_boot_allocator() X-BeenThere: xen-devel@lists.xen.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: xen-devel-bounces@lists.xen.org Sender: "Xen-devel" X-Virus-Scanned: ClamAV using ClamSMTP We should consider the early boot period to end when we stop using the boot allocator. This is inline with x86 and will be helpful to know whether we should allocate memory from the boot allocator or xenheap. Signed-off-by: Julien Grall Reviewed-by: Andre Przywara Reviewed-by: Stefano Stabellini --- Changes in v3: - Add Stefano's reviewed-by Changes in v2: - Add Andre's reviewed-by --- xen/arch/arm/setup.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/xen/arch/arm/setup.c b/xen/arch/arm/setup.c index 3df451ae6f..16a3b1be8e 100644 --- a/xen/arch/arm/setup.c +++ b/xen/arch/arm/setup.c @@ -757,6 +757,12 @@ void __init start_xen(unsigned long boot_phys_offset, end_boot_allocator(); + /* + * The memory subsystem has been initialized, we can now switch from + * early_boot -> boot. + */ + system_state = SYS_STATE_boot; + vm_init(); if ( acpi_disabled ) @@ -779,8 +785,6 @@ void __init start_xen(unsigned long boot_phys_offset, console_init_preirq(); console_init_ring(); - system_state = SYS_STATE_boot; - processor_id(); smp_init_cpus();