Received: by 2002:ac0:a582:0:0:0:0:0 with SMTP id m2-v6csp4218077imm; Mon, 15 Oct 2018 10:58:27 -0700 (PDT) X-Google-Smtp-Source: ACcGV63H7z/MR6Xi4cC4PShGH/7b5+vORxyItbyy3gjjIwLnCTk+WLy0RoWoBWlTSMeABDhIQSl+ X-Received: by 2002:a17:902:9347:: with SMTP id g7-v6mr18074693plp.90.1539626307010; Mon, 15 Oct 2018 10:58:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1539626306; cv=none; d=google.com; s=arc-20160816; b=ZA7vINSpCs3iJUMqwGm2WcpfvvbzSLhUn9BdadPIMnur7TU+5eYCP6gler3LnjMya8 ZepkQmVhQZR7EtJwc0o6ygKDifsx3AR6RZuewZJClThKzebTQtEaAPqlVrTn+2f4AWeW RpTnibVps8GNEa7uolVcm1rlOClBfUrceCqcteklln/kUNyU6+jLIDcJ1dE5J291f2EU PfOF+wCNZ6bhhDb+V0rru2QvPq3W01T9NQ68kC8ngSGdFuM55kgJ4V4Nfv5Iz0RIrOXj jSBhWUR7wm24I77tLMLOp/kOyyyYLav/blsNH9CZ4flhMKW53k3r3h01Quc5gVvM54TN z5Sg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:subject:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:cc:to:from; bh=F3AcXnh1HyzAbBQ9lssNNroRP37cDvf3IpGQVMtb+Jw=; b=m7YAO6y7PEO/Km5xJTEzTIYVcLIyDy4Nyx9QKiaerNSF2VCaDah7e/qH2pMvntFGpA PIEFOMmkZwHtqgWqTC9OTMu1ESP9kFGBfpxHyTTmEloCglOREQJ8BAqevqrb1xLl9b+1 81gI9y4xkVJY4ape/toptHtD6qIgqKxO/qlUaXFQDnbtSMNGHFzM4ZWU8ng7nL0iixGW 8I4uV6tpdwW0UDocf+22tU7aoylBIZiCzr0nksra/xAB5Y8by599ywW+q1O0lQtvzMDJ WF4iuW/E6GpnRtxjDLm+9BgcbLBEW83k+xeUPq67dmli0dU2iKic79tkL5HAtp9tagOB nIXA== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id m13-v6si11904475pfd.123.2018.10.15.10.58.11; Mon, 15 Oct 2018 10:58:26 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727142AbeJPBnh (ORCPT + 99 others); Mon, 15 Oct 2018 21:43:37 -0400 Received: from ale.deltatee.com ([207.54.116.67]:54700 "EHLO ale.deltatee.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727076AbeJPBne (ORCPT ); Mon, 15 Oct 2018 21:43:34 -0400 Received: from cgy1-donard.priv.deltatee.com ([172.16.1.31]) by ale.deltatee.com with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1gC77C-0002IL-7I; Mon, 15 Oct 2018 11:57:15 -0600 Received: from gunthorp by cgy1-donard.priv.deltatee.com with local (Exim 4.89) (envelope-from ) id 1gC779-0002Mj-F4; Mon, 15 Oct 2018 11:57:11 -0600 From: Logan Gunthorpe To: linux-kernel@vger.kernel.org, linux-mm@kvack.org, linux-riscv@lists.infradead.org, linux-arm-kernel@lists.infradead.org, linux-sh@vger.kernel.org Cc: Stephen Bates , Palmer Dabbelt , Albert Ou , Christoph Hellwig , Andrew Morton , Arnd Bergmann , Logan Gunthorpe , Will Deacon Date: Mon, 15 Oct 2018 11:57:00 -0600 Message-Id: <20181015175702.9036-5-logang@deltatee.com> X-Mailer: git-send-email 2.19.0 In-Reply-To: <20181015175702.9036-1-logang@deltatee.com> References: <20181015175702.9036-1-logang@deltatee.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-SA-Exim-Connect-IP: 172.16.1.31 X-SA-Exim-Rcpt-To: linux-mm@kvack.org, linux-riscv@lists.infradead.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-sh@vger.kernel.org, sbates@raithlin.com, palmer@sifive.com, aou@eecs.berkeley.edu, hch@lst.de, akpm@linux-foundation.org, arnd@arndb.de, logang@deltatee.com, will.deacon@arm.com X-SA-Exim-Mail-From: gunthorp@deltatee.com X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on ale.deltatee.com X-Spam-Level: X-Spam-Status: No, score=-8.7 required=5.0 tests=ALL_TRUSTED,BAYES_00, GREYLIST_ISWHITE,MYRULES_NO_TEXT autolearn=ham autolearn_force=no version=3.4.1 Subject: [PATCH v2 4/6] arm64: mm: make use of new memblocks_present() helper X-SA-Exim-Version: 4.2.1 (built Tue, 02 Aug 2016 21:08:31 +0000) X-SA-Exim-Scanned: Yes (on ale.deltatee.com) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Cleanup the arm64_memory_present() function seeing it's very similar to other arches. memblocks_present() is a direct replacement of arm64_memory_present() Signed-off-by: Logan Gunthorpe Acked-by: Catalin Marinas Cc: Will Deacon --- arch/arm64/mm/init.c | 20 +------------------- 1 file changed, 1 insertion(+), 19 deletions(-) diff --git a/arch/arm64/mm/init.c b/arch/arm64/mm/init.c index 6a0b5c5a61af..c51a944fe19f 100644 --- a/arch/arm64/mm/init.c +++ b/arch/arm64/mm/init.c @@ -296,24 +296,6 @@ int pfn_valid(unsigned long pfn) EXPORT_SYMBOL(pfn_valid); #endif -#ifndef CONFIG_SPARSEMEM -static void __init arm64_memory_present(void) -{ -} -#else -static void __init arm64_memory_present(void) -{ - struct memblock_region *reg; - - for_each_memblock(memory, reg) { - int nid = memblock_get_region_node(reg); - - memory_present(nid, memblock_region_memory_base_pfn(reg), - memblock_region_memory_end_pfn(reg)); - } -} -#endif - static phys_addr_t memory_limit = PHYS_ADDR_MAX; /* @@ -506,7 +488,7 @@ void __init bootmem_init(void) * Sparsemem tries to allocate bootmem in memory_present(), so must be * done after the fixed reservations. */ - arm64_memory_present(); + memblocks_present(); sparse_init(); zone_sizes_init(min, max); -- 2.19.0