From patchwork Wed Mar 2 22:56:00 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Daney X-Patchwork-Id: 8486611 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 3710A9F314 for ; Wed, 2 Mar 2016 22:58:35 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 4D0BD20254 for ; Wed, 2 Mar 2016 22:58:34 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 1D02220295 for ; Wed, 2 Mar 2016 22:58:32 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1abFhY-0002Pq-HG; Wed, 02 Mar 2016 22:57:04 +0000 Received: from mail-pa0-x243.google.com ([2607:f8b0:400e:c03::243]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1abFhB-00029u-Je for linux-arm-kernel@lists.infradead.org; Wed, 02 Mar 2016 22:56:43 +0000 Received: by mail-pa0-x243.google.com with SMTP id fl4so206622pad.2 for ; Wed, 02 Mar 2016 14:56:22 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=QP9NAI5UUFpfbEeV5/Lf/fhfT+2iG6w57ATTmZiqUiM=; b=rugnHTL2jpd79eTBghht25gIlolZa/QITQXNlvGbthbt8TfyDecC70MAVNF88luseK On5ggWUr/Qqu5x5TXHBMsh5l57tEQmEzCnmNBqClF1dA3ZwFP20rZFBd98Svs1WYnNZ2 fgqsotg9fLofYNgfpRhiXTaH3kJ7Ld+1jpBF0PEaHFkFdRnMBnCWGFS8VaQY/j3pnrYy fe87Aiz4Xv82ckwWtYlHy+C8ssG0r7NcM747NF0nXgoiM28qLVVSwpjmWCza+yPGVJJn hQKAqa85QPpAzqdxox5avcFdrZJbRvYbeBp9VZGGLZ7+unVn23txe8bTQEUvXsozVV3L mc9Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=QP9NAI5UUFpfbEeV5/Lf/fhfT+2iG6w57ATTmZiqUiM=; b=OUiXxXaDZEhSs8ky0aC1hd2bK4Ay+VwXHYotSEItu6eM+HCWn7JZiqHYmLkXJncttF NgUjTHxV9XCxzpD1K2ZOfakex5HTDhoj9Ol/xO4foeCQbowIRiyUAV1MxzXC/0C4YgRB cZK4iPbr/aW1vbO5FNV6KVpaEuZllLoRTHUJO2GZ58RZsLfkB1UkiHe/6K1X1jx2xs5x zqArZv0F8xNnn/fUBzcUQYAUiqZ7g1wmKzgJw3yMc54VsYsg1gPF1Wo1grnl0GXtextV mp9BF+wiTEyg3iE8nhuxqOYp8WJmayHor4v+x6rmfzysQ0r7UOmXzVLF+2paICK7qmGC Qtzw== X-Gm-Message-State: AD7BkJJxDbrztmrTvlt5CV5xkLmkfzZ3KlYzzmw+Qf5wV9AjY462b7b7YEgl+tcOC1VKLg== X-Received: by 10.66.90.226 with SMTP id bz2mr42530795pab.31.1456959381987; Wed, 02 Mar 2016 14:56:21 -0800 (PST) Received: from dl.caveonetworks.com ([64.2.3.194]) by smtp.gmail.com with ESMTPSA id l81sm6589747pfb.73.2016.03.02.14.56.14 (version=TLS1 cipher=AES128-SHA bits=128/128); Wed, 02 Mar 2016 14:56:19 -0800 (PST) Received: from dl.caveonetworks.com (localhost.localdomain [127.0.0.1]) by dl.caveonetworks.com (8.14.5/8.14.5) with ESMTP id u22MuDMK002091; Wed, 2 Mar 2016 14:56:13 -0800 Received: (from ddaney@localhost) by dl.caveonetworks.com (8.14.5/8.14.5/Submit) id u22MuDMM002090; Wed, 2 Mar 2016 14:56:13 -0800 From: David Daney To: Will Deacon , linux-arm-kernel@lists.infradead.org, Rob Herring , Frank Rowand , Grant Likely , Pawel Moll , Ian Campbell , Kumar Gala , Ganapatrao Kulkarni , Robert Richter , Ard Biesheuvel , Matt Fleming , Mark Rutland , Catalin Marinas Subject: [PATCH v13 4/6] arm64: Move unflatten_device_tree() call earlier. Date: Wed, 2 Mar 2016 14:56:00 -0800 Message-Id: <1456959362-2036-5-git-send-email-ddaney.cavm@gmail.com> X-Mailer: git-send-email 1.7.11.7 In-Reply-To: <1456959362-2036-1-git-send-email-ddaney.cavm@gmail.com> References: <1456959362-2036-1-git-send-email-ddaney.cavm@gmail.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20160302_145641_948126_A24BC8B1 X-CRM114-Status: GOOD ( 14.24 ) X-Spam-Score: -2.7 (--) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: devicetree@vger.kernel.org, linux-efi@vger.kernel.org, linux-kernel@vger.kernel.org, David Daney MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-4.1 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_MED, RP_MATCHES_RCVD, T_DKIM_INVALID, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: David Daney In order to extract NUMA information from the device tree, we need to have the tree in its unflattened form. Move the call to unflatten_device_tree() into paging_init(). This puts it before the call to bootmem_init(), which is where the NUMA information is extracted. Signed-off-by: David Daney --- arch/arm64/kernel/setup.c | 7 +++---- arch/arm64/mm/mmu.c | 5 +++++ 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/arch/arm64/kernel/setup.c b/arch/arm64/kernel/setup.c index 8119479..feae073 100644 --- a/arch/arm64/kernel/setup.c +++ b/arch/arm64/kernel/setup.c @@ -328,12 +328,11 @@ void __init setup_arch(char **cmdline_p) early_ioremap_reset(); - if (acpi_disabled) { - unflatten_device_tree(); + if (acpi_disabled) psci_dt_init(); - } else { + else psci_acpi_init(); - } + xen_early_init(); cpu_read_bootcpu_ops(); diff --git a/arch/arm64/mm/mmu.c b/arch/arm64/mm/mmu.c index 58faeaa..ee6e6b0 100644 --- a/arch/arm64/mm/mmu.c +++ b/arch/arm64/mm/mmu.c @@ -29,6 +29,8 @@ #include #include #include +#include +#include #include #include @@ -459,6 +461,9 @@ void __init paging_init(void) map_mem(); fixup_executable(); + if (acpi_disabled) + unflatten_device_tree(); + /* allocate the zero page. */ zero_page = early_alloc(PAGE_SIZE);