From patchwork Mon Aug 14 14:24:13 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Julien Grall X-Patchwork-Id: 9899025 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 7A8E1603B5 for ; Mon, 14 Aug 2017 14:27:22 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 6D857284D1 for ; Mon, 14 Aug 2017 14:27:22 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 6261028534; Mon, 14 Aug 2017 14:27:22 +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 BA102285E3 for ; Mon, 14 Aug 2017 14:27:18 +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 1dhGIh-0000wF-0u; Mon, 14 Aug 2017 14:25:03 +0000 Received: from mail6.bemta6.messagelabs.com ([193.109.254.103]) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dhGIf-0000qm-OZ for xen-devel@lists.xen.org; Mon, 14 Aug 2017 14:25:01 +0000 Received: from [193.109.254.147] by server-8.bemta-6.messagelabs.com id AE/E9-09901-DB2B1995; Mon, 14 Aug 2017 14:25:01 +0000 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFnrELMWRWlGSWpSXmKPExsVysyfVTXfPpom RBl8uqFss+biYxYHR4+ju30wBjFGsmXlJ+RUJrBnbNn1jLGjlqJjzaCFLA+M+ti5GLg4hgc2M Er8uPmKBcE4zSiw6uxXI4eRgE9CUuPP5ExOILSIgLXHt82VGEJtZIFLi8Icf7CC2sECExIpNM 8BsFgFViQM3j7GC2LwCVhIHrt8G65UQkJfY1XYRLM4JFO+8uxNsvpCApcSJ1bPZJjByL2BkWM WoXpxaVJZapGupl1SUmZ5RkpuYmaNraGCml5taXJyYnpqTmFSsl5yfu4kR6F8GINjBeHdTwCF GSQ4mJVHeBJ/eSCG+pPyUyozE4oz4otKc1OJDjDIcHEoSvKkbJ0YKCRalpqdWpGXmAAMNJi3B waMkwjsLJM1bXJCYW5yZDpE6xajL8WrC/29MQix5+XmpUuK85SBFAiBFGaV5cCNgQX+JUVZKm JcR6CghnoLUotzMElT5V4ziHIxKwryVIFN4MvNK4Da9AjqCCeiIPpD7eYtLEhFSUg2MOmctz0 oaSKdGTd9Xuqase8HXMz8ud3A7/d9QniNicNLS/O8f9iWTvqjPNI1M9vI+tr7w4trP9guCPc/ nHfrMPzv5ywFdrqaVsTdavnm2BBpoqeotOX3EsSUnotA/5/s3e7fpiUs//ynp2v+I45fbzNn5 6v73VV4Kpy5aIfZB3t3a7esvvnITJZbijERDLeai4kQABh6ZGHUCAAA= X-Env-Sender: julien.grall@arm.com X-Msg-Ref: server-16.tower-27.messagelabs.com!1502720700!111407837!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 19353 invoked from network); 14 Aug 2017 14:25:00 -0000 Received: from usa-sjc-mx-foss1.foss.arm.com (HELO foss.arm.com) (217.140.101.70) by server-16.tower-27.messagelabs.com with SMTP; 14 Aug 2017 14:25:00 -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 ECA161713; Mon, 14 Aug 2017 07:24:59 -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 0CE2E3F483; Mon, 14 Aug 2017 07:24:58 -0700 (PDT) From: Julien Grall To: xen-devel@lists.xen.org Date: Mon, 14 Aug 2017 15:24:13 +0100 Message-Id: <20170814142418.13267-23-julien.grall@arm.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20170814142418.13267-1-julien.grall@arm.com> References: <20170814142418.13267-1-julien.grall@arm.com> Cc: andre.przywara@arm.com, Julien Grall , sstabellini@kernel.org Subject: [Xen-devel] [PATCH 22/27] 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 --- 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 277b566b88..46737a2eca 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();