Received: by 2002:a25:c593:0:0:0:0:0 with SMTP id v141csp414820ybe; Wed, 4 Sep 2019 23:11:21 -0700 (PDT) X-Google-Smtp-Source: APXvYqxSeSptVVtE7hyZWMJMdWvijtvEwSm+SYflCWZbSRhkvNRFSu8s9nQJCYgsx7HPiCuTPjdc X-Received: by 2002:a17:902:a507:: with SMTP id s7mr1649531plq.66.1567663881698; Wed, 04 Sep 2019 23:11:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1567663881; cv=none; d=google.com; s=arc-20160816; b=ASgoQaSAPfFfRpJ8Gatpuh+qvBWDm1ZK1kPQRCLq1L5e2C/sdtgJFSlueuxsbfBoLd wMbxUBXRT89IOROLcjfI6f2BZrua+hFzSH64kQ/t0S2QeZ1M8eZN2Ym8lKtW3kOQ8rt9 HAYx0p8iB6ibdiUm4BF/AniErfNrA8L6B/hv90LS2vkYaPL5cOSu1ftWDDupZX8XmIEx BropTwP+NqbJy71jS5cOb7S+DNPth857MordzimY56ePU5HAnn9ixTDFbtSazJXRpnIC xgMzPYWKEM9dYHKn0BXFceBdm8Fs42dNJ7wfCcz/SlmA8TLuEeL9RC9rfzLbeIEFzprR e3LQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :dkim-signature; bh=Nm0MSSXbrl+iBo1qj9Z/vPt1bhrd85Jn+m2woAD2d28=; b=cH45cd4e0WDYefCLSCHO8aEkeI0jTUcubCb0hWaSyi2Opwz0OG7OpcHPxGc71NfR0I RW1elvkscSk4fsiNp1OkAdxqFpLLnWOQKQPRzesFYhNwWAVFVpIBRtorKWCiCinW8PD6 8duSxLJtU5ej6myfzqJJ9VjAGFrUlEIdPOyV4DJ9GglWvZop7+6SwM8lCzvT6sIqzfqt R1Kw7kxiMYWxk/XtYHfZNPRIX/IGcL4eDQ6LvA0+gbOnR41gbq0WmLmCgE98aMehiFsa lWBYas50e2fyqTrkzonabebRbWc6Kpdje6SJkUHKyEHcoK5a7Gi2Udem2GDWcAmKgcCo daMw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=oKDnQxlR; 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 w23si1112464ply.312.2019.09.04.23.11.05; Wed, 04 Sep 2019 23:11:21 -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=oKDnQxlR; 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 S1731205AbfIEFsH (ORCPT + 99 others); Thu, 5 Sep 2019 01:48:07 -0400 Received: from mail.kernel.org ([198.145.29.99]:60030 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726042AbfIEFsH (ORCPT ); Thu, 5 Sep 2019 01:48:07 -0400 Received: from aquarius.haifa.ibm.com (nesher1.haifa.il.ibm.com [195.110.40.7]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id EE76B2168B; Thu, 5 Sep 2019 05:48:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1567662486; bh=eOH1W3sF8QeuaIDCOl/yaTiaMVmlndeK/f+Nowg2waU=; h=From:To:Cc:Subject:Date:From; b=oKDnQxlR2ZRt63Rag9IpuDyV8VkHumM0m6e8fsX9WpPCCPCSbpIGYY2TfHkGZ75Sb MzzOmfbjC7rEEJPHKU4W+soCy9YjujeBXCv6uMoLu8KhL5x7OLFcp7GzXsTaR2FdR1 Nxja88GD7jyexlkVNWuQToJS6xoOG5+mlltrOnMM= From: Mike Rapoport To: Paul Burton , Thomas Bogendoerfer Cc: linux-mips@vger.kernel.org, linux-kernel@vger.kernel.org, Mike Rapoport Subject: [PATCH] mips: sgi-ip27: switch from DISCONTIGMEM to SPARSEMEM Date: Thu, 5 Sep 2019 08:47:57 +0300 Message-Id: <1567662477-27404-1-git-send-email-rppt@kernel.org> X-Mailer: git-send-email 2.7.4 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Mike Rapoport The memory initialization of SGI-IP27 is already half-way to support SPARSEMEM and only a call to sparse_init() was missing. Add it to prom_meminit() and adjust arch/mips/Kconfig to enable SPARSEMEM and SPARSEMEM_EXTREME for SGI-IP27 Signed-off-by: Mike Rapoport --- Thomas, could you please test this on your Origin machine? arch/mips/Kconfig | 12 ++---------- arch/mips/sgi-ip27/ip27-memory.c | 2 ++ 2 files changed, 4 insertions(+), 10 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..a8ddebc 100644 --- a/arch/mips/sgi-ip27/ip27-memory.c +++ b/arch/mips/sgi-ip27/ip27-memory.c @@ -444,6 +444,8 @@ void __init prom_meminit(void) } __node_data[node] = &null_node; } + + sparse_init(); } void __init prom_free_prom_memory(void) -- 2.7.4