From patchwork Fri Oct 5 16:16:40 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Logan Gunthorpe X-Patchwork-Id: 10628417 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id DAB21933 for ; Fri, 5 Oct 2018 16:16:53 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id C29D929A11 for ; Fri, 5 Oct 2018 16:16:53 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id B67CE29A22; Fri, 5 Oct 2018 16:16:53 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 4BA1D29A11 for ; Fri, 5 Oct 2018 16:16:53 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 03A266B000E; Fri, 5 Oct 2018 12:16:49 -0400 (EDT) Delivered-To: linux-mm-outgoing@kvack.org Received: by kanga.kvack.org (Postfix, from userid 40) id D941F6B000C; Fri, 5 Oct 2018 12:16:48 -0400 (EDT) X-Original-To: int-list-linux-mm@kvack.org X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id BC03B6B000D; Fri, 5 Oct 2018 12:16:48 -0400 (EDT) X-Original-To: linux-mm@kvack.org X-Delivered-To: linux-mm@kvack.org Received: from mail-io1-f69.google.com (mail-io1-f69.google.com [209.85.166.69]) by kanga.kvack.org (Postfix) with ESMTP id 8610E6B000A for ; Fri, 5 Oct 2018 12:16:48 -0400 (EDT) Received: by mail-io1-f69.google.com with SMTP id l4-v6so12567199iog.13 for ; Fri, 05 Oct 2018 09:16:48 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-original-authentication-results:x-gm-message-state:from:to:cc :date:message-id:in-reply-to:references:mime-version :content-transfer-encoding:subject; bh=ny/KrIVq9zxLwXex6XJYsyavmrRK9P1AkriNn2ykBmc=; b=RMHrPqqXgqL9EImT+6eHzpHIbNTbpH2ZkLI+6+dxRSweV/L/clacMTF6tY2FHjgfcH fCw/0BuLrShvcLkkZo2SD3LFWeMHPz86Ib94suQ5iuiOQzJoztpX33ow3AKLnnRnjVXi L4dE6D4dvzQBasQhQzJIWRJyFrxtvVg2oKRIx69HWcDTYZnsAF+fIKwd2HtfnkVjXeX6 66782P1741toL0uSfG3c8m1R61ENEShd04o7Vu1ut6ygHlg9QtifYbQayDJoDZhm0hJy GF0PqF/nXPHVWuw+ZoRcDTzSsP23SFoo4gKFkyn8RKGwNqbCT26a5kbqLuxD7xPQ1DH1 ri0w== X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of gunthorp@deltatee.com designates 207.54.116.67 as permitted sender) smtp.mailfrom=gunthorp@deltatee.com X-Gm-Message-State: ABuFfogqyWicTO41h1iEcSSWGeM+gXK9DrJsxCSox6yrh4WmOhNS2I7M TBbggnqY+JuUjjWQ9YJiLAdqybcpk/r5KGs47L3/ePGHjssXjf7Wgh27XdMAob8Vzv48RvPqcUb U1ZH2oDZxA6tujxMkre57s+eFQhGXi0N7GgqW96azylnutPDpO0vdBeHOUNzQLl3Vaw== X-Received: by 2002:a6b:b305:: with SMTP id c5-v6mr8330242iof.49.1538756208192; Fri, 05 Oct 2018 09:16:48 -0700 (PDT) X-Google-Smtp-Source: ACcGV61js+RH2R0B75fruSODxM9v0BJtblp01oHFuqpvj7mF1B8ClFmu9R+RY4gqRKABd8KBdwB0 X-Received: by 2002:a6b:b305:: with SMTP id c5-v6mr8330203iof.49.1538756207373; Fri, 05 Oct 2018 09:16:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1538756207; cv=none; d=google.com; s=arc-20160816; b=mY0TbZhXqxO6WH5Mcb6Ofg85CmLpsuzUfSjWiWeb2TP732VtwiaS38LLR+/7KHKJuh est53lc+BuLRe1EhHd7igQ/QL3mfXCbbS3ecLgt1vH3rcXrrtthTO2cSBb+UQFhnKqJM Es/rp3vHuJGKJQWaPcwrpoinhthx1Mtl0LZ+kHZYaVLR0S7kgD5tYEAvqfmmjglwBX8x otSl1yDruzemTufwNyEhz3VxKvqbW8T+IPhG+pX02N5zKjtCGVkNQbiwS2IC2yjPJFAs j9MFH7L/j75pY6JCbjxOzgLdomq7SC+hQ4phrkQfjVq2lkxzSuIOmIZ2QH/UUWpyzEr+ XM1w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=subject:content-transfer-encoding:mime-version:references :in-reply-to:message-id:date:cc:to:from; bh=ny/KrIVq9zxLwXex6XJYsyavmrRK9P1AkriNn2ykBmc=; b=1BBNzvWkyIRG4su7lGtsmffZpJ30GpG2nQXo149AP3CD7IULBGRrK/n8UYgZYMjGwk ZhTzqFWCMQ9WtKFKEZe0EWbQWnmAxEM8f9xlbvvuA5re9VD5Y9/eW612rTQD4HFfsGaN n8eyIhX8CvTATCWrHmQWhWroMDTPZXGSvA2EBWIMDRxEZTDk0bFKDXPWmS51JUbksN1e kS8t/qhs70VdAQpRiPtAEMs/zuEo2sAzhYZEI+Q8IrIdxU3zdZ46ee8UXwE6KF/wBRDl 4CpoV/N5Eh3jzvZmSNeTHi/Gz35zlSXtSOUj3cIDr0BWMz81LLDre7TFpnhcvvxfVvkt epiA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of gunthorp@deltatee.com designates 207.54.116.67 as permitted sender) smtp.mailfrom=gunthorp@deltatee.com Received: from ale.deltatee.com (ale.deltatee.com. [207.54.116.67]) by mx.google.com with ESMTPS id f6si1666271itk.72.2018.10.05.09.16.47 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 05 Oct 2018 09:16:47 -0700 (PDT) Received-SPF: pass (google.com: domain of gunthorp@deltatee.com designates 207.54.116.67 as permitted sender) client-ip=207.54.116.67; Authentication-Results: mx.google.com; spf=pass (google.com: domain of gunthorp@deltatee.com designates 207.54.116.67 as permitted sender) smtp.mailfrom=gunthorp@deltatee.com 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 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 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) X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: X-Virus-Scanned: ClamAV using ClamSMTP 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 --- 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);