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: 110009 Delivered-To: patch@linaro.org Received: by 10.182.109.195 with SMTP id hu3csp4281633obb; Mon, 14 Aug 2017 07:26:20 -0700 (PDT) X-Received: by 10.107.201.150 with SMTP id z144mr18268538iof.132.1502720780696; Mon, 14 Aug 2017 07:26:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1502720780; cv=none; d=google.com; s=arc-20160816; b=g1e4/wf2zocG33OR21vEAaa0S5KD72xweLM7nS6nZkB7HlhxX4HCx8yo5Na4XXeN60 PpCHo/4BPly76gpgmhiMa+pDk7kNhuWl/6Ghh1204ZvkK9JnoC4u5cR6MdEfvl5Zmr2T ndCYKhku0C2xkjo1RANSu5tjGR16gRnvE9CBl6ZQqAL9H5ANdD1p82zxtQaH429wfALn Lm+V2Z7tj5+EmATdtEPiDmeb6qkMhrgZ1N2eQOxSTpB39TbRGAHYQrLwRObT8pBj+rh5 dUwsuQePsxpyyv8bQQgo1gddKOp/dsyNnIisTxiHTRoEnqe89GfM/fh8gFahjjzMJQPy UgHQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:mime-version :list-subscribe:list-help:list-post:list-unsubscribe:list-id :precedence:subject:cc:references:in-reply-to:message-id:date:to :from:arc-authentication-results; bh=hRQu9Fg2AufwddR8jW14QnxIb4HSaovdPJDxBRamlc4=; b=ZNf6F8qGNj4vSAd0Lk0XcPRM6n2txyV+8KDTheX+oblsUGwqgvXuimXq5r/3yefrt+ BqkE8TUmLaPO4TdzP9YubLCsCEROM9yxBO+Pj0qGr1u1io3lZYx+ukk6svBPt0/dQlbN iREp+OOeSo6fnrdsRYZUU0fToKcQl3Tl62skqd7FwDhQt1VxRzOksbswOkRRsn3gBEeD 6KjhuJRrUAKDhEAC47HHsDq9Qk4IfQ7G56hkRHbxXO91+vils4kIlCnDUU4a/duFNb9G YzjBZJ4XAqHCHM5P4/1i7kHMbd/A+hG91EpRYNERoEgw6DoQ7SOHu0+iNnvWLRlL7nuK yrjw== ARC-Authentication-Results: i=1; mx.google.com; spf=neutral (google.com: 192.237.175.120 is neither permitted nor denied by best guess record for domain of xen-devel-bounces@lists.xen.org) smtp.mailfrom=xen-devel-bounces@lists.xen.org Return-Path: Received: from lists.xenproject.org (lists.xenproject.org. [192.237.175.120]) by mx.google.com with ESMTPS id c75si7901894ioa.256.2017.08.14.07.26.20 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 14 Aug 2017 07:26:20 -0700 (PDT) Received-SPF: neutral (google.com: 192.237.175.120 is neither permitted nor denied by best guess record for domain of xen-devel-bounces@lists.xen.org) client-ip=192.237.175.120; Authentication-Results: mx.google.com; spf=neutral (google.com: 192.237.175.120 is neither permitted nor denied by best guess record for domain of xen-devel-bounces@lists.xen.org) smtp.mailfrom=xen-devel-bounces@lists.xen.org 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" 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();