Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756770AbcCCQgZ (ORCPT ); Thu, 3 Mar 2016 11:36:25 -0500 Received: from mail-ig0-f182.google.com ([209.85.213.182]:33506 "EHLO mail-ig0-f182.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752348AbcCCQgX (ORCPT ); Thu, 3 Mar 2016 11:36:23 -0500 MIME-Version: 1.0 In-Reply-To: <56D86761.9060905@caviumnetworks.com> References: <1456959362-2036-1-git-send-email-ddaney.cavm@gmail.com> <1456959362-2036-5-git-send-email-ddaney.cavm@gmail.com> <56D86761.9060905@caviumnetworks.com> Date: Thu, 3 Mar 2016 17:36:22 +0100 Message-ID: Subject: Re: [PATCH v13 4/6] arm64: Move unflatten_device_tree() call earlier. From: Ard Biesheuvel To: David Daney Cc: Rob Herring , David Daney , Will Deacon , "linux-arm-kernel@lists.infradead.org" , Frank Rowand , Grant Likely , Pawel Moll , Ian Campbell , Kumar Gala , Ganapatrao Kulkarni , Robert Richter , Matt Fleming , Mark Rutland , Catalin Marinas , "linux-efi@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "devicetree@vger.kernel.org" , David Daney Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1082 Lines: 37 On 3 March 2016 at 17:33, David Daney wrote: > On 03/03/2016 05:47 AM, Rob Herring wrote: >> >> On Wed, Mar 2, 2016 at 4:56 PM, David Daney wrote: >>> >>> 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. >> >> >> Can't you just move up unflatten_device_tree in setup_arch rather than >> hiding in paging_init? > > > No. > > It must come *after* map_mem() and *before* bootmem_init(), both of which > are done within paging_init(). > > One option would be to split the things in paging_init() into two functions, > and then do: > > . > . > . > paging_init_first_part(); > if (acpi_disabled) > unflatten_device_tree(); > paging_init_second_part(); > . I think it makes more sense to move bootmem_init() to setup_arch() then