From patchwork Tue Oct 13 23:57:45 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrew Morton X-Patchwork-Id: 11836543 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 9C42B921 for ; Tue, 13 Oct 2020 23:57:50 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 64D9B22258 for ; Tue, 13 Oct 2020 23:57:50 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=kernel.org header.i=@kernel.org header.b="PGH5F82c" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 64D9B22258 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=linux-foundation.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 1649094001E; Tue, 13 Oct 2020 19:57:49 -0400 (EDT) Delivered-To: linux-mm-outgoing@kvack.org Received: by kanga.kvack.org (Postfix, from userid 40) id 0C6B5940012; Tue, 13 Oct 2020 19:57:49 -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 EAA7994001E; Tue, 13 Oct 2020 19:57:48 -0400 (EDT) X-Original-To: linux-mm@kvack.org X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0036.hostedemail.com [216.40.44.36]) by kanga.kvack.org (Postfix) with ESMTP id BA09B940012 for ; Tue, 13 Oct 2020 19:57:48 -0400 (EDT) Received: from smtpin06.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay01.hostedemail.com (Postfix) with ESMTP id 5FAF2180AD817 for ; Tue, 13 Oct 2020 23:57:48 +0000 (UTC) X-FDA: 77368567416.06.men44_3a042a327207 Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin06.hostedemail.com (Postfix) with ESMTP id 4057F101A129F for ; Tue, 13 Oct 2020 23:57:48 +0000 (UTC) X-Spam-Summary: 1,0,0,b2a1c2b4d7c00237,d41d8cd98f00b204,akpm@linux-foundation.org,,RULES_HIT:41:69:355:379:800:960:967:968:973:988:989:1260:1345:1359:1381:1431:1437:1534:1542:1711:1730:1747:1777:1792:2393:2525:2559:2563:2682:2685:2693:2859:2902:2933:2937:2939:2942:2945:2947:2951:2954:3022:3138:3139:3140:3141:3142:3167:3353:3865:3867:3868:3871:3934:3936:3938:3941:3944:3947:3950:3953:3956:3959:4250:4321:4419:5007:6117:6261:6653:6737:6738:7514:7576:7875:8660:9025:9545:9592:10004:11026:11658:11914:12043:12048:12296:12297:12438:12517:12519:12533:12555:12679:12986:13148:13230:13846:14181:14721:21080:21324:21451:21627:21939:30012:30054,0,RBL:198.145.29.99:@linux-foundation.org:.lbl8.mailshell.net-64.100.201.201 62.2.0.100;04ygyajwqtnycaooec6ro7sk497biyc9dhmyiock3g717aemnawj1bu9kfe3pwy.at9imxrti6uyxxcao195nxc7hgnty3xnggw9pftz9ty8bjpnt9yhg7cjedg9114.o-lbl8.mailshell.net-223.238.255.100,CacheIP:none,Bayesian:0.5,0.5,0.5,Netcheck:none,DomainCache:0,MSF:not bulk,SPF:fp,MSBL:0,DNSBL:neutr al,Custo X-HE-Tag: men44_3a042a327207 X-Filterd-Recvd-Size: 4767 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by imf03.hostedemail.com (Postfix) with ESMTP for ; Tue, 13 Oct 2020 23:57:47 +0000 (UTC) Received: from localhost.localdomain (c-73-231-172-41.hsd1.ca.comcast.net [73.231.172.41]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id DE1DD22248; Tue, 13 Oct 2020 23:57:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1602633467; bh=JS9d2oUKbbF8EmaX68GnGaI0e1tKrYH9LCdMOAo0cgU=; h=Date:From:To:Subject:In-Reply-To:From; b=PGH5F82cr9zuf2BIUdLC6DUaVHKRdMWlqk0azFCIPNgMIfKyVRVcADbNoBjF8YqLX FnZhw5IkCCJqt1LbHYXwRmPXzSQSiEmxzEOJBQSYZ5auU4IB/ijGe7hRSQ6R9z2JnR xVi/eODvNS4w33k7tjaT09TqrCL3HQs3+JWmSL3A= Date: Tue, 13 Oct 2020 16:57:45 -0700 From: Andrew Morton To: akpm@linux-foundation.org, benh@kernel.crashing.org, bhe@redhat.com, bp@alien8.de, catalin.marinas@arm.com, dave.hansen@linux.intel.com, dja@axtens.net, hbathini@linux.ibm.com, hch@lst.de, jcmvbkbc@gmail.com, Jonathan.Cameron@huawei.com, kernel@esmil.dk, linux-mm@kvack.org, linux@armlinux.org.uk, luto@kernel.org, m.szyprowski@samsung.com, miguel.ojeda.sandonis@gmail.com, mingo@kernel.org, mingo@redhat.com, mm-commits@vger.kernel.org, monstr@monstr.eu, mpe@ellerman.id.au, palmer@dabbelt.com, paul.walmsley@sifive.com, paulus@samba.org, peterz@infradead.org, rppt@linux.ibm.com, shorne@gmail.com, tglx@linutronix.de, torvalds@linux-foundation.org, tsbogend@alpha.franken.de, will@kernel.org, ysato@users.sourceforge.jp Subject: [patch 168/181] mircoblaze: drop unneeded NUMA and sparsemem initializations Message-ID: <20201013235745.1cqpI8lYX%akpm@linux-foundation.org> In-Reply-To: <20201013164658.3bfd96cc224d8923e66a9f4e@linux-foundation.org> User-Agent: s-nail v14.8.16 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: From: Mike Rapoport Subject: mircoblaze: drop unneeded NUMA and sparsemem initializations microblaze does not support neither NUMA not SPARSMEM, so there is no point to call memblock_set_node() and sparse_memory_present_with_active_regions() functions during microblaze memory initialization. Remove these calls and the surrounding code. Link: https://lkml.kernel.org/r/20200818151634.14343-8-rppt@kernel.org Signed-off-by: Mike Rapoport Cc: Andy Lutomirski Cc: Baoquan He Cc: Benjamin Herrenschmidt Cc: Borislav Petkov Cc: Catalin Marinas Cc: Christoph Hellwig Cc: Daniel Axtens Cc: Dave Hansen Cc: Emil Renner Berthing Cc: Hari Bathini Cc: Ingo Molnar Cc: Ingo Molnar Cc: Jonathan Cameron Cc: Marek Szyprowski Cc: Max Filippov Cc: Michael Ellerman Cc: Michal Simek Cc: Miguel Ojeda Cc: Palmer Dabbelt Cc: Paul Mackerras Cc: Paul Walmsley Cc: Peter Zijlstra Cc: Russell King Cc: Stafford Horne Cc: Thomas Bogendoerfer Cc: Thomas Gleixner Cc: Will Deacon Cc: Yoshinori Sato Signed-off-by: Andrew Morton --- arch/microblaze/mm/init.c | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) --- a/arch/microblaze/mm/init.c~mircoblaze-drop-unneeded-numa-and-sparsemem-initializations +++ a/arch/microblaze/mm/init.c @@ -108,9 +108,8 @@ static void __init paging_init(void) void __init setup_memory(void) { - struct memblock_region *reg; - #ifndef CONFIG_MMU + struct memblock_region *reg; u32 kernel_align_start, kernel_align_size; /* Find main memory where is the kernel */ @@ -164,17 +163,6 @@ void __init setup_memory(void) pr_info("%s: max_low_pfn: %#lx\n", __func__, max_low_pfn); pr_info("%s: max_pfn: %#lx\n", __func__, max_pfn); - /* Add active regions with valid PFNs */ - for_each_memblock(memory, reg) { - unsigned long start_pfn, end_pfn; - - start_pfn = memblock_region_memory_base_pfn(reg); - end_pfn = memblock_region_memory_end_pfn(reg); - memblock_set_node(start_pfn << PAGE_SHIFT, - (end_pfn - start_pfn) << PAGE_SHIFT, - &memblock.memory, 0); - } - paging_init(); }