From patchwork Wed Mar 14 14:39:09 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 131590 Delivered-To: patch@linaro.org Received: by 10.80.210.197 with SMTP id q5csp246360edg; Wed, 14 Mar 2018 07:41:04 -0700 (PDT) X-Google-Smtp-Source: AG47ELvOmImlrGcg4DRWOaTqEigGwyt4HmGpchshtPyXnySDxFxZRfuNVfpcbbBkpFsFnfPuUVsh X-Received: by 10.99.103.196 with SMTP id b187mr3911461pgc.1.1521038464346; Wed, 14 Mar 2018 07:41:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1521038464; cv=none; d=google.com; s=arc-20160816; b=RRBFtETHLZq6a9gAd6Cc1m1J4xP1eBtF641+Mxy4Wj0RZYNNKVs7/NI3G3ecGCtuNb xH+H2FYm1/2MjnfMWlYYCKhbXV8sjIcG5mek1lLVYm9fZ0MsBmzSsJKHUNtG3NUxh5dC WVSoKD8ftiKMlrOYfl15OwMOld1dL6W/+d/G9qs6sBMIH0Fg/ya32rGv0J3KYgF/MnHK bFGCgM6ILB/w6tNC4GiIGiv+6ciuRXC8h7tIN3gWGZEz75RONCo6bFv7atiR9bPiTwZw xovSAcjf8MUPwO2KSb9sOu+WnObMfn6PE4Fnz0QG1SvsPWtr0sz6/EsA9Thhk93X+1Nz H7OA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:arc-authentication-results; bh=Bqf8pliqtZDFXdlupBwUxonFwfO6PTXz/ePJoN/Jh1s=; b=eEGruHJHGBAZeHMlLquCX4FxBsRthgVJWWHwIgzkUw6bX3yzGKW7hl8zK8ZR+v1MuX FSoRvamhhEijZ/CrgnHk289P3iwY5Gi6h2OcNTXlytRzyjTBK609rP29wkCgfxO3PqOr trpyEgO7B+QLE5+5ASSBtPpjjXdvvAspHVpiv5Cxz1p5UXcC4Kh2KAaRPTMqtGQJGb/0 icD/5BWFtMhu+ER159kQZbLfe9cXilsrSUM0D2Hr7D0/5D6mnwpZMjUl/flr9rQBchvr QCNSCBocrhwz5EhNY3RbHbawLo70/r7RPVCzIjXBVDRA9CJyJHfmPY7kREuMNNl6RlqP iLuA== 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 d14si1962079pgn.306.2018.03.14.07.41.03; Wed, 14 Mar 2018 07:41:04 -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 S1752007AbeCNOlA (ORCPT + 28 others); Wed, 14 Mar 2018 10:41:00 -0400 Received: from mout.kundenserver.de ([212.227.17.24]:44415 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751394AbeCNOk6 (ORCPT ); Wed, 14 Mar 2018 10:40:58 -0400 Received: from wuerfel.lan ([95.208.111.237]) by mrelayeu.kundenserver.de (mreue102 [212.227.15.145]) with ESMTPA (Nemesis) id 0MLy2e-1ezPMe0fd6-007iri; Wed, 14 Mar 2018 15:40:04 +0100 From: Arnd Bergmann To: linux-arch@vger.kernel.org Cc: linux-kernel@vger.kernel.org, Arnd Bergmann , Andrew Morton , Pavel Tatashin , Michal Hocko , Vlastimil Babka , Mel Gorman , Johannes Weiner , Tetsuo Handa , "Kirill A. Shutemov" , Ingo Molnar , Petr Tesarik , Dave Hansen , Wei Yang , linux-mm@kvack.org Subject: [PATCH 10/16] mm: remove obsolete alloc_remap() Date: Wed, 14 Mar 2018 15:39:09 +0100 Message-Id: <20180314143958.1548568-1-arnd@arndb.de> X-Mailer: git-send-email 2.9.0 In-Reply-To: <20180314143529.1456168-1-arnd@arndb.de> References: <20180314143529.1456168-1-arnd@arndb.de> X-Provags-ID: V03:K0:/HnUiaZVpLAgW1ppzzqZltZzmypjlxCbHC0YZv20X8L3fDuaAWS r1bXegLSOMkPJlNx862xLqa7NSv6EvEYpDD2/I+vs6zabzMOQobNZbWYrQDenk+GcJdcRJc mbc/TxIn2yDI+l0Vh4bvZ2nEZ5pkplgvmGlYOnNiO+x1TX9szrSsg8ZkOrXhiD8Ne1Qz+6N CC2zuZ+nPfQJtg1soIsKQ== X-UI-Out-Filterresults: notjunk:1; V01:K0:nfp/Hj6cmLg=:lYqn2SnYt+DGguBMQNinG/ hdQF8RF7lUZuOnehkJf5KPSmgqAyWuPbarUpgJ++XxyeQzt4FdeuJwKE1O7g1gm5nFIjlVDxI ed0+Aco2wLNlk3QRDdog1I2LEkCMwyea5dEW7svSQTsO5qUVCTyuTGDRTsPIpfknZ0CPhpXVl M7Lbhq+3LH4vvddb5YMwYdHBZQ5ltIuewH4uFZUbpff9Jz0F1dZYDixk4MqhUGQk61EF2Xl9L 9Oz9H3buoWkj8QvSxPWyeWpoVDIkwaoP5Sd8/ZIQgODFGwlUV343BBXm1OFqyk/ABtXKPB5zY SzQd4xlGQlyxPyk3t4Tz8GIpaIpfZLlSNxzb34bSm2voGvvzGtB++tXLXC36mvpOLHw6If2Ru WQOgtwnc4zBOdGQmSOSXsYbOuQwwwvfWpkpIHB2+7lPPP1FfA78vVZwa7x8VfSvRsuEuxdxTg fNPGuZsU9dbz6SPhmLrBCvRw11OyKJYqmyQjaGo3wR8/NbgDpBEc4UOahxzQ//13iBoRH30Sw 71rwRZjifBN4n5GzIdurm2diNpo0gQKp/PNj93SfUXP1TCsctOOCQnj7qkrChl+rQ5i+bIV9h 7i+Zg+UXkXDYn3Sy/RYrEXY7AXNlPpcMfLEFuaQ8LiMgfYLmVrn2HCk0EnFxXa6QgLQP7KaKY s1SB9fpPk6NOhg5p5pPNQImNJS2W22w/YB2sWW6vvh6gLfrb0SQn0oPw8N56bCVNEnBUNmzQR F+Y4tRWyVX9zuEFu7lhKgMqxFRGXZ4VnVmx2tA== Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Tile was the only remaining architecture to implement alloc_remap(), and since that is being removed, there is no point in keeping this function. Removing all callers simplifies the mem_map handling. Signed-off-by: Arnd Bergmann --- include/linux/bootmem.h | 9 --------- mm/page_alloc.c | 5 +---- mm/sparse.c | 15 --------------- 3 files changed, 1 insertion(+), 28 deletions(-) -- 2.9.0 Reviewed-by: Pavel Tatashin diff --git a/include/linux/bootmem.h b/include/linux/bootmem.h index a53063e9d7d8..7942a96b1a9d 100644 --- a/include/linux/bootmem.h +++ b/include/linux/bootmem.h @@ -364,15 +364,6 @@ static inline void __init memblock_free_late( } #endif /* defined(CONFIG_HAVE_MEMBLOCK) && defined(CONFIG_NO_BOOTMEM) */ -#ifdef CONFIG_HAVE_ARCH_ALLOC_REMAP -extern void *alloc_remap(int nid, unsigned long size); -#else -static inline void *alloc_remap(int nid, unsigned long size) -{ - return NULL; -} -#endif /* CONFIG_HAVE_ARCH_ALLOC_REMAP */ - extern void *alloc_large_system_hash(const char *tablename, unsigned long bucketsize, unsigned long numentries, diff --git a/mm/page_alloc.c b/mm/page_alloc.c index cb416723538f..484e21062228 100644 --- a/mm/page_alloc.c +++ b/mm/page_alloc.c @@ -6199,10 +6199,7 @@ static void __ref alloc_node_mem_map(struct pglist_data *pgdat) end = pgdat_end_pfn(pgdat); end = ALIGN(end, MAX_ORDER_NR_PAGES); size = (end - start) * sizeof(struct page); - map = alloc_remap(pgdat->node_id, size); - if (!map) - map = memblock_virt_alloc_node_nopanic(size, - pgdat->node_id); + map = memblock_virt_alloc_node_nopanic(size, pgdat->node_id); pgdat->node_mem_map = map + offset; } pr_debug("%s: node %d, pgdat %08lx, node_mem_map %08lx\n", diff --git a/mm/sparse.c b/mm/sparse.c index 7af5e7a92528..65bb52599f90 100644 --- a/mm/sparse.c +++ b/mm/sparse.c @@ -427,10 +427,6 @@ struct page __init *sparse_mem_map_populate(unsigned long pnum, int nid, struct page *map; unsigned long size; - map = alloc_remap(nid, sizeof(struct page) * PAGES_PER_SECTION); - if (map) - return map; - size = PAGE_ALIGN(sizeof(struct page) * PAGES_PER_SECTION); map = memblock_virt_alloc_try_nid(size, PAGE_SIZE, __pa(MAX_DMA_ADDRESS), @@ -446,17 +442,6 @@ void __init sparse_mem_maps_populate_node(struct page **map_map, unsigned long pnum; unsigned long size = sizeof(struct page) * PAGES_PER_SECTION; - map = alloc_remap(nodeid, size * map_count); - if (map) { - for (pnum = pnum_begin; pnum < pnum_end; pnum++) { - if (!present_section_nr(pnum)) - continue; - map_map[pnum] = map; - map += size; - } - return; - } - size = PAGE_ALIGN(size); map = memblock_virt_alloc_try_nid_raw(size * map_count, PAGE_SIZE, __pa(MAX_DMA_ADDRESS),