From patchwork Tue Sep 12 10:03:25 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Julien Grall X-Patchwork-Id: 112266 Delivered-To: patch@linaro.org Received: by 10.80.202.13 with SMTP id d13csp5674148edi; Tue, 12 Sep 2017 03:05:30 -0700 (PDT) X-Google-Smtp-Source: AOwi7QBQawmqF0bxhw28YwZFQyBKZkuFJUmtGh77rRMaRdoSQJcZ7HuqURIxpcqltpL0euRCc9Pi X-Received: by 10.107.164.97 with SMTP id n94mr21160038ioe.162.1505210730500; Tue, 12 Sep 2017 03:05:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1505210730; cv=none; d=google.com; s=arc-20160816; b=crK8K+EcGSCD9zOuokwvSp2fsq7Uegt6Q+tDqnYfnGYym90JlL/8odMt8dQbv4QKD1 3XlRBYWEH/dEIHy+zJ0OYJ9yKOgwxOdA919DP1ryhiyvPFcTKACGDCVb2ryHc6mo8AKk vnM3g6VHMayq4ZT72m8WwHiK8DBXfuWYq9aCU/+kWynSZLasEXeyVlRvWDcm9uLtRIWi 1CCiIsrB1GAEQLWrxqG4C7mPAgTTV208zmDMm+SZtU4Vm0EXMeB5yieFdWKSrsfY9gx+ eUdU/2XAX2aHZHLvHFlWbRrQIaHoCTP5AWLYTw2gA2rQEBR/unLgrVJNKjoOAafUzAAp ACNg== 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=LyYGAS4osaVxS/RD9ko1YRVFz+WNIQNIU0zdZQFTe8s=; b=arSV2JQQEzuhitZWR1yCy8FDNwAZ/mn2m8Y7reQj/o+5QcE5PFAJ3NYbP41AKANHZ/ hhhknI0XhJQPxyqMBcRxinpWE2KYAX9z5PzyE0hdTgqyU6zpr09RVzxWetMUSXAlT1B1 47/HcXH64m9Tf8WY2hnVfr3dA1UrxKszaj75RNPsrYuHWuGiK+/1pzP4hb4OHVER3gA0 tOkfluu71CoZNghe/qzXJx1/NtjZiMU624iohG4w3vn7538NY9k3CgmXwYk9yQRAbyfo tWm7+IUoOeK7+hn49ubfvIXPSw2Va5iw93Fe6TZX02vtSUi29LoKTkEYpFdBB8vfxng1 ecbw== 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 e129si10088922ioa.298.2017.09.12.03.05.30 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 12 Sep 2017 03:05:30 -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 1dri34-0003Jn-Fl; Tue, 12 Sep 2017 10:04:06 +0000 Received: from mail6.bemta6.messagelabs.com ([193.109.254.103]) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dri33-0003HJ-Iz for xen-devel@lists.xen.org; Tue, 12 Sep 2017 10:04:05 +0000 Received: from [193.109.254.147] by server-7.bemta-6.messagelabs.com id E3/E4-03610-411B7B95; Tue, 12 Sep 2017 10:04:04 +0000 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFnrILMWRWlGSWpSXmKPExsVysyfVTVd44/Z Ig64j3BZLPi5mcWD0OLr7N1MAYxRrZl5SfkUCa8bp5vtMBV85KlbfO8XcwDiFvYuRk0NIYDOj xNNmxi5GLiD7NKPEnJd3wBJsApoSdz5/YgKxRQSkJa59vswIYjMLREoc/vADrEZYIFpizdkjL CA2i4CqxIp958BqeAUsJc5/u8EMYksIyEvsarvICmJzAsVXfPzFBrHYQuL7yx+MExi5FzAyrG JUL04tKkst0jXUSyrKTM8oyU3MzNE1NDDTy00tLk5MT81JTCrWS87P3cQI9C4DEOxg3Pnc6RC jJAeTkijvb+HtkUJ8SfkplRmJxRnxRaU5qcWHGGU4OJQkeM+vB8oJFqWmp1akZeYAwwwmLcHB oyTCGweS5i0uSMwtzkyHSJ1i1OXouHn3D5MQS15+XqqUOG8GSJEASFFGaR7cCFjIX2KUlRLmZ QQ6SoinILUoN7MEVf4VozgHo5Iwr9wGoCk8mXklcJteAR3BBHQEz6UtIEeUJCKkpBoYS961TD g9+eiEYL/JV7jTmO9IbO5nfromLGmVsZO1s9zG6MvRUnH9jv9eBsQ2SZ5eWMYma7TgfrS50pJ 38bnlvRM7UnyWXVHU3n1q3pIPyr9+7/6i+G53Ko/XvzXLPx6WW3PcfOtcuX+Gn7WeHUnvcNaO urDs0LwNUk9muQVefN88YX/UK/2tF5RYijMSDbWYi4oTAUzbrfh0AgAA X-Env-Sender: julien.grall@arm.com X-Msg-Ref: server-14.tower-27.messagelabs.com!1505210642!103883571!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 40587 invoked from network); 12 Sep 2017 10:04:03 -0000 Received: from usa-sjc-mx-foss1.foss.arm.com (HELO foss.arm.com) (217.140.101.70) by server-14.tower-27.messagelabs.com with SMTP; 12 Sep 2017 10:04:03 -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 7B5341529; Tue, 12 Sep 2017 03:04:02 -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 8C50C3F578; Tue, 12 Sep 2017 03:04:01 -0700 (PDT) From: Julien Grall To: xen-devel@lists.xen.org Date: Tue, 12 Sep 2017 11:03:25 +0100 Message-Id: <20170912100330.2168-20-julien.grall@arm.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20170912100330.2168-1-julien.grall@arm.com> References: <20170912100330.2168-1-julien.grall@arm.com> Cc: andre.przywara@arm.com, Julien Grall , sstabellini@kernel.org Subject: [Xen-devel] [PATCH v2 19/24] 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 Reviewed-by: Stefano Stabellini --- 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 b00eebd96e..b0306a917b 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();