Received: by 2002:ac0:a582:0:0:0:0:0 with SMTP id m2-v6csp644514imm; Fri, 5 Oct 2018 09:24:22 -0700 (PDT) X-Google-Smtp-Source: ACcGV61NVKReNWbRdLOQgG5J0bkW9FuBpjuwzvg+dmGhXfyoFgJg9ZXICtwQ5siBZFsPGyWUfmJx X-Received: by 2002:a17:902:8c90:: with SMTP id t16-v6mr12085935plo.251.1538756662296; Fri, 05 Oct 2018 09:24:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1538756662; cv=none; d=google.com; s=arc-20160816; b=QMYh/WOSZqxzk5vT65eqZy+ljusk2r/yCyCGNH9yKkyTAXpZeiwifUbjdOeb3XKCqA wFyY7K8JtxlOfwdnD4hlTsqHlmM6Svpum9OP4T7JsU4FkVuctRpg49mQuJ5zswEl4YYe P7ur/SOPST51PxMR3IM1J7qRHi+uvGx46/G0aTslC/AxfD7o3LhTJodzKcKK1LKFWf2X B4SP+BcTq0GwC3gUQOu/1X0IBfx6GBTyGv8W3M4AQG0fX8N/2YCQDKAYmHIOG1cG8i6c SdrTvsZiHaZlRnY6+ZAaO0AVCYnRrqS4+oHKgGKeaEkAnmqS12zJt9uFVnxv3C7IadGJ UJ2A== 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=ny/KrIVq9zxLwXex6XJYsyavmrRK9P1AkriNn2ykBmc=; b=myy/gupeENybxJHE97UcwITCJm2Fu2kdlOjyfFLpmE7cRmzi1HzRgxO3n8FqmnZvSv P3sTgF6Mgm4Ali1BC+DiCg3WiKWUfOkGE7XpkZXW7kZiRoBGXdPKdV2RT7xRAVPeOW1B NzwVCCQH48CqZAXE2N97UfGZT29vqztJ72SThi2I+SMG6aHppMWioIMcJ53dkjmXOfpW AEw7WNOL//lHg6e/1TzJBVyBNhno65NCMUL3TJYdHUFrYKOOK55hLXMj/k+2SKUeIk7k Ud+CvH+o+zMm6dHTqmAXGXWNcX66+SirRyp/e1ltwSzCpllm2pR5FMCrmBZPQvyii2/M bEjA== 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 c5-v6si7335966pgq.226.2018.10.05.09.24.07; Fri, 05 Oct 2018 09:24:22 -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 S1730033AbeJEXWr (ORCPT + 99 others); Fri, 5 Oct 2018 19:22:47 -0400 Received: from ale.deltatee.com ([207.54.116.67]:32856 "EHLO ale.deltatee.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729933AbeJEXQK (ORCPT ); Fri, 5 Oct 2018 19:16:10 -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 1g8SmS-0008D4-Iz; Fri, 05 Oct 2018 10:16:46 -0600 Received: from gunthorp by cgy1-donard.priv.deltatee.com with local (Exim 4.89) (envelope-from ) id 1g8SmS-0000ed-5h; Fri, 05 Oct 2018 10:16:44 -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 , Logan Gunthorpe Date: Fri, 5 Oct 2018 10:16:40 -0600 Message-Id: <20181005161642.2462-4-logang@deltatee.com> X-Mailer: git-send-email 2.19.0 In-Reply-To: <20181005161642.2462-1-logang@deltatee.com> References: <20181005161642.2462-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, logang@deltatee.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 3/5] 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 --- 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 787e27964ab9..63fa9653f281 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