Received: by 2002:a25:824b:0:0:0:0:0 with SMTP id d11csp443260ybn; Wed, 2 Oct 2019 00:14:24 -0700 (PDT) X-Google-Smtp-Source: APXvYqx77KqQeo9HLCHx7/ijN1hrNdh++eAcBiXlmwAJQ0KVgUhRlJnSJNOpc088oVSnlarqxTx0 X-Received: by 2002:aa7:c4d0:: with SMTP id p16mr2234969edr.266.1570000464212; Wed, 02 Oct 2019 00:14:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1570000464; cv=none; d=google.com; s=arc-20160816; b=dqWR/5WUC6qPsV+AsWzeFHp7/97m7e1yOF/hpV203jMGjIwfCPg3nvUYHpFbLkLuZE AsiYnAgtIRu2l5WTEdQ7sxDQ8n3I5619Jn6mYjkDm3wkq2XsYupax+zP0InDhpVHC7/u EvWAhv1qP7N17laeTQ8Y2hYKJnHkeUHDxLcNdt/ikdZHrovB5Ix2ccxSKVGOPoa5Drw8 OZYw/hCFizdJ3sB8ATkX7ZQaHJTt2GV/GXfLRqXMLXFYY0t/+AbiVMKvNCAhP17vISLy J2Yom6Dc7oPwNQzd4Aoc0/AyRnWeVTKRLDGC+qz2oYR0u1SwGLDriIYtKojKc9Ks111N hwmA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=+i8Hqk9TNB+aIulZQ0M6n2+Fn12nw9A0MsPfMGWsUIU=; b=JYSb5woz8l7GjJwT29CZxjqgvt7ETEKCbLs6M0i6x08tsyvuIet7QB+B3Lmw2flEJ6 4emMWrpLjY/3sEIDG6gaymnh4SMShOUVIjMkuNmbXarQgBbOIzgI7GX75Q7l/VTlh3U5 IretJ0EyLTnhVcfWHlahe8rLcK9+0jzkl1YlIO1hBGNYnF2HEPUurn9IyIZMIaD9KC/Y XHj+j9xEe8+WsHGD5OOM93YJ6RAey0MobpJgLrL3MXEb/pzmWNRlWkQSKPv8JNh4SzZ6 VXVisbxk7GOFgQAsw4ki9b2DHgg7qp99IbNnG2t+lspj5az4v8i59s2HVvcEsb1QSkou wzzg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=INBGA54o; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id p40si12198576eda.334.2019.10.02.00.13.59; Wed, 02 Oct 2019 00:14:24 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=INBGA54o; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726489AbfJBHCh (ORCPT + 99 others); Wed, 2 Oct 2019 03:02:37 -0400 Received: from mail.kernel.org ([198.145.29.99]:59796 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726010AbfJBHCh (ORCPT ); Wed, 2 Oct 2019 03:02:37 -0400 Received: from rapoport-lnx (nesher1.haifa.il.ibm.com [195.110.40.7]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 31DEF205F4; Wed, 2 Oct 2019 07:02:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1569999755; bh=gfvMJztY6ERx8bgCJdAV+p+v7AS+PD1KWinNzWKnGaM=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=INBGA54onbDExead9nvuRAysyQDSrniONlAkQrW5MCrghycHdn51SXN2Vq++k3faq DOHBKBseZVjhVToyHIqEgSxM9fn7Td07CFMYvyJ2N7hNdsKQasrvxpCxtLwTV6TrY9 QwizayAknp/X3si6G3pYjZuq1NLFJJcDXshI6OIk= Date: Wed, 2 Oct 2019 10:02:29 +0300 From: Mike Rapoport To: Paul Burton Cc: linux-mips@vger.kernel.org, linux-kernel@vger.kernel.org, Mike Rapoport , Thomas Bogendoerfer Subject: Re: [PATCH v2] mips: sgi-ip27: switch from DISCONTIGMEM to SPARSEMEM Message-ID: <20191002070226.GA3897@rapoport-lnx> References: <1568632390-20893-1-git-send-email-rppt@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1568632390-20893-1-git-send-email-rppt@kernel.org> User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi, Any updates on this? On Mon, Sep 16, 2019 at 02:13:10PM +0300, Mike Rapoport wrote: > From: Mike Rapoport > > The memory initialization of SGI-IP27 is already half-way to support > SPARSEMEM. It only had free_bootmem_with_active_regions() left-overs > interfering with sparse_memory_present_with_active_regions(). > > Replace these calls with simpler memblocks_present() call in prom_meminit() > and adjust arch/mips/Kconfig to enable SPARSEMEM and SPARSEMEM_EXTREME for > SGI-IP27. > > Co-developed-by: Thomas Bogendoerfer > Signed-off-by: Thomas Bogendoerfer > Signed-off-by: Mike Rapoport > --- > > v2: don't add extra sparse_init() and use memblocks_present() instead of > sparse_memory_present_with_active_regions() > > arch/mips/Kconfig | 12 ++---------- > arch/mips/sgi-ip27/ip27-memory.c | 6 ++---- > 2 files changed, 4 insertions(+), 14 deletions(-) > > diff --git a/arch/mips/Kconfig b/arch/mips/Kconfig > index d50fafd..e4b02b5 100644 > --- a/arch/mips/Kconfig > +++ b/arch/mips/Kconfig > @@ -669,6 +669,7 @@ config SGI_IP22 > config SGI_IP27 > bool "SGI IP27 (Origin200/2000)" > select ARCH_HAS_PHYS_TO_DMA > + select ARCH_SPARSEMEM_ENABLE > select FW_ARC > select FW_ARC64 > select BOOT_ELF64 > @@ -2633,18 +2634,9 @@ config ARCH_FLATMEM_ENABLE > def_bool y > depends on !NUMA && !CPU_LOONGSON2 > > -config ARCH_DISCONTIGMEM_ENABLE > - bool > - default y if SGI_IP27 > - help > - Say Y to support efficient handling of discontiguous physical memory, > - for architectures which are either NUMA (Non-Uniform Memory Access) > - or have huge holes in the physical address space for other reasons. > - See for more. > - > config ARCH_SPARSEMEM_ENABLE > bool > - select SPARSEMEM_STATIC > + select SPARSEMEM_STATIC if !SGI_IP27 > > config NUMA > bool "NUMA Support" > diff --git a/arch/mips/sgi-ip27/ip27-memory.c b/arch/mips/sgi-ip27/ip27-memory.c > index fb077a9..9db8692 100644 > --- a/arch/mips/sgi-ip27/ip27-memory.c > +++ b/arch/mips/sgi-ip27/ip27-memory.c > @@ -406,12 +406,8 @@ static void __init node_mem_init(cnodeid_t node) > slot_freepfn += PFN_UP(sizeof(struct pglist_data) + > sizeof(struct hub_data)); > > - free_bootmem_with_active_regions(node, end_pfn); > - > memblock_reserve(slot_firstpfn << PAGE_SHIFT, > ((slot_freepfn - slot_firstpfn) << PAGE_SHIFT)); > - > - sparse_memory_present_with_active_regions(node); > } > > /* > @@ -444,6 +440,8 @@ void __init prom_meminit(void) > } > __node_data[node] = &null_node; > } > + > + memblocks_present(); > } > > void __init prom_free_prom_memory(void) > -- > 2.7.4 > -- Sincerely yours, Mike.