From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-17.5 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER,INCLUDES_PATCH,MAILING_LIST_MULTI,NICE_REPLY_A, SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 28F47C48BCF for ; Wed, 9 Jun 2021 10:57:09 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 118256136D for ; Wed, 9 Jun 2021 10:57:09 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238093AbhFIK7B (ORCPT ); Wed, 9 Jun 2021 06:59:01 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]:49535 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238515AbhFIK67 (ORCPT ); Wed, 9 Jun 2021 06:58:59 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1623236224; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=1FvxnKPfDfM/0QN9kSJy74v8JuVnkBg3G7v6vsc/x3c=; b=FPxTLNVK8/iumttqXzLWn8TpyEfDS9xkPcKf+6gj2Xx+FvHA+p2jZZ0g0A0d1YhpCbLE63 8f3k6jPTGgQDt3nsdUsGruH2zsTH6J8WC9znem3SRW+OQftqnN5BlvL+IIrAgnxnDyjqSz chi/LnO0lYW9gVQFcAOOGHcMjngCsjY= Received: from mail-wr1-f71.google.com (mail-wr1-f71.google.com [209.85.221.71]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-120-956zA7a2PfuHbYF4oGMFLw-1; Wed, 09 Jun 2021 06:57:03 -0400 X-MC-Unique: 956zA7a2PfuHbYF4oGMFLw-1 Received: by mail-wr1-f71.google.com with SMTP id m27-20020a056000025bb0290114d19822edso10603969wrz.21 for ; Wed, 09 Jun 2021 03:57:02 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:organization :message-id:date:user-agent:mime-version:in-reply-to :content-language:content-transfer-encoding; bh=1FvxnKPfDfM/0QN9kSJy74v8JuVnkBg3G7v6vsc/x3c=; b=WvNKkDPOGUlVWSPUg5+55+JWKq0zODVszOA805VdZ4IxZ+ZRhxtY0d1XXtep2F/EBQ lACP0JxaQVzFjkjOlZm9T56VOhyLhgTp3nJw07+ciAnGn87Ff0oDVRlUcTCbaUUugAxd aAOyqsyAb4jPNFJhz2HNSBhaN7De2YbF24h2BwfxJxz42SqAgN1gdM7eBMtt7tqRkafr JnWyx270wi4WVBNs6J4YjePzChSkJq7YgyfY7Dq9lUCiq3t6YEfEREFEU+F8yIRyNjt2 Xh/Jz9ExmK+XkF8ljQSPiIQzkEMuhwXLipa9rs6B/ytA1+kuVNtdpN+Bd4s58p31yjwY mOKw== X-Gm-Message-State: AOAM532J0WiwUWR+KwzQMCg1DMUdEbbzzTdU/unqNP+M7iakEaZcK5oP UOSf8Toy/5zwEsnWk8ds9GQHme4xQvRXEK5jXp8eWEi2FYNtrGjXw4zo7l2AiWjHx1V5bxYBsJV lI2yEyU6KHV/kBLBzMy0= X-Received: by 2002:a05:600c:2dcf:: with SMTP id e15mr9108521wmh.117.1623236221429; Wed, 09 Jun 2021 03:57:01 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxxia50/pFxZeButMmgu0RohZ0cO/Gta91kBLXzoklWxVlFQkUp1XOrMMoz2YOn8nWExEedrA== X-Received: by 2002:a05:600c:2dcf:: with SMTP id e15mr9108479wmh.117.1623236220976; Wed, 09 Jun 2021 03:57:00 -0700 (PDT) Received: from [192.168.3.132] (p5b0c611d.dip0.t-ipconnect.de. [91.12.97.29]) by smtp.gmail.com with ESMTPSA id c64sm6250834wma.15.2021.06.09.03.56.59 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 09 Jun 2021 03:57:00 -0700 (PDT) Subject: Re: [PATCH 8/9] mm: replace CONFIG_NEED_MULTIPLE_NODES with CONFIG_NUMA To: Mike Rapoport , Andrew Morton Cc: Arnd Bergmann , Geert Uytterhoeven , Ivan Kokshaysky , Jonathan Corbet , Matt Turner , Mike Rapoport , Richard Henderson , Vineet Gupta , kexec@lists.infradead.org, linux-alpha@vger.kernel.org, linux-arch@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-doc@vger.kernel.org, linux-ia64@vger.kernel.org, linux-kernel@vger.kernel.org, linux-m68k@lists.linux-m68k.org, linux-mips@vger.kernel.org, linux-mm@kvack.org, linux-riscv@lists.infradead.org, linux-s390@vger.kernel.org, linux-sh@vger.kernel.org, linux-snps-arc@lists.infradead.org, linux-xtensa@linux-xtensa.org, linuxppc-dev@lists.ozlabs.org, sparclinux@vger.kernel.org References: <20210602105348.13387-1-rppt@kernel.org> <20210602105348.13387-9-rppt@kernel.org> From: David Hildenbrand Organization: Red Hat Message-ID: <450360f3-0d8d-651d-9f8b-ce6f13a881c4@redhat.com> Date: Wed, 9 Jun 2021 12:56:59 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.10.1 MIME-Version: 1.0 In-Reply-To: <20210602105348.13387-9-rppt@kernel.org> Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=david@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-sh@vger.kernel.org On 02.06.21 12:53, Mike Rapoport wrote: > From: Mike Rapoport > > After removal of DISCINTIGMEM the NEED_MULTIPLE_NODES and NUMA > configuration options are equivalent. > > Drop CONFIG_NEED_MULTIPLE_NODES and use CONFIG_NUMA instead. > > Done with > > $ sed -i 's/CONFIG_NEED_MULTIPLE_NODES/CONFIG_NUMA/' \ > $(git grep -wl CONFIG_NEED_MULTIPLE_NODES) > $ sed -i 's/NEED_MULTIPLE_NODES/NUMA/' \ > $(git grep -wl NEED_MULTIPLE_NODES) > > with manual tweaks afterwards. > > Signed-off-by: Mike Rapoport > --- > arch/arm64/Kconfig | 2 +- > arch/ia64/Kconfig | 2 +- > arch/mips/Kconfig | 2 +- > arch/mips/include/asm/mmzone.h | 2 +- > arch/mips/include/asm/page.h | 2 +- > arch/mips/mm/init.c | 4 ++-- > arch/powerpc/Kconfig | 2 +- > arch/powerpc/include/asm/mmzone.h | 4 ++-- > arch/powerpc/kernel/setup_64.c | 2 +- > arch/powerpc/kernel/smp.c | 2 +- > arch/powerpc/kexec/core.c | 4 ++-- > arch/powerpc/mm/Makefile | 2 +- > arch/powerpc/mm/mem.c | 4 ++-- > arch/riscv/Kconfig | 2 +- > arch/s390/Kconfig | 2 +- > arch/sh/include/asm/mmzone.h | 4 ++-- > arch/sh/kernel/topology.c | 2 +- > arch/sh/mm/Kconfig | 2 +- > arch/sh/mm/init.c | 2 +- > arch/sparc/Kconfig | 2 +- > arch/sparc/include/asm/mmzone.h | 4 ++-- > arch/sparc/kernel/smp_64.c | 2 +- > arch/sparc/mm/init_64.c | 12 ++++++------ > arch/x86/Kconfig | 2 +- > arch/x86/kernel/setup_percpu.c | 6 +++--- > arch/x86/mm/init_32.c | 4 ++-- > include/asm-generic/topology.h | 2 +- > include/linux/memblock.h | 6 +++--- > include/linux/mm.h | 4 ++-- > include/linux/mmzone.h | 8 ++++---- > kernel/crash_core.c | 2 +- > mm/Kconfig | 9 --------- > mm/memblock.c | 8 ++++---- > mm/page_alloc.c | 6 +++--- > 34 files changed, 58 insertions(+), 67 deletions(-) > > diff --git a/arch/arm64/Kconfig b/arch/arm64/Kconfig > index 9f1d8566bbf9..d01a1545ab8f 100644 > --- a/arch/arm64/Kconfig > +++ b/arch/arm64/Kconfig > @@ -1035,7 +1035,7 @@ config NODES_SHIFT > int "Maximum NUMA Nodes (as a power of 2)" > range 1 10 > default "4" > - depends on NEED_MULTIPLE_NODES > + depends on NUMA > help > Specify the maximum number of NUMA Nodes available on the target > system. Increases memory reserved to accommodate various tables. > diff --git a/arch/ia64/Kconfig b/arch/ia64/Kconfig > index 279252e3e0f7..da22a35e6f03 100644 > --- a/arch/ia64/Kconfig > +++ b/arch/ia64/Kconfig > @@ -302,7 +302,7 @@ config NODES_SHIFT > int "Max num nodes shift(3-10)" > range 3 10 > default "10" > - depends on NEED_MULTIPLE_NODES > + depends on NUMA > help > This option specifies the maximum number of nodes in your SSI system. > MAX_NUMNODES will be 2^(This value). > diff --git a/arch/mips/Kconfig b/arch/mips/Kconfig > index ed51970c08e7..4704a16c2e44 100644 > --- a/arch/mips/Kconfig > +++ b/arch/mips/Kconfig > @@ -2867,7 +2867,7 @@ config RANDOMIZE_BASE_MAX_OFFSET > config NODES_SHIFT > int > default "6" > - depends on NEED_MULTIPLE_NODES > + depends on NUMA > > config HW_PERF_EVENTS > bool "Enable hardware performance counter support for perf events" > diff --git a/arch/mips/include/asm/mmzone.h b/arch/mips/include/asm/mmzone.h > index 7649ab45e80c..602a21aee9d4 100644 > --- a/arch/mips/include/asm/mmzone.h > +++ b/arch/mips/include/asm/mmzone.h > @@ -8,7 +8,7 @@ > > #include > > -#ifdef CONFIG_NEED_MULTIPLE_NODES > +#ifdef CONFIG_NUMA > # include > #endif > > diff --git a/arch/mips/include/asm/page.h b/arch/mips/include/asm/page.h > index 195ff4e9771f..96bc798c1ec1 100644 > --- a/arch/mips/include/asm/page.h > +++ b/arch/mips/include/asm/page.h > @@ -239,7 +239,7 @@ static inline int pfn_valid(unsigned long pfn) > > /* pfn_valid is defined in linux/mmzone.h */ > > -#elif defined(CONFIG_NEED_MULTIPLE_NODES) > +#elif defined(CONFIG_NUMA) > > #define pfn_valid(pfn) \ > ({ \ > diff --git a/arch/mips/mm/init.c b/arch/mips/mm/init.c > index 97f6ca341448..19347dc6bbf8 100644 > --- a/arch/mips/mm/init.c > +++ b/arch/mips/mm/init.c > @@ -394,7 +394,7 @@ void maar_init(void) > } > } > > -#ifndef CONFIG_NEED_MULTIPLE_NODES > +#ifndef CONFIG_NUMA > void __init paging_init(void) > { > unsigned long max_zone_pfns[MAX_NR_ZONES]; > @@ -473,7 +473,7 @@ void __init mem_init(void) > 0x80000000 - 4, KCORE_TEXT); > #endif > } > -#endif /* !CONFIG_NEED_MULTIPLE_NODES */ > +#endif /* !CONFIG_NUMA */ > > void free_init_pages(const char *what, unsigned long begin, unsigned long end) > { > diff --git a/arch/powerpc/Kconfig b/arch/powerpc/Kconfig > index 088dd2afcfe4..14b132cf95e2 100644 > --- a/arch/powerpc/Kconfig > +++ b/arch/powerpc/Kconfig > @@ -671,7 +671,7 @@ config NODES_SHIFT > int > default "8" if PPC64 > default "4" > - depends on NEED_MULTIPLE_NODES > + depends on NUMA > > config USE_PERCPU_NUMA_NODE_ID > def_bool y > diff --git a/arch/powerpc/include/asm/mmzone.h b/arch/powerpc/include/asm/mmzone.h > index 6cda76b57c5d..4c6c6dbd182f 100644 > --- a/arch/powerpc/include/asm/mmzone.h > +++ b/arch/powerpc/include/asm/mmzone.h > @@ -18,7 +18,7 @@ > * flags field of the struct page > */ > > -#ifdef CONFIG_NEED_MULTIPLE_NODES > +#ifdef CONFIG_NUMA > > extern struct pglist_data *node_data[]; > /* > @@ -41,7 +41,7 @@ u64 memory_hotplug_max(void); > > #else > #define memory_hotplug_max() memblock_end_of_DRAM() > -#endif /* CONFIG_NEED_MULTIPLE_NODES */ > +#endif /* CONFIG_NUMA */ > #ifdef CONFIG_FA_DUMP > #define __HAVE_ARCH_RESERVED_KERNEL_PAGES > #endif > diff --git a/arch/powerpc/kernel/setup_64.c b/arch/powerpc/kernel/setup_64.c > index e42b85e4f1aa..a35fbf4d0bce 100644 > --- a/arch/powerpc/kernel/setup_64.c > +++ b/arch/powerpc/kernel/setup_64.c > @@ -788,7 +788,7 @@ static void * __init pcpu_alloc_bootmem(unsigned int cpu, size_t size, > size_t align) > { > const unsigned long goal = __pa(MAX_DMA_ADDRESS); > -#ifdef CONFIG_NEED_MULTIPLE_NODES > +#ifdef CONFIG_NUMA > int node = early_cpu_to_node(cpu); > void *ptr; > > diff --git a/arch/powerpc/kernel/smp.c b/arch/powerpc/kernel/smp.c > index 2e05c783440a..a5209ea3859e 100644 > --- a/arch/powerpc/kernel/smp.c > +++ b/arch/powerpc/kernel/smp.c > @@ -1047,7 +1047,7 @@ void __init smp_prepare_cpus(unsigned int max_cpus) > zalloc_cpumask_var_node(&per_cpu(cpu_coregroup_map, cpu), > GFP_KERNEL, cpu_to_node(cpu)); > > -#ifdef CONFIG_NEED_MULTIPLE_NODES > +#ifdef CONFIG_NUMA > /* > * numa_node_id() works after this. > */ > diff --git a/arch/powerpc/kexec/core.c b/arch/powerpc/kexec/core.c > index 56da5eb2b923..48525e8b5730 100644 > --- a/arch/powerpc/kexec/core.c > +++ b/arch/powerpc/kexec/core.c > @@ -68,11 +68,11 @@ void machine_kexec_cleanup(struct kimage *image) > void arch_crash_save_vmcoreinfo(void) > { > > -#ifdef CONFIG_NEED_MULTIPLE_NODES > +#ifdef CONFIG_NUMA > VMCOREINFO_SYMBOL(node_data); > VMCOREINFO_LENGTH(node_data, MAX_NUMNODES); > #endif > -#ifndef CONFIG_NEED_MULTIPLE_NODES > +#ifndef CONFIG_NUMA > VMCOREINFO_SYMBOL(contig_page_data); > #endif > #if defined(CONFIG_PPC64) && defined(CONFIG_SPARSEMEM_VMEMMAP) > diff --git a/arch/powerpc/mm/Makefile b/arch/powerpc/mm/Makefile > index c3df3a8501d4..2ffcf540f08b 100644 > --- a/arch/powerpc/mm/Makefile > +++ b/arch/powerpc/mm/Makefile > @@ -13,7 +13,7 @@ obj-y := fault.o mem.o pgtable.o mmap.o maccess.o \ > obj-$(CONFIG_PPC_MMU_NOHASH) += nohash/ > obj-$(CONFIG_PPC_BOOK3S_32) += book3s32/ > obj-$(CONFIG_PPC_BOOK3S_64) += book3s64/ > -obj-$(CONFIG_NEED_MULTIPLE_NODES) += numa.o > +obj-$(CONFIG_NUMA) += numa.o > obj-$(CONFIG_PPC_MM_SLICES) += slice.o > obj-$(CONFIG_HUGETLB_PAGE) += hugetlbpage.o > obj-$(CONFIG_NOT_COHERENT_CACHE) += dma-noncoherent.o > diff --git a/arch/powerpc/mm/mem.c b/arch/powerpc/mm/mem.c > index 043bbeaf407c..7a266991315f 100644 > --- a/arch/powerpc/mm/mem.c > +++ b/arch/powerpc/mm/mem.c > @@ -126,7 +126,7 @@ void __ref arch_remove_memory(int nid, u64 start, u64 size, > } > #endif > > -#ifndef CONFIG_NEED_MULTIPLE_NODES > +#ifndef CONFIG_NUMA > void __init mem_topology_setup(void) > { > max_low_pfn = max_pfn = memblock_end_of_DRAM() >> PAGE_SHIFT; > @@ -161,7 +161,7 @@ static int __init mark_nonram_nosave(void) > > return 0; > } > -#else /* CONFIG_NEED_MULTIPLE_NODES */ > +#else /* CONFIG_NUMA */ > static int __init mark_nonram_nosave(void) > { > return 0; > diff --git a/arch/riscv/Kconfig b/arch/riscv/Kconfig > index a8ad8eb76120..e985dbf9ff27 100644 > --- a/arch/riscv/Kconfig > +++ b/arch/riscv/Kconfig > @@ -331,7 +331,7 @@ config NODES_SHIFT > int "Maximum NUMA Nodes (as a power of 2)" > range 1 10 > default "2" > - depends on NEED_MULTIPLE_NODES > + depends on NUMA > help > Specify the maximum number of NUMA Nodes available on the target > system. Increases memory reserved to accommodate various tables. > diff --git a/arch/s390/Kconfig b/arch/s390/Kconfig > index b4c7c34069f8..707afbcd81c2 100644 > --- a/arch/s390/Kconfig > +++ b/arch/s390/Kconfig > @@ -475,7 +475,7 @@ config NUMA > > config NODES_SHIFT > int > - depends on NEED_MULTIPLE_NODES > + depends on NUMA > default "1" > > config SCHED_SMT > diff --git a/arch/sh/include/asm/mmzone.h b/arch/sh/include/asm/mmzone.h > index 6552a088dc97..7b8dead2723d 100644 > --- a/arch/sh/include/asm/mmzone.h > +++ b/arch/sh/include/asm/mmzone.h > @@ -2,7 +2,7 @@ > #ifndef __ASM_SH_MMZONE_H > #define __ASM_SH_MMZONE_H > > -#ifdef CONFIG_NEED_MULTIPLE_NODES > +#ifdef CONFIG_NUMA > #include > > extern struct pglist_data *node_data[]; > @@ -31,7 +31,7 @@ static inline void > setup_bootmem_node(int nid, unsigned long start, unsigned long end) > { > } > -#endif /* CONFIG_NEED_MULTIPLE_NODES */ > +#endif /* CONFIG_NUMA */ > > /* Platform specific mem init */ > void __init plat_mem_setup(void); > diff --git a/arch/sh/kernel/topology.c b/arch/sh/kernel/topology.c > index 7a989eed3b18..76af6db9daa2 100644 > --- a/arch/sh/kernel/topology.c > +++ b/arch/sh/kernel/topology.c > @@ -46,7 +46,7 @@ static int __init topology_init(void) > { > int i, ret; > > -#ifdef CONFIG_NEED_MULTIPLE_NODES > +#ifdef CONFIG_NUMA > for_each_online_node(i) > register_one_node(i); > #endif > diff --git a/arch/sh/mm/Kconfig b/arch/sh/mm/Kconfig > index d551a9cac41e..ba569cfb4368 100644 > --- a/arch/sh/mm/Kconfig > +++ b/arch/sh/mm/Kconfig > @@ -120,7 +120,7 @@ config NODES_SHIFT > int > default "3" if CPU_SUBTYPE_SHX3 > default "1" > - depends on NEED_MULTIPLE_NODES > + depends on NUMA > > config ARCH_FLATMEM_ENABLE > def_bool y > diff --git a/arch/sh/mm/init.c b/arch/sh/mm/init.c > index 168d7d4dd735..ce26c7f8950a 100644 > --- a/arch/sh/mm/init.c > +++ b/arch/sh/mm/init.c > @@ -211,7 +211,7 @@ void __init allocate_pgdat(unsigned int nid) > > get_pfn_range_for_nid(nid, &start_pfn, &end_pfn); > > -#ifdef CONFIG_NEED_MULTIPLE_NODES > +#ifdef CONFIG_NUMA > NODE_DATA(nid) = memblock_alloc_try_nid( > sizeof(struct pglist_data), > SMP_CACHE_BYTES, MEMBLOCK_LOW_LIMIT, > diff --git a/arch/sparc/Kconfig b/arch/sparc/Kconfig > index 164a5254c91c..c72f52c704cd 100644 > --- a/arch/sparc/Kconfig > +++ b/arch/sparc/Kconfig > @@ -265,7 +265,7 @@ config NODES_SHIFT > int "Maximum NUMA Nodes (as a power of 2)" > range 4 5 if SPARC64 > default "5" > - depends on NEED_MULTIPLE_NODES > + depends on NUMA > help > Specify the maximum number of NUMA Nodes available on the target > system. Increases memory reserved to accommodate various tables. > diff --git a/arch/sparc/include/asm/mmzone.h b/arch/sparc/include/asm/mmzone.h > index 6543fb97a849..a236d8aa893a 100644 > --- a/arch/sparc/include/asm/mmzone.h > +++ b/arch/sparc/include/asm/mmzone.h > @@ -2,7 +2,7 @@ > #ifndef _SPARC64_MMZONE_H > #define _SPARC64_MMZONE_H > > -#ifdef CONFIG_NEED_MULTIPLE_NODES > +#ifdef CONFIG_NUMA > > #include > > @@ -13,6 +13,6 @@ extern struct pglist_data *node_data[]; > extern int numa_cpu_lookup_table[]; > extern cpumask_t numa_cpumask_lookup_table[]; > > -#endif /* CONFIG_NEED_MULTIPLE_NODES */ > +#endif /* CONFIG_NUMA */ > > #endif /* _SPARC64_MMZONE_H */ > diff --git a/arch/sparc/kernel/smp_64.c b/arch/sparc/kernel/smp_64.c > index e38d8bf454e8..c89a5971fb0d 100644 > --- a/arch/sparc/kernel/smp_64.c > +++ b/arch/sparc/kernel/smp_64.c > @@ -1546,7 +1546,7 @@ static void * __init pcpu_alloc_bootmem(unsigned int cpu, size_t size, > size_t align) > { > const unsigned long goal = __pa(MAX_DMA_ADDRESS); > -#ifdef CONFIG_NEED_MULTIPLE_NODES > +#ifdef CONFIG_NUMA > int node = cpu_to_node(cpu); > void *ptr; > > diff --git a/arch/sparc/mm/init_64.c b/arch/sparc/mm/init_64.c > index e454f179cf5d..06e938d03f3b 100644 > --- a/arch/sparc/mm/init_64.c > +++ b/arch/sparc/mm/init_64.c > @@ -903,7 +903,7 @@ struct node_mem_mask { > static struct node_mem_mask node_masks[MAX_NUMNODES]; > static int num_node_masks; > > -#ifdef CONFIG_NEED_MULTIPLE_NODES > +#ifdef CONFIG_NUMA > > struct mdesc_mlgroup { > u64 node; > @@ -1059,7 +1059,7 @@ static void __init allocate_node_data(int nid) > { > struct pglist_data *p; > unsigned long start_pfn, end_pfn; > -#ifdef CONFIG_NEED_MULTIPLE_NODES > +#ifdef CONFIG_NUMA > > NODE_DATA(nid) = memblock_alloc_node(sizeof(struct pglist_data), > SMP_CACHE_BYTES, nid); > @@ -1080,7 +1080,7 @@ static void __init allocate_node_data(int nid) > > static void init_node_masks_nonnuma(void) > { > -#ifdef CONFIG_NEED_MULTIPLE_NODES > +#ifdef CONFIG_NUMA > int i; > #endif > > @@ -1090,7 +1090,7 @@ static void init_node_masks_nonnuma(void) > node_masks[0].match = 0; > num_node_masks = 1; > > -#ifdef CONFIG_NEED_MULTIPLE_NODES > +#ifdef CONFIG_NUMA > for (i = 0; i < NR_CPUS; i++) > numa_cpu_lookup_table[i] = 0; > > @@ -1098,7 +1098,7 @@ static void init_node_masks_nonnuma(void) > #endif > } > > -#ifdef CONFIG_NEED_MULTIPLE_NODES > +#ifdef CONFIG_NUMA > struct pglist_data *node_data[MAX_NUMNODES]; > > EXPORT_SYMBOL(numa_cpu_lookup_table); > @@ -2487,7 +2487,7 @@ int page_in_phys_avail(unsigned long paddr) > > static void __init register_page_bootmem_info(void) > { > -#ifdef CONFIG_NEED_MULTIPLE_NODES > +#ifdef CONFIG_NUMA > int i; > > for_each_online_node(i) > diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig > index 0045e1b44190..5d523ff70fe7 100644 > --- a/arch/x86/Kconfig > +++ b/arch/x86/Kconfig > @@ -1597,7 +1597,7 @@ config NODES_SHIFT > default "10" if MAXSMP > default "6" if X86_64 > default "3" > - depends on NEED_MULTIPLE_NODES > + depends on NUMA > help > Specify the maximum number of NUMA Nodes available on the target > system. Increases memory reserved to accommodate various tables. > diff --git a/arch/x86/kernel/setup_percpu.c b/arch/x86/kernel/setup_percpu.c > index 0941d2f44f2a..78a32b956e81 100644 > --- a/arch/x86/kernel/setup_percpu.c > +++ b/arch/x86/kernel/setup_percpu.c > @@ -66,7 +66,7 @@ EXPORT_SYMBOL(__per_cpu_offset); > */ > static bool __init pcpu_need_numa(void) > { > -#ifdef CONFIG_NEED_MULTIPLE_NODES > +#ifdef CONFIG_NUMA > pg_data_t *last = NULL; > unsigned int cpu; > > @@ -101,7 +101,7 @@ static void * __init pcpu_alloc_bootmem(unsigned int cpu, unsigned long size, > unsigned long align) > { > const unsigned long goal = __pa(MAX_DMA_ADDRESS); > -#ifdef CONFIG_NEED_MULTIPLE_NODES > +#ifdef CONFIG_NUMA > int node = early_cpu_to_node(cpu); > void *ptr; > > @@ -140,7 +140,7 @@ static void __init pcpu_fc_free(void *ptr, size_t size) > > static int __init pcpu_cpu_distance(unsigned int from, unsigned int to) > { > -#ifdef CONFIG_NEED_MULTIPLE_NODES > +#ifdef CONFIG_NUMA > if (early_cpu_to_node(from) == early_cpu_to_node(to)) > return LOCAL_DISTANCE; > else > diff --git a/arch/x86/mm/init_32.c b/arch/x86/mm/init_32.c > index 21ffb03f6c72..74b78840182d 100644 > --- a/arch/x86/mm/init_32.c > +++ b/arch/x86/mm/init_32.c > @@ -651,7 +651,7 @@ void __init find_low_pfn_range(void) > highmem_pfn_init(); > } > > -#ifndef CONFIG_NEED_MULTIPLE_NODES > +#ifndef CONFIG_NUMA > void __init initmem_init(void) > { > #ifdef CONFIG_HIGHMEM > @@ -677,7 +677,7 @@ void __init initmem_init(void) > > setup_bootmem_allocator(); > } > -#endif /* !CONFIG_NEED_MULTIPLE_NODES */ > +#endif /* !CONFIG_NUMA */ > > void __init setup_bootmem_allocator(void) > { > diff --git a/include/asm-generic/topology.h b/include/asm-generic/topology.h > index 5aa8705df87e..4dbe715be65b 100644 > --- a/include/asm-generic/topology.h > +++ b/include/asm-generic/topology.h > @@ -45,7 +45,7 @@ > #endif > > #ifndef cpumask_of_node > - #ifdef CONFIG_NEED_MULTIPLE_NODES > + #ifdef CONFIG_NUMA > #define cpumask_of_node(node) ((node) == 0 ? cpu_online_mask : cpu_none_mask) > #else > #define cpumask_of_node(node) ((void)(node), cpu_online_mask) > diff --git a/include/linux/memblock.h b/include/linux/memblock.h > index 5984fff3f175..552309342c38 100644 > --- a/include/linux/memblock.h > +++ b/include/linux/memblock.h > @@ -50,7 +50,7 @@ struct memblock_region { > phys_addr_t base; > phys_addr_t size; > enum memblock_flags flags; > -#ifdef CONFIG_NEED_MULTIPLE_NODES > +#ifdef CONFIG_NUMA > int nid; > #endif > }; > @@ -347,7 +347,7 @@ int __init deferred_page_init_max_threads(const struct cpumask *node_cpumask); > int memblock_set_node(phys_addr_t base, phys_addr_t size, > struct memblock_type *type, int nid); > > -#ifdef CONFIG_NEED_MULTIPLE_NODES > +#ifdef CONFIG_NUMA > static inline void memblock_set_region_node(struct memblock_region *r, int nid) > { > r->nid = nid; > @@ -366,7 +366,7 @@ static inline int memblock_get_region_node(const struct memblock_region *r) > { > return 0; > } > -#endif /* CONFIG_NEED_MULTIPLE_NODES */ > +#endif /* CONFIG_NUMA */ > > /* Flags for memblock allocation APIs */ > #define MEMBLOCK_ALLOC_ANYWHERE (~(phys_addr_t)0) > diff --git a/include/linux/mm.h b/include/linux/mm.h > index c274f75efcf9..cf66f0ea7956 100644 > --- a/include/linux/mm.h > +++ b/include/linux/mm.h > @@ -46,7 +46,7 @@ extern int sysctl_page_lock_unfairness; > > void init_mm_internals(void); > > -#ifndef CONFIG_NEED_MULTIPLE_NODES /* Don't use mapnrs, do it properly */ > +#ifndef CONFIG_NUMA /* Don't use mapnrs, do it properly */ > extern unsigned long max_mapnr; > > static inline void set_max_mapnr(unsigned long limit) > @@ -2457,7 +2457,7 @@ extern void get_pfn_range_for_nid(unsigned int nid, > unsigned long *start_pfn, unsigned long *end_pfn); > extern unsigned long find_min_pfn_with_active_regions(void); > > -#ifndef CONFIG_NEED_MULTIPLE_NODES > +#ifndef CONFIG_NUMA > static inline int early_pfn_to_nid(unsigned long pfn) > { > return 0; > diff --git a/include/linux/mmzone.h b/include/linux/mmzone.h > index 2b41e252a995..ad42f440c704 100644 > --- a/include/linux/mmzone.h > +++ b/include/linux/mmzone.h > @@ -985,7 +985,7 @@ extern int movable_zone; > #ifdef CONFIG_HIGHMEM > static inline int zone_movable_is_highmem(void) > { > -#ifdef CONFIG_NEED_MULTIPLE_NODES > +#ifdef CONFIG_NUMA > return movable_zone == ZONE_HIGHMEM; > #else > return (ZONE_MOVABLE - 1) == ZONE_HIGHMEM; > @@ -1041,17 +1041,17 @@ extern int percpu_pagelist_fraction; > extern char numa_zonelist_order[]; > #define NUMA_ZONELIST_ORDER_LEN 16 > > -#ifndef CONFIG_NEED_MULTIPLE_NODES > +#ifndef CONFIG_NUMA > > extern struct pglist_data contig_page_data; > #define NODE_DATA(nid) (&contig_page_data) > #define NODE_MEM_MAP(nid) mem_map > > -#else /* CONFIG_NEED_MULTIPLE_NODES */ > +#else /* CONFIG_NUMA */ > > #include > > -#endif /* !CONFIG_NEED_MULTIPLE_NODES */ > +#endif /* !CONFIG_NUMA */ > > extern struct pglist_data *first_online_pgdat(void); > extern struct pglist_data *next_online_pgdat(struct pglist_data *pgdat); > diff --git a/kernel/crash_core.c b/kernel/crash_core.c > index 825284baaf46..53eb8bc6026d 100644 > --- a/kernel/crash_core.c > +++ b/kernel/crash_core.c > @@ -455,7 +455,7 @@ static int __init crash_save_vmcoreinfo_init(void) > VMCOREINFO_SYMBOL(_stext); > VMCOREINFO_SYMBOL(vmap_area_list); > > -#ifndef CONFIG_NEED_MULTIPLE_NODES > +#ifndef CONFIG_NUMA > VMCOREINFO_SYMBOL(mem_map); > VMCOREINFO_SYMBOL(contig_page_data); > #endif > diff --git a/mm/Kconfig b/mm/Kconfig > index 218b96ccc84a..bffe4bd859f3 100644 > --- a/mm/Kconfig > +++ b/mm/Kconfig > @@ -59,15 +59,6 @@ config FLAT_NODE_MEM_MAP > def_bool y > depends on !SPARSEMEM > > -# > -# Both the NUMA code and DISCONTIGMEM use arrays of pg_data_t's > -# to represent different areas of memory. This variable allows > -# those dependencies to exist individually. > -# > -config NEED_MULTIPLE_NODES > - def_bool y > - depends on NUMA > - > # > # SPARSEMEM_EXTREME (which is the default) does some bootmem > # allocations when sparse_init() is called. If this cannot > diff --git a/mm/memblock.c b/mm/memblock.c > index afaefa8fc6ab..123feef5259d 100644 > --- a/mm/memblock.c > +++ b/mm/memblock.c > @@ -92,7 +92,7 @@ > * system initialization completes. > */ > > -#ifndef CONFIG_NEED_MULTIPLE_NODES > +#ifndef CONFIG_NUMA > struct pglist_data __refdata contig_page_data; > EXPORT_SYMBOL(contig_page_data); > #endif > @@ -607,7 +607,7 @@ static int __init_memblock memblock_add_range(struct memblock_type *type, > * area, insert that portion. > */ > if (rbase > base) { > -#ifdef CONFIG_NEED_MULTIPLE_NODES > +#ifdef CONFIG_NUMA > WARN_ON(nid != memblock_get_region_node(rgn)); > #endif > WARN_ON(flags != rgn->flags); > @@ -1205,7 +1205,7 @@ void __init_memblock __next_mem_pfn_range(int *idx, int nid, > int __init_memblock memblock_set_node(phys_addr_t base, phys_addr_t size, > struct memblock_type *type, int nid) > { > -#ifdef CONFIG_NEED_MULTIPLE_NODES > +#ifdef CONFIG_NUMA > int start_rgn, end_rgn; > int i, ret; > > @@ -1849,7 +1849,7 @@ static void __init_memblock memblock_dump(struct memblock_type *type) > size = rgn->size; > end = base + size - 1; > flags = rgn->flags; > -#ifdef CONFIG_NEED_MULTIPLE_NODES > +#ifdef CONFIG_NUMA > if (memblock_get_region_node(rgn) != MAX_NUMNODES) > snprintf(nid_buf, sizeof(nid_buf), " on node %d", > memblock_get_region_node(rgn)); > diff --git a/mm/page_alloc.c b/mm/page_alloc.c > index 6fc22482eaa8..8f08135d3eb4 100644 > --- a/mm/page_alloc.c > +++ b/mm/page_alloc.c > @@ -1596,7 +1596,7 @@ void __free_pages_core(struct page *page, unsigned int order) > __free_pages_ok(page, order, FPI_TO_TAIL | FPI_SKIP_KASAN_POISON); > } > > -#ifdef CONFIG_NEED_MULTIPLE_NODES > +#ifdef CONFIG_NUMA > > /* > * During memory init memblocks map pfns to nids. The search is expensive and > @@ -1646,7 +1646,7 @@ int __meminit early_pfn_to_nid(unsigned long pfn) > > return nid; > } > -#endif /* CONFIG_NEED_MULTIPLE_NODES */ > +#endif /* CONFIG_NUMA */ > > void __init memblock_free_pages(struct page *page, unsigned long pfn, > unsigned int order) > @@ -7276,7 +7276,7 @@ static void __ref alloc_node_mem_map(struct pglist_data *pgdat) > pr_debug("%s: node %d, pgdat %08lx, node_mem_map %08lx\n", > __func__, pgdat->node_id, (unsigned long)pgdat, > (unsigned long)pgdat->node_mem_map); > -#ifndef CONFIG_NEED_MULTIPLE_NODES > +#ifndef CONFIG_NUMA > /* > * With no DISCONTIG, the global mem_map is just set as node 0's > */ > Nice Acked-by: David Hildenbrand -- Thanks, David / dhildenb From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-15.5 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS, USER_AGENT_SANE_1 autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id C5979C48BCF for ; Wed, 9 Jun 2021 11:01:26 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 90AE860FE5 for ; Wed, 9 Jun 2021 11:01:26 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 90AE860FE5 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-riscv-bounces+linux-riscv=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:Content-Type: Content-Transfer-Encoding:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:Date:Message-ID:From: References:Cc:To:Subject:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=Al8n341WCXEzPsuvOwoVd6SmWRGGF1bdGY9duyNxGiQ=; b=1XB04UmUMilSCLsAg0cSN0Kw+j uHD88dPXr3ulEMKfxFSaBDECV9YBT49sFzEeeyuK4pv3a/sDLEnA9GN1zXrwU0nTR61FSyW/YJNQP rm91TPajNwkwNnVzNhOBrQW2iACEUWLB0nsD/xM4QZ4SThBm9RmAaN44RB7mCF5QaP4lnfsUJd/IT pktGYNA4bICBrUb2rM7oJyI083aAZ0KRqZSWceqF6WtSktgK50l3RawRgEtbHVS7Y6f2OpCIhhGov V5F9vPI9cGg/Y12kPuVR8NQyGRg6fmD6y5FAty5WOmh/KbVSHqyi4/l2xyo4+SmDU8SFnVxn0wsIb 3ObWgkAg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1lqvxI-00DDLE-6E; Wed, 09 Jun 2021 11:01:04 +0000 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1lqvtR-00DBYf-Ig for linux-riscv@lists.infradead.org; Wed, 09 Jun 2021 10:57:12 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1623236224; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=1FvxnKPfDfM/0QN9kSJy74v8JuVnkBg3G7v6vsc/x3c=; b=FPxTLNVK8/iumttqXzLWn8TpyEfDS9xkPcKf+6gj2Xx+FvHA+p2jZZ0g0A0d1YhpCbLE63 8f3k6jPTGgQDt3nsdUsGruH2zsTH6J8WC9znem3SRW+OQftqnN5BlvL+IIrAgnxnDyjqSz chi/LnO0lYW9gVQFcAOOGHcMjngCsjY= Received: from mail-wm1-f69.google.com (mail-wm1-f69.google.com [209.85.128.69]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-490-DZUscu_hMC6D_iwl_St6dA-1; Wed, 09 Jun 2021 06:57:03 -0400 X-MC-Unique: DZUscu_hMC6D_iwl_St6dA-1 Received: by mail-wm1-f69.google.com with SMTP id v25-20020a1cf7190000b0290197a4be97b7so1786045wmh.9 for ; Wed, 09 Jun 2021 03:57:02 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:organization :message-id:date:user-agent:mime-version:in-reply-to :content-language:content-transfer-encoding; bh=1FvxnKPfDfM/0QN9kSJy74v8JuVnkBg3G7v6vsc/x3c=; b=o33cHE3egYXHyJAmoQh30uXlfAo8fyheSHXqaH5Q4Fi3KJSC731BtMRRntwzpMx/+q vDF1yvcalqt1Sh9AIsPv6vHPhaPQX6DmYfsAdqL56xYR4ROMw8c/IUlJqup/1TJrPu66 FodbHF07dIgzsudz8Z6doQSdUh4hk0lpF4479DOJxDzL2aJKqhNVznqkOYfuNkhRFWWj 0fujVM25RnMro9Mx/vV8feZo/BJCw189XXCkDQR8/QxSjTtVxpETe2xs3Jdo21rklrDb LCyIRY0LAmBcT8juecXY9R9z77F7cw4bjFot7bUOPNl1TyX3AEEk0g2qqvQfAt9slad/ 0jgA== X-Gm-Message-State: AOAM532znic0Uce28Nwb2OstPKWZ0q99mttZKg5nrn1gvisqyOhiCVxN 2xCpjnTco4+eLLg0n8j961IaMy8NeAqBdUyA0OKUF/bYrLcExjOWhmAzMIDQOa0AqipfUt1ys48 9/WYsBM8tVUPhZ0pqf+chrD6cSRLS X-Received: by 2002:a05:600c:2dcf:: with SMTP id e15mr9108531wmh.117.1623236221455; Wed, 09 Jun 2021 03:57:01 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxxia50/pFxZeButMmgu0RohZ0cO/Gta91kBLXzoklWxVlFQkUp1XOrMMoz2YOn8nWExEedrA== X-Received: by 2002:a05:600c:2dcf:: with SMTP id e15mr9108479wmh.117.1623236220976; Wed, 09 Jun 2021 03:57:00 -0700 (PDT) Received: from [192.168.3.132] (p5b0c611d.dip0.t-ipconnect.de. [91.12.97.29]) by smtp.gmail.com with ESMTPSA id c64sm6250834wma.15.2021.06.09.03.56.59 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 09 Jun 2021 03:57:00 -0700 (PDT) Subject: Re: [PATCH 8/9] mm: replace CONFIG_NEED_MULTIPLE_NODES with CONFIG_NUMA To: Mike Rapoport , Andrew Morton Cc: Arnd Bergmann , Geert Uytterhoeven , Ivan Kokshaysky , Jonathan Corbet , Matt Turner , Mike Rapoport , Richard Henderson , Vineet Gupta , kexec@lists.infradead.org, linux-alpha@vger.kernel.org, linux-arch@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-doc@vger.kernel.org, linux-ia64@vger.kernel.org, linux-kernel@vger.kernel.org, linux-m68k@lists.linux-m68k.org, linux-mips@vger.kernel.org, linux-mm@kvack.org, linux-riscv@lists.infradead.org, linux-s390@vger.kernel.org, linux-sh@vger.kernel.org, linux-snps-arc@lists.infradead.org, linux-xtensa@linux-xtensa.org, linuxppc-dev@lists.ozlabs.org, sparclinux@vger.kernel.org References: <20210602105348.13387-1-rppt@kernel.org> <20210602105348.13387-9-rppt@kernel.org> From: David Hildenbrand Organization: Red Hat Message-ID: <450360f3-0d8d-651d-9f8b-ce6f13a881c4@redhat.com> Date: Wed, 9 Jun 2021 12:56:59 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.10.1 MIME-Version: 1.0 In-Reply-To: <20210602105348.13387-9-rppt@kernel.org> Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=david@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Language: en-US X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210609_035705_865316_AD481042 X-CRM114-Status: GOOD ( 28.45 ) X-BeenThere: linux-riscv@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii"; Format="flowed" Sender: "linux-riscv" Errors-To: linux-riscv-bounces+linux-riscv=archiver.kernel.org@lists.infradead.org On 02.06.21 12:53, Mike Rapoport wrote: > From: Mike Rapoport > > After removal of DISCINTIGMEM the NEED_MULTIPLE_NODES and NUMA > configuration options are equivalent. > > Drop CONFIG_NEED_MULTIPLE_NODES and use CONFIG_NUMA instead. > > Done with > > $ sed -i 's/CONFIG_NEED_MULTIPLE_NODES/CONFIG_NUMA/' \ > $(git grep -wl CONFIG_NEED_MULTIPLE_NODES) > $ sed -i 's/NEED_MULTIPLE_NODES/NUMA/' \ > $(git grep -wl NEED_MULTIPLE_NODES) > > with manual tweaks afterwards. > > Signed-off-by: Mike Rapoport > --- > arch/arm64/Kconfig | 2 +- > arch/ia64/Kconfig | 2 +- > arch/mips/Kconfig | 2 +- > arch/mips/include/asm/mmzone.h | 2 +- > arch/mips/include/asm/page.h | 2 +- > arch/mips/mm/init.c | 4 ++-- > arch/powerpc/Kconfig | 2 +- > arch/powerpc/include/asm/mmzone.h | 4 ++-- > arch/powerpc/kernel/setup_64.c | 2 +- > arch/powerpc/kernel/smp.c | 2 +- > arch/powerpc/kexec/core.c | 4 ++-- > arch/powerpc/mm/Makefile | 2 +- > arch/powerpc/mm/mem.c | 4 ++-- > arch/riscv/Kconfig | 2 +- > arch/s390/Kconfig | 2 +- > arch/sh/include/asm/mmzone.h | 4 ++-- > arch/sh/kernel/topology.c | 2 +- > arch/sh/mm/Kconfig | 2 +- > arch/sh/mm/init.c | 2 +- > arch/sparc/Kconfig | 2 +- > arch/sparc/include/asm/mmzone.h | 4 ++-- > arch/sparc/kernel/smp_64.c | 2 +- > arch/sparc/mm/init_64.c | 12 ++++++------ > arch/x86/Kconfig | 2 +- > arch/x86/kernel/setup_percpu.c | 6 +++--- > arch/x86/mm/init_32.c | 4 ++-- > include/asm-generic/topology.h | 2 +- > include/linux/memblock.h | 6 +++--- > include/linux/mm.h | 4 ++-- > include/linux/mmzone.h | 8 ++++---- > kernel/crash_core.c | 2 +- > mm/Kconfig | 9 --------- > mm/memblock.c | 8 ++++---- > mm/page_alloc.c | 6 +++--- > 34 files changed, 58 insertions(+), 67 deletions(-) > > diff --git a/arch/arm64/Kconfig b/arch/arm64/Kconfig > index 9f1d8566bbf9..d01a1545ab8f 100644 > --- a/arch/arm64/Kconfig > +++ b/arch/arm64/Kconfig > @@ -1035,7 +1035,7 @@ config NODES_SHIFT > int "Maximum NUMA Nodes (as a power of 2)" > range 1 10 > default "4" > - depends on NEED_MULTIPLE_NODES > + depends on NUMA > help > Specify the maximum number of NUMA Nodes available on the target > system. Increases memory reserved to accommodate various tables. > diff --git a/arch/ia64/Kconfig b/arch/ia64/Kconfig > index 279252e3e0f7..da22a35e6f03 100644 > --- a/arch/ia64/Kconfig > +++ b/arch/ia64/Kconfig > @@ -302,7 +302,7 @@ config NODES_SHIFT > int "Max num nodes shift(3-10)" > range 3 10 > default "10" > - depends on NEED_MULTIPLE_NODES > + depends on NUMA > help > This option specifies the maximum number of nodes in your SSI system. > MAX_NUMNODES will be 2^(This value). > diff --git a/arch/mips/Kconfig b/arch/mips/Kconfig > index ed51970c08e7..4704a16c2e44 100644 > --- a/arch/mips/Kconfig > +++ b/arch/mips/Kconfig > @@ -2867,7 +2867,7 @@ config RANDOMIZE_BASE_MAX_OFFSET > config NODES_SHIFT > int > default "6" > - depends on NEED_MULTIPLE_NODES > + depends on NUMA > > config HW_PERF_EVENTS > bool "Enable hardware performance counter support for perf events" > diff --git a/arch/mips/include/asm/mmzone.h b/arch/mips/include/asm/mmzone.h > index 7649ab45e80c..602a21aee9d4 100644 > --- a/arch/mips/include/asm/mmzone.h > +++ b/arch/mips/include/asm/mmzone.h > @@ -8,7 +8,7 @@ > > #include > > -#ifdef CONFIG_NEED_MULTIPLE_NODES > +#ifdef CONFIG_NUMA > # include > #endif > > diff --git a/arch/mips/include/asm/page.h b/arch/mips/include/asm/page.h > index 195ff4e9771f..96bc798c1ec1 100644 > --- a/arch/mips/include/asm/page.h > +++ b/arch/mips/include/asm/page.h > @@ -239,7 +239,7 @@ static inline int pfn_valid(unsigned long pfn) > > /* pfn_valid is defined in linux/mmzone.h */ > > -#elif defined(CONFIG_NEED_MULTIPLE_NODES) > +#elif defined(CONFIG_NUMA) > > #define pfn_valid(pfn) \ > ({ \ > diff --git a/arch/mips/mm/init.c b/arch/mips/mm/init.c > index 97f6ca341448..19347dc6bbf8 100644 > --- a/arch/mips/mm/init.c > +++ b/arch/mips/mm/init.c > @@ -394,7 +394,7 @@ void maar_init(void) > } > } > > -#ifndef CONFIG_NEED_MULTIPLE_NODES > +#ifndef CONFIG_NUMA > void __init paging_init(void) > { > unsigned long max_zone_pfns[MAX_NR_ZONES]; > @@ -473,7 +473,7 @@ void __init mem_init(void) > 0x80000000 - 4, KCORE_TEXT); > #endif > } > -#endif /* !CONFIG_NEED_MULTIPLE_NODES */ > +#endif /* !CONFIG_NUMA */ > > void free_init_pages(const char *what, unsigned long begin, unsigned long end) > { > diff --git a/arch/powerpc/Kconfig b/arch/powerpc/Kconfig > index 088dd2afcfe4..14b132cf95e2 100644 > --- a/arch/powerpc/Kconfig > +++ b/arch/powerpc/Kconfig > @@ -671,7 +671,7 @@ config NODES_SHIFT > int > default "8" if PPC64 > default "4" > - depends on NEED_MULTIPLE_NODES > + depends on NUMA > > config USE_PERCPU_NUMA_NODE_ID > def_bool y > diff --git a/arch/powerpc/include/asm/mmzone.h b/arch/powerpc/include/asm/mmzone.h > index 6cda76b57c5d..4c6c6dbd182f 100644 > --- a/arch/powerpc/include/asm/mmzone.h > +++ b/arch/powerpc/include/asm/mmzone.h > @@ -18,7 +18,7 @@ > * flags field of the struct page > */ > > -#ifdef CONFIG_NEED_MULTIPLE_NODES > +#ifdef CONFIG_NUMA > > extern struct pglist_data *node_data[]; > /* > @@ -41,7 +41,7 @@ u64 memory_hotplug_max(void); > > #else > #define memory_hotplug_max() memblock_end_of_DRAM() > -#endif /* CONFIG_NEED_MULTIPLE_NODES */ > +#endif /* CONFIG_NUMA */ > #ifdef CONFIG_FA_DUMP > #define __HAVE_ARCH_RESERVED_KERNEL_PAGES > #endif > diff --git a/arch/powerpc/kernel/setup_64.c b/arch/powerpc/kernel/setup_64.c > index e42b85e4f1aa..a35fbf4d0bce 100644 > --- a/arch/powerpc/kernel/setup_64.c > +++ b/arch/powerpc/kernel/setup_64.c > @@ -788,7 +788,7 @@ static void * __init pcpu_alloc_bootmem(unsigned int cpu, size_t size, > size_t align) > { > const unsigned long goal = __pa(MAX_DMA_ADDRESS); > -#ifdef CONFIG_NEED_MULTIPLE_NODES > +#ifdef CONFIG_NUMA > int node = early_cpu_to_node(cpu); > void *ptr; > > diff --git a/arch/powerpc/kernel/smp.c b/arch/powerpc/kernel/smp.c > index 2e05c783440a..a5209ea3859e 100644 > --- a/arch/powerpc/kernel/smp.c > +++ b/arch/powerpc/kernel/smp.c > @@ -1047,7 +1047,7 @@ void __init smp_prepare_cpus(unsigned int max_cpus) > zalloc_cpumask_var_node(&per_cpu(cpu_coregroup_map, cpu), > GFP_KERNEL, cpu_to_node(cpu)); > > -#ifdef CONFIG_NEED_MULTIPLE_NODES > +#ifdef CONFIG_NUMA > /* > * numa_node_id() works after this. > */ > diff --git a/arch/powerpc/kexec/core.c b/arch/powerpc/kexec/core.c > index 56da5eb2b923..48525e8b5730 100644 > --- a/arch/powerpc/kexec/core.c > +++ b/arch/powerpc/kexec/core.c > @@ -68,11 +68,11 @@ void machine_kexec_cleanup(struct kimage *image) > void arch_crash_save_vmcoreinfo(void) > { > > -#ifdef CONFIG_NEED_MULTIPLE_NODES > +#ifdef CONFIG_NUMA > VMCOREINFO_SYMBOL(node_data); > VMCOREINFO_LENGTH(node_data, MAX_NUMNODES); > #endif > -#ifndef CONFIG_NEED_MULTIPLE_NODES > +#ifndef CONFIG_NUMA > VMCOREINFO_SYMBOL(contig_page_data); > #endif > #if defined(CONFIG_PPC64) && defined(CONFIG_SPARSEMEM_VMEMMAP) > diff --git a/arch/powerpc/mm/Makefile b/arch/powerpc/mm/Makefile > index c3df3a8501d4..2ffcf540f08b 100644 > --- a/arch/powerpc/mm/Makefile > +++ b/arch/powerpc/mm/Makefile > @@ -13,7 +13,7 @@ obj-y := fault.o mem.o pgtable.o mmap.o maccess.o \ > obj-$(CONFIG_PPC_MMU_NOHASH) += nohash/ > obj-$(CONFIG_PPC_BOOK3S_32) += book3s32/ > obj-$(CONFIG_PPC_BOOK3S_64) += book3s64/ > -obj-$(CONFIG_NEED_MULTIPLE_NODES) += numa.o > +obj-$(CONFIG_NUMA) += numa.o > obj-$(CONFIG_PPC_MM_SLICES) += slice.o > obj-$(CONFIG_HUGETLB_PAGE) += hugetlbpage.o > obj-$(CONFIG_NOT_COHERENT_CACHE) += dma-noncoherent.o > diff --git a/arch/powerpc/mm/mem.c b/arch/powerpc/mm/mem.c > index 043bbeaf407c..7a266991315f 100644 > --- a/arch/powerpc/mm/mem.c > +++ b/arch/powerpc/mm/mem.c > @@ -126,7 +126,7 @@ void __ref arch_remove_memory(int nid, u64 start, u64 size, > } > #endif > > -#ifndef CONFIG_NEED_MULTIPLE_NODES > +#ifndef CONFIG_NUMA > void __init mem_topology_setup(void) > { > max_low_pfn = max_pfn = memblock_end_of_DRAM() >> PAGE_SHIFT; > @@ -161,7 +161,7 @@ static int __init mark_nonram_nosave(void) > > return 0; > } > -#else /* CONFIG_NEED_MULTIPLE_NODES */ > +#else /* CONFIG_NUMA */ > static int __init mark_nonram_nosave(void) > { > return 0; > diff --git a/arch/riscv/Kconfig b/arch/riscv/Kconfig > index a8ad8eb76120..e985dbf9ff27 100644 > --- a/arch/riscv/Kconfig > +++ b/arch/riscv/Kconfig > @@ -331,7 +331,7 @@ config NODES_SHIFT > int "Maximum NUMA Nodes (as a power of 2)" > range 1 10 > default "2" > - depends on NEED_MULTIPLE_NODES > + depends on NUMA > help > Specify the maximum number of NUMA Nodes available on the target > system. Increases memory reserved to accommodate various tables. > diff --git a/arch/s390/Kconfig b/arch/s390/Kconfig > index b4c7c34069f8..707afbcd81c2 100644 > --- a/arch/s390/Kconfig > +++ b/arch/s390/Kconfig > @@ -475,7 +475,7 @@ config NUMA > > config NODES_SHIFT > int > - depends on NEED_MULTIPLE_NODES > + depends on NUMA > default "1" > > config SCHED_SMT > diff --git a/arch/sh/include/asm/mmzone.h b/arch/sh/include/asm/mmzone.h > index 6552a088dc97..7b8dead2723d 100644 > --- a/arch/sh/include/asm/mmzone.h > +++ b/arch/sh/include/asm/mmzone.h > @@ -2,7 +2,7 @@ > #ifndef __ASM_SH_MMZONE_H > #define __ASM_SH_MMZONE_H > > -#ifdef CONFIG_NEED_MULTIPLE_NODES > +#ifdef CONFIG_NUMA > #include > > extern struct pglist_data *node_data[]; > @@ -31,7 +31,7 @@ static inline void > setup_bootmem_node(int nid, unsigned long start, unsigned long end) > { > } > -#endif /* CONFIG_NEED_MULTIPLE_NODES */ > +#endif /* CONFIG_NUMA */ > > /* Platform specific mem init */ > void __init plat_mem_setup(void); > diff --git a/arch/sh/kernel/topology.c b/arch/sh/kernel/topology.c > index 7a989eed3b18..76af6db9daa2 100644 > --- a/arch/sh/kernel/topology.c > +++ b/arch/sh/kernel/topology.c > @@ -46,7 +46,7 @@ static int __init topology_init(void) > { > int i, ret; > > -#ifdef CONFIG_NEED_MULTIPLE_NODES > +#ifdef CONFIG_NUMA > for_each_online_node(i) > register_one_node(i); > #endif > diff --git a/arch/sh/mm/Kconfig b/arch/sh/mm/Kconfig > index d551a9cac41e..ba569cfb4368 100644 > --- a/arch/sh/mm/Kconfig > +++ b/arch/sh/mm/Kconfig > @@ -120,7 +120,7 @@ config NODES_SHIFT > int > default "3" if CPU_SUBTYPE_SHX3 > default "1" > - depends on NEED_MULTIPLE_NODES > + depends on NUMA > > config ARCH_FLATMEM_ENABLE > def_bool y > diff --git a/arch/sh/mm/init.c b/arch/sh/mm/init.c > index 168d7d4dd735..ce26c7f8950a 100644 > --- a/arch/sh/mm/init.c > +++ b/arch/sh/mm/init.c > @@ -211,7 +211,7 @@ void __init allocate_pgdat(unsigned int nid) > > get_pfn_range_for_nid(nid, &start_pfn, &end_pfn); > > -#ifdef CONFIG_NEED_MULTIPLE_NODES > +#ifdef CONFIG_NUMA > NODE_DATA(nid) = memblock_alloc_try_nid( > sizeof(struct pglist_data), > SMP_CACHE_BYTES, MEMBLOCK_LOW_LIMIT, > diff --git a/arch/sparc/Kconfig b/arch/sparc/Kconfig > index 164a5254c91c..c72f52c704cd 100644 > --- a/arch/sparc/Kconfig > +++ b/arch/sparc/Kconfig > @@ -265,7 +265,7 @@ config NODES_SHIFT > int "Maximum NUMA Nodes (as a power of 2)" > range 4 5 if SPARC64 > default "5" > - depends on NEED_MULTIPLE_NODES > + depends on NUMA > help > Specify the maximum number of NUMA Nodes available on the target > system. Increases memory reserved to accommodate various tables. > diff --git a/arch/sparc/include/asm/mmzone.h b/arch/sparc/include/asm/mmzone.h > index 6543fb97a849..a236d8aa893a 100644 > --- a/arch/sparc/include/asm/mmzone.h > +++ b/arch/sparc/include/asm/mmzone.h > @@ -2,7 +2,7 @@ > #ifndef _SPARC64_MMZONE_H > #define _SPARC64_MMZONE_H > > -#ifdef CONFIG_NEED_MULTIPLE_NODES > +#ifdef CONFIG_NUMA > > #include > > @@ -13,6 +13,6 @@ extern struct pglist_data *node_data[]; > extern int numa_cpu_lookup_table[]; > extern cpumask_t numa_cpumask_lookup_table[]; > > -#endif /* CONFIG_NEED_MULTIPLE_NODES */ > +#endif /* CONFIG_NUMA */ > > #endif /* _SPARC64_MMZONE_H */ > diff --git a/arch/sparc/kernel/smp_64.c b/arch/sparc/kernel/smp_64.c > index e38d8bf454e8..c89a5971fb0d 100644 > --- a/arch/sparc/kernel/smp_64.c > +++ b/arch/sparc/kernel/smp_64.c > @@ -1546,7 +1546,7 @@ static void * __init pcpu_alloc_bootmem(unsigned int cpu, size_t size, > size_t align) > { > const unsigned long goal = __pa(MAX_DMA_ADDRESS); > -#ifdef CONFIG_NEED_MULTIPLE_NODES > +#ifdef CONFIG_NUMA > int node = cpu_to_node(cpu); > void *ptr; > > diff --git a/arch/sparc/mm/init_64.c b/arch/sparc/mm/init_64.c > index e454f179cf5d..06e938d03f3b 100644 > --- a/arch/sparc/mm/init_64.c > +++ b/arch/sparc/mm/init_64.c > @@ -903,7 +903,7 @@ struct node_mem_mask { > static struct node_mem_mask node_masks[MAX_NUMNODES]; > static int num_node_masks; > > -#ifdef CONFIG_NEED_MULTIPLE_NODES > +#ifdef CONFIG_NUMA > > struct mdesc_mlgroup { > u64 node; > @@ -1059,7 +1059,7 @@ static void __init allocate_node_data(int nid) > { > struct pglist_data *p; > unsigned long start_pfn, end_pfn; > -#ifdef CONFIG_NEED_MULTIPLE_NODES > +#ifdef CONFIG_NUMA > > NODE_DATA(nid) = memblock_alloc_node(sizeof(struct pglist_data), > SMP_CACHE_BYTES, nid); > @@ -1080,7 +1080,7 @@ static void __init allocate_node_data(int nid) > > static void init_node_masks_nonnuma(void) > { > -#ifdef CONFIG_NEED_MULTIPLE_NODES > +#ifdef CONFIG_NUMA > int i; > #endif > > @@ -1090,7 +1090,7 @@ static void init_node_masks_nonnuma(void) > node_masks[0].match = 0; > num_node_masks = 1; > > -#ifdef CONFIG_NEED_MULTIPLE_NODES > +#ifdef CONFIG_NUMA > for (i = 0; i < NR_CPUS; i++) > numa_cpu_lookup_table[i] = 0; > > @@ -1098,7 +1098,7 @@ static void init_node_masks_nonnuma(void) > #endif > } > > -#ifdef CONFIG_NEED_MULTIPLE_NODES > +#ifdef CONFIG_NUMA > struct pglist_data *node_data[MAX_NUMNODES]; > > EXPORT_SYMBOL(numa_cpu_lookup_table); > @@ -2487,7 +2487,7 @@ int page_in_phys_avail(unsigned long paddr) > > static void __init register_page_bootmem_info(void) > { > -#ifdef CONFIG_NEED_MULTIPLE_NODES > +#ifdef CONFIG_NUMA > int i; > > for_each_online_node(i) > diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig > index 0045e1b44190..5d523ff70fe7 100644 > --- a/arch/x86/Kconfig > +++ b/arch/x86/Kconfig > @@ -1597,7 +1597,7 @@ config NODES_SHIFT > default "10" if MAXSMP > default "6" if X86_64 > default "3" > - depends on NEED_MULTIPLE_NODES > + depends on NUMA > help > Specify the maximum number of NUMA Nodes available on the target > system. Increases memory reserved to accommodate various tables. > diff --git a/arch/x86/kernel/setup_percpu.c b/arch/x86/kernel/setup_percpu.c > index 0941d2f44f2a..78a32b956e81 100644 > --- a/arch/x86/kernel/setup_percpu.c > +++ b/arch/x86/kernel/setup_percpu.c > @@ -66,7 +66,7 @@ EXPORT_SYMBOL(__per_cpu_offset); > */ > static bool __init pcpu_need_numa(void) > { > -#ifdef CONFIG_NEED_MULTIPLE_NODES > +#ifdef CONFIG_NUMA > pg_data_t *last = NULL; > unsigned int cpu; > > @@ -101,7 +101,7 @@ static void * __init pcpu_alloc_bootmem(unsigned int cpu, unsigned long size, > unsigned long align) > { > const unsigned long goal = __pa(MAX_DMA_ADDRESS); > -#ifdef CONFIG_NEED_MULTIPLE_NODES > +#ifdef CONFIG_NUMA > int node = early_cpu_to_node(cpu); > void *ptr; > > @@ -140,7 +140,7 @@ static void __init pcpu_fc_free(void *ptr, size_t size) > > static int __init pcpu_cpu_distance(unsigned int from, unsigned int to) > { > -#ifdef CONFIG_NEED_MULTIPLE_NODES > +#ifdef CONFIG_NUMA > if (early_cpu_to_node(from) == early_cpu_to_node(to)) > return LOCAL_DISTANCE; > else > diff --git a/arch/x86/mm/init_32.c b/arch/x86/mm/init_32.c > index 21ffb03f6c72..74b78840182d 100644 > --- a/arch/x86/mm/init_32.c > +++ b/arch/x86/mm/init_32.c > @@ -651,7 +651,7 @@ void __init find_low_pfn_range(void) > highmem_pfn_init(); > } > > -#ifndef CONFIG_NEED_MULTIPLE_NODES > +#ifndef CONFIG_NUMA > void __init initmem_init(void) > { > #ifdef CONFIG_HIGHMEM > @@ -677,7 +677,7 @@ void __init initmem_init(void) > > setup_bootmem_allocator(); > } > -#endif /* !CONFIG_NEED_MULTIPLE_NODES */ > +#endif /* !CONFIG_NUMA */ > > void __init setup_bootmem_allocator(void) > { > diff --git a/include/asm-generic/topology.h b/include/asm-generic/topology.h > index 5aa8705df87e..4dbe715be65b 100644 > --- a/include/asm-generic/topology.h > +++ b/include/asm-generic/topology.h > @@ -45,7 +45,7 @@ > #endif > > #ifndef cpumask_of_node > - #ifdef CONFIG_NEED_MULTIPLE_NODES > + #ifdef CONFIG_NUMA > #define cpumask_of_node(node) ((node) == 0 ? cpu_online_mask : cpu_none_mask) > #else > #define cpumask_of_node(node) ((void)(node), cpu_online_mask) > diff --git a/include/linux/memblock.h b/include/linux/memblock.h > index 5984fff3f175..552309342c38 100644 > --- a/include/linux/memblock.h > +++ b/include/linux/memblock.h > @@ -50,7 +50,7 @@ struct memblock_region { > phys_addr_t base; > phys_addr_t size; > enum memblock_flags flags; > -#ifdef CONFIG_NEED_MULTIPLE_NODES > +#ifdef CONFIG_NUMA > int nid; > #endif > }; > @@ -347,7 +347,7 @@ int __init deferred_page_init_max_threads(const struct cpumask *node_cpumask); > int memblock_set_node(phys_addr_t base, phys_addr_t size, > struct memblock_type *type, int nid); > > -#ifdef CONFIG_NEED_MULTIPLE_NODES > +#ifdef CONFIG_NUMA > static inline void memblock_set_region_node(struct memblock_region *r, int nid) > { > r->nid = nid; > @@ -366,7 +366,7 @@ static inline int memblock_get_region_node(const struct memblock_region *r) > { > return 0; > } > -#endif /* CONFIG_NEED_MULTIPLE_NODES */ > +#endif /* CONFIG_NUMA */ > > /* Flags for memblock allocation APIs */ > #define MEMBLOCK_ALLOC_ANYWHERE (~(phys_addr_t)0) > diff --git a/include/linux/mm.h b/include/linux/mm.h > index c274f75efcf9..cf66f0ea7956 100644 > --- a/include/linux/mm.h > +++ b/include/linux/mm.h > @@ -46,7 +46,7 @@ extern int sysctl_page_lock_unfairness; > > void init_mm_internals(void); > > -#ifndef CONFIG_NEED_MULTIPLE_NODES /* Don't use mapnrs, do it properly */ > +#ifndef CONFIG_NUMA /* Don't use mapnrs, do it properly */ > extern unsigned long max_mapnr; > > static inline void set_max_mapnr(unsigned long limit) > @@ -2457,7 +2457,7 @@ extern void get_pfn_range_for_nid(unsigned int nid, > unsigned long *start_pfn, unsigned long *end_pfn); > extern unsigned long find_min_pfn_with_active_regions(void); > > -#ifndef CONFIG_NEED_MULTIPLE_NODES > +#ifndef CONFIG_NUMA > static inline int early_pfn_to_nid(unsigned long pfn) > { > return 0; > diff --git a/include/linux/mmzone.h b/include/linux/mmzone.h > index 2b41e252a995..ad42f440c704 100644 > --- a/include/linux/mmzone.h > +++ b/include/linux/mmzone.h > @@ -985,7 +985,7 @@ extern int movable_zone; > #ifdef CONFIG_HIGHMEM > static inline int zone_movable_is_highmem(void) > { > -#ifdef CONFIG_NEED_MULTIPLE_NODES > +#ifdef CONFIG_NUMA > return movable_zone == ZONE_HIGHMEM; > #else > return (ZONE_MOVABLE - 1) == ZONE_HIGHMEM; > @@ -1041,17 +1041,17 @@ extern int percpu_pagelist_fraction; > extern char numa_zonelist_order[]; > #define NUMA_ZONELIST_ORDER_LEN 16 > > -#ifndef CONFIG_NEED_MULTIPLE_NODES > +#ifndef CONFIG_NUMA > > extern struct pglist_data contig_page_data; > #define NODE_DATA(nid) (&contig_page_data) > #define NODE_MEM_MAP(nid) mem_map > > -#else /* CONFIG_NEED_MULTIPLE_NODES */ > +#else /* CONFIG_NUMA */ > > #include > > -#endif /* !CONFIG_NEED_MULTIPLE_NODES */ > +#endif /* !CONFIG_NUMA */ > > extern struct pglist_data *first_online_pgdat(void); > extern struct pglist_data *next_online_pgdat(struct pglist_data *pgdat); > diff --git a/kernel/crash_core.c b/kernel/crash_core.c > index 825284baaf46..53eb8bc6026d 100644 > --- a/kernel/crash_core.c > +++ b/kernel/crash_core.c > @@ -455,7 +455,7 @@ static int __init crash_save_vmcoreinfo_init(void) > VMCOREINFO_SYMBOL(_stext); > VMCOREINFO_SYMBOL(vmap_area_list); > > -#ifndef CONFIG_NEED_MULTIPLE_NODES > +#ifndef CONFIG_NUMA > VMCOREINFO_SYMBOL(mem_map); > VMCOREINFO_SYMBOL(contig_page_data); > #endif > diff --git a/mm/Kconfig b/mm/Kconfig > index 218b96ccc84a..bffe4bd859f3 100644 > --- a/mm/Kconfig > +++ b/mm/Kconfig > @@ -59,15 +59,6 @@ config FLAT_NODE_MEM_MAP > def_bool y > depends on !SPARSEMEM > > -# > -# Both the NUMA code and DISCONTIGMEM use arrays of pg_data_t's > -# to represent different areas of memory. This variable allows > -# those dependencies to exist individually. > -# > -config NEED_MULTIPLE_NODES > - def_bool y > - depends on NUMA > - > # > # SPARSEMEM_EXTREME (which is the default) does some bootmem > # allocations when sparse_init() is called. If this cannot > diff --git a/mm/memblock.c b/mm/memblock.c > index afaefa8fc6ab..123feef5259d 100644 > --- a/mm/memblock.c > +++ b/mm/memblock.c > @@ -92,7 +92,7 @@ > * system initialization completes. > */ > > -#ifndef CONFIG_NEED_MULTIPLE_NODES > +#ifndef CONFIG_NUMA > struct pglist_data __refdata contig_page_data; > EXPORT_SYMBOL(contig_page_data); > #endif > @@ -607,7 +607,7 @@ static int __init_memblock memblock_add_range(struct memblock_type *type, > * area, insert that portion. > */ > if (rbase > base) { > -#ifdef CONFIG_NEED_MULTIPLE_NODES > +#ifdef CONFIG_NUMA > WARN_ON(nid != memblock_get_region_node(rgn)); > #endif > WARN_ON(flags != rgn->flags); > @@ -1205,7 +1205,7 @@ void __init_memblock __next_mem_pfn_range(int *idx, int nid, > int __init_memblock memblock_set_node(phys_addr_t base, phys_addr_t size, > struct memblock_type *type, int nid) > { > -#ifdef CONFIG_NEED_MULTIPLE_NODES > +#ifdef CONFIG_NUMA > int start_rgn, end_rgn; > int i, ret; > > @@ -1849,7 +1849,7 @@ static void __init_memblock memblock_dump(struct memblock_type *type) > size = rgn->size; > end = base + size - 1; > flags = rgn->flags; > -#ifdef CONFIG_NEED_MULTIPLE_NODES > +#ifdef CONFIG_NUMA > if (memblock_get_region_node(rgn) != MAX_NUMNODES) > snprintf(nid_buf, sizeof(nid_buf), " on node %d", > memblock_get_region_node(rgn)); > diff --git a/mm/page_alloc.c b/mm/page_alloc.c > index 6fc22482eaa8..8f08135d3eb4 100644 > --- a/mm/page_alloc.c > +++ b/mm/page_alloc.c > @@ -1596,7 +1596,7 @@ void __free_pages_core(struct page *page, unsigned int order) > __free_pages_ok(page, order, FPI_TO_TAIL | FPI_SKIP_KASAN_POISON); > } > > -#ifdef CONFIG_NEED_MULTIPLE_NODES > +#ifdef CONFIG_NUMA > > /* > * During memory init memblocks map pfns to nids. The search is expensive and > @@ -1646,7 +1646,7 @@ int __meminit early_pfn_to_nid(unsigned long pfn) > > return nid; > } > -#endif /* CONFIG_NEED_MULTIPLE_NODES */ > +#endif /* CONFIG_NUMA */ > > void __init memblock_free_pages(struct page *page, unsigned long pfn, > unsigned int order) > @@ -7276,7 +7276,7 @@ static void __ref alloc_node_mem_map(struct pglist_data *pgdat) > pr_debug("%s: node %d, pgdat %08lx, node_mem_map %08lx\n", > __func__, pgdat->node_id, (unsigned long)pgdat, > (unsigned long)pgdat->node_mem_map); > -#ifndef CONFIG_NEED_MULTIPLE_NODES > +#ifndef CONFIG_NUMA > /* > * With no DISCONTIG, the global mem_map is just set as node 0's > */ > Nice Acked-by: David Hildenbrand -- Thanks, David / dhildenb _______________________________________________ linux-riscv mailing list linux-riscv@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-riscv From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-15.1 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 81F85C48BD1 for ; Wed, 9 Jun 2021 10:57:38 +0000 (UTC) Received: from lists.ozlabs.org (lists.ozlabs.org [112.213.38.117]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 0A61C60FE5 for ; Wed, 9 Jun 2021 10:57:38 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 0A61C60FE5 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=linuxppc-dev-bounces+linuxppc-dev=archiver.kernel.org@lists.ozlabs.org Received: from boromir.ozlabs.org (localhost [IPv6:::1]) by lists.ozlabs.org (Postfix) with ESMTP id 4G0PFs0rHBz3cC4 for ; Wed, 9 Jun 2021 20:57:37 +1000 (AEST) Authentication-Results: lists.ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=FPxTLNVK; dkim=fail reason="signature verification failed" (1024-bit key) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=FPxTLNVK; dkim-atps=neutral Authentication-Results: lists.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=redhat.com (client-ip=216.205.24.124; helo=us-smtp-delivery-124.mimecast.com; envelope-from=david@redhat.com; receiver=) Authentication-Results: lists.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=FPxTLNVK; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=FPxTLNVK; dkim-atps=neutral Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [216.205.24.124]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 4G0PFJ4LsZz302g for ; Wed, 9 Jun 2021 20:57:08 +1000 (AEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1623236224; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=1FvxnKPfDfM/0QN9kSJy74v8JuVnkBg3G7v6vsc/x3c=; b=FPxTLNVK8/iumttqXzLWn8TpyEfDS9xkPcKf+6gj2Xx+FvHA+p2jZZ0g0A0d1YhpCbLE63 8f3k6jPTGgQDt3nsdUsGruH2zsTH6J8WC9znem3SRW+OQftqnN5BlvL+IIrAgnxnDyjqSz chi/LnO0lYW9gVQFcAOOGHcMjngCsjY= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1623236224; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=1FvxnKPfDfM/0QN9kSJy74v8JuVnkBg3G7v6vsc/x3c=; b=FPxTLNVK8/iumttqXzLWn8TpyEfDS9xkPcKf+6gj2Xx+FvHA+p2jZZ0g0A0d1YhpCbLE63 8f3k6jPTGgQDt3nsdUsGruH2zsTH6J8WC9znem3SRW+OQftqnN5BlvL+IIrAgnxnDyjqSz chi/LnO0lYW9gVQFcAOOGHcMjngCsjY= Received: from mail-wr1-f72.google.com (mail-wr1-f72.google.com [209.85.221.72]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-187-8m4wWGmdNPW2ZLo7SKKUxA-1; Wed, 09 Jun 2021 06:57:02 -0400 X-MC-Unique: 8m4wWGmdNPW2ZLo7SKKUxA-1 Received: by mail-wr1-f72.google.com with SMTP id v15-20020a5d4a4f0000b0290118dc518878so10649081wrs.6 for ; Wed, 09 Jun 2021 03:57:02 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:organization :message-id:date:user-agent:mime-version:in-reply-to :content-language:content-transfer-encoding; bh=1FvxnKPfDfM/0QN9kSJy74v8JuVnkBg3G7v6vsc/x3c=; b=Q3aiBeouHUJYmhDMWqE9Mm3EKU0KY3f3Ym9xvLEXxTtoBz9yU75rGiJd4C/tei3a0C BM8N5mVvW8z7Ksm96ZSMm09BWeW4Nv3MX9NLVzeWzKm2AQ/Gs3/rtKoqcN4WfbUC9mUy npqpGLtEjdbyveAL8lVWmg78IDgPD/zB4a/ZJ7oFbDcEpNYf+prCrTi6TjHZfyuqlc3b /cAVNOL+GYQQWQsfKzT/4tRYXEG9VOyIGHlRX1QlP906ePO8dhv6MCflF+WdONI7Sake Fn1r9jJivb7vN847cZr0bQpqnmHoaHhbf0jc6bBHuS+VfW9WyDbTwcGdeo7mHDE1c7yl mAFw== X-Gm-Message-State: AOAM531kFCf/MOlXD8FZhfQ8ronir0aPFPHTOhmVAlV639FJ+pnEhqmj I483QC9CGtER5tbIfJKym5U0bi94DHAS7MVF0PhdMJVBi2v+5mRNkR6WeFYd/yT93iH/OdIW1WY FhIXxflfQuMtX/tCW6qfsWVLBcw== X-Received: by 2002:a05:600c:2dcf:: with SMTP id e15mr9108537wmh.117.1623236221492; Wed, 09 Jun 2021 03:57:01 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxxia50/pFxZeButMmgu0RohZ0cO/Gta91kBLXzoklWxVlFQkUp1XOrMMoz2YOn8nWExEedrA== X-Received: by 2002:a05:600c:2dcf:: with SMTP id e15mr9108479wmh.117.1623236220976; Wed, 09 Jun 2021 03:57:00 -0700 (PDT) Received: from [192.168.3.132] (p5b0c611d.dip0.t-ipconnect.de. [91.12.97.29]) by smtp.gmail.com with ESMTPSA id c64sm6250834wma.15.2021.06.09.03.56.59 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 09 Jun 2021 03:57:00 -0700 (PDT) Subject: Re: [PATCH 8/9] mm: replace CONFIG_NEED_MULTIPLE_NODES with CONFIG_NUMA To: Mike Rapoport , Andrew Morton References: <20210602105348.13387-1-rppt@kernel.org> <20210602105348.13387-9-rppt@kernel.org> From: David Hildenbrand Organization: Red Hat Message-ID: <450360f3-0d8d-651d-9f8b-ce6f13a881c4@redhat.com> Date: Wed, 9 Jun 2021 12:56:59 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.10.1 MIME-Version: 1.0 In-Reply-To: <20210602105348.13387-9-rppt@kernel.org> Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=david@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-BeenThere: linuxppc-dev@lists.ozlabs.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-ia64@vger.kernel.org, linux-sh@vger.kernel.org, linux-mips@vger.kernel.org, linux-mm@kvack.org, sparclinux@vger.kernel.org, linux-riscv@lists.infradead.org, linux-arch@vger.kernel.org, linux-s390@vger.kernel.org, Jonathan Corbet , linux-doc@vger.kernel.org, Mike Rapoport , Geert Uytterhoeven , Matt Turner , linux-snps-arc@lists.infradead.org, linux-xtensa@linux-xtensa.org, Arnd Bergmann , linux-m68k@lists.linux-m68k.org, Ivan Kokshaysky , linux-arm-kernel@lists.infradead.org, Richard Henderson , Vineet Gupta , kexec@lists.infradead.org, linux-kernel@vger.kernel.org, linux-alpha@vger.kernel.org, linuxppc-dev@lists.ozlabs.org Errors-To: linuxppc-dev-bounces+linuxppc-dev=archiver.kernel.org@lists.ozlabs.org Sender: "Linuxppc-dev" On 02.06.21 12:53, Mike Rapoport wrote: > From: Mike Rapoport > > After removal of DISCINTIGMEM the NEED_MULTIPLE_NODES and NUMA > configuration options are equivalent. > > Drop CONFIG_NEED_MULTIPLE_NODES and use CONFIG_NUMA instead. > > Done with > > $ sed -i 's/CONFIG_NEED_MULTIPLE_NODES/CONFIG_NUMA/' \ > $(git grep -wl CONFIG_NEED_MULTIPLE_NODES) > $ sed -i 's/NEED_MULTIPLE_NODES/NUMA/' \ > $(git grep -wl NEED_MULTIPLE_NODES) > > with manual tweaks afterwards. > > Signed-off-by: Mike Rapoport > --- > arch/arm64/Kconfig | 2 +- > arch/ia64/Kconfig | 2 +- > arch/mips/Kconfig | 2 +- > arch/mips/include/asm/mmzone.h | 2 +- > arch/mips/include/asm/page.h | 2 +- > arch/mips/mm/init.c | 4 ++-- > arch/powerpc/Kconfig | 2 +- > arch/powerpc/include/asm/mmzone.h | 4 ++-- > arch/powerpc/kernel/setup_64.c | 2 +- > arch/powerpc/kernel/smp.c | 2 +- > arch/powerpc/kexec/core.c | 4 ++-- > arch/powerpc/mm/Makefile | 2 +- > arch/powerpc/mm/mem.c | 4 ++-- > arch/riscv/Kconfig | 2 +- > arch/s390/Kconfig | 2 +- > arch/sh/include/asm/mmzone.h | 4 ++-- > arch/sh/kernel/topology.c | 2 +- > arch/sh/mm/Kconfig | 2 +- > arch/sh/mm/init.c | 2 +- > arch/sparc/Kconfig | 2 +- > arch/sparc/include/asm/mmzone.h | 4 ++-- > arch/sparc/kernel/smp_64.c | 2 +- > arch/sparc/mm/init_64.c | 12 ++++++------ > arch/x86/Kconfig | 2 +- > arch/x86/kernel/setup_percpu.c | 6 +++--- > arch/x86/mm/init_32.c | 4 ++-- > include/asm-generic/topology.h | 2 +- > include/linux/memblock.h | 6 +++--- > include/linux/mm.h | 4 ++-- > include/linux/mmzone.h | 8 ++++---- > kernel/crash_core.c | 2 +- > mm/Kconfig | 9 --------- > mm/memblock.c | 8 ++++---- > mm/page_alloc.c | 6 +++--- > 34 files changed, 58 insertions(+), 67 deletions(-) > > diff --git a/arch/arm64/Kconfig b/arch/arm64/Kconfig > index 9f1d8566bbf9..d01a1545ab8f 100644 > --- a/arch/arm64/Kconfig > +++ b/arch/arm64/Kconfig > @@ -1035,7 +1035,7 @@ config NODES_SHIFT > int "Maximum NUMA Nodes (as a power of 2)" > range 1 10 > default "4" > - depends on NEED_MULTIPLE_NODES > + depends on NUMA > help > Specify the maximum number of NUMA Nodes available on the target > system. Increases memory reserved to accommodate various tables. > diff --git a/arch/ia64/Kconfig b/arch/ia64/Kconfig > index 279252e3e0f7..da22a35e6f03 100644 > --- a/arch/ia64/Kconfig > +++ b/arch/ia64/Kconfig > @@ -302,7 +302,7 @@ config NODES_SHIFT > int "Max num nodes shift(3-10)" > range 3 10 > default "10" > - depends on NEED_MULTIPLE_NODES > + depends on NUMA > help > This option specifies the maximum number of nodes in your SSI system. > MAX_NUMNODES will be 2^(This value). > diff --git a/arch/mips/Kconfig b/arch/mips/Kconfig > index ed51970c08e7..4704a16c2e44 100644 > --- a/arch/mips/Kconfig > +++ b/arch/mips/Kconfig > @@ -2867,7 +2867,7 @@ config RANDOMIZE_BASE_MAX_OFFSET > config NODES_SHIFT > int > default "6" > - depends on NEED_MULTIPLE_NODES > + depends on NUMA > > config HW_PERF_EVENTS > bool "Enable hardware performance counter support for perf events" > diff --git a/arch/mips/include/asm/mmzone.h b/arch/mips/include/asm/mmzone.h > index 7649ab45e80c..602a21aee9d4 100644 > --- a/arch/mips/include/asm/mmzone.h > +++ b/arch/mips/include/asm/mmzone.h > @@ -8,7 +8,7 @@ > > #include > > -#ifdef CONFIG_NEED_MULTIPLE_NODES > +#ifdef CONFIG_NUMA > # include > #endif > > diff --git a/arch/mips/include/asm/page.h b/arch/mips/include/asm/page.h > index 195ff4e9771f..96bc798c1ec1 100644 > --- a/arch/mips/include/asm/page.h > +++ b/arch/mips/include/asm/page.h > @@ -239,7 +239,7 @@ static inline int pfn_valid(unsigned long pfn) > > /* pfn_valid is defined in linux/mmzone.h */ > > -#elif defined(CONFIG_NEED_MULTIPLE_NODES) > +#elif defined(CONFIG_NUMA) > > #define pfn_valid(pfn) \ > ({ \ > diff --git a/arch/mips/mm/init.c b/arch/mips/mm/init.c > index 97f6ca341448..19347dc6bbf8 100644 > --- a/arch/mips/mm/init.c > +++ b/arch/mips/mm/init.c > @@ -394,7 +394,7 @@ void maar_init(void) > } > } > > -#ifndef CONFIG_NEED_MULTIPLE_NODES > +#ifndef CONFIG_NUMA > void __init paging_init(void) > { > unsigned long max_zone_pfns[MAX_NR_ZONES]; > @@ -473,7 +473,7 @@ void __init mem_init(void) > 0x80000000 - 4, KCORE_TEXT); > #endif > } > -#endif /* !CONFIG_NEED_MULTIPLE_NODES */ > +#endif /* !CONFIG_NUMA */ > > void free_init_pages(const char *what, unsigned long begin, unsigned long end) > { > diff --git a/arch/powerpc/Kconfig b/arch/powerpc/Kconfig > index 088dd2afcfe4..14b132cf95e2 100644 > --- a/arch/powerpc/Kconfig > +++ b/arch/powerpc/Kconfig > @@ -671,7 +671,7 @@ config NODES_SHIFT > int > default "8" if PPC64 > default "4" > - depends on NEED_MULTIPLE_NODES > + depends on NUMA > > config USE_PERCPU_NUMA_NODE_ID > def_bool y > diff --git a/arch/powerpc/include/asm/mmzone.h b/arch/powerpc/include/asm/mmzone.h > index 6cda76b57c5d..4c6c6dbd182f 100644 > --- a/arch/powerpc/include/asm/mmzone.h > +++ b/arch/powerpc/include/asm/mmzone.h > @@ -18,7 +18,7 @@ > * flags field of the struct page > */ > > -#ifdef CONFIG_NEED_MULTIPLE_NODES > +#ifdef CONFIG_NUMA > > extern struct pglist_data *node_data[]; > /* > @@ -41,7 +41,7 @@ u64 memory_hotplug_max(void); > > #else > #define memory_hotplug_max() memblock_end_of_DRAM() > -#endif /* CONFIG_NEED_MULTIPLE_NODES */ > +#endif /* CONFIG_NUMA */ > #ifdef CONFIG_FA_DUMP > #define __HAVE_ARCH_RESERVED_KERNEL_PAGES > #endif > diff --git a/arch/powerpc/kernel/setup_64.c b/arch/powerpc/kernel/setup_64.c > index e42b85e4f1aa..a35fbf4d0bce 100644 > --- a/arch/powerpc/kernel/setup_64.c > +++ b/arch/powerpc/kernel/setup_64.c > @@ -788,7 +788,7 @@ static void * __init pcpu_alloc_bootmem(unsigned int cpu, size_t size, > size_t align) > { > const unsigned long goal = __pa(MAX_DMA_ADDRESS); > -#ifdef CONFIG_NEED_MULTIPLE_NODES > +#ifdef CONFIG_NUMA > int node = early_cpu_to_node(cpu); > void *ptr; > > diff --git a/arch/powerpc/kernel/smp.c b/arch/powerpc/kernel/smp.c > index 2e05c783440a..a5209ea3859e 100644 > --- a/arch/powerpc/kernel/smp.c > +++ b/arch/powerpc/kernel/smp.c > @@ -1047,7 +1047,7 @@ void __init smp_prepare_cpus(unsigned int max_cpus) > zalloc_cpumask_var_node(&per_cpu(cpu_coregroup_map, cpu), > GFP_KERNEL, cpu_to_node(cpu)); > > -#ifdef CONFIG_NEED_MULTIPLE_NODES > +#ifdef CONFIG_NUMA > /* > * numa_node_id() works after this. > */ > diff --git a/arch/powerpc/kexec/core.c b/arch/powerpc/kexec/core.c > index 56da5eb2b923..48525e8b5730 100644 > --- a/arch/powerpc/kexec/core.c > +++ b/arch/powerpc/kexec/core.c > @@ -68,11 +68,11 @@ void machine_kexec_cleanup(struct kimage *image) > void arch_crash_save_vmcoreinfo(void) > { > > -#ifdef CONFIG_NEED_MULTIPLE_NODES > +#ifdef CONFIG_NUMA > VMCOREINFO_SYMBOL(node_data); > VMCOREINFO_LENGTH(node_data, MAX_NUMNODES); > #endif > -#ifndef CONFIG_NEED_MULTIPLE_NODES > +#ifndef CONFIG_NUMA > VMCOREINFO_SYMBOL(contig_page_data); > #endif > #if defined(CONFIG_PPC64) && defined(CONFIG_SPARSEMEM_VMEMMAP) > diff --git a/arch/powerpc/mm/Makefile b/arch/powerpc/mm/Makefile > index c3df3a8501d4..2ffcf540f08b 100644 > --- a/arch/powerpc/mm/Makefile > +++ b/arch/powerpc/mm/Makefile > @@ -13,7 +13,7 @@ obj-y := fault.o mem.o pgtable.o mmap.o maccess.o \ > obj-$(CONFIG_PPC_MMU_NOHASH) += nohash/ > obj-$(CONFIG_PPC_BOOK3S_32) += book3s32/ > obj-$(CONFIG_PPC_BOOK3S_64) += book3s64/ > -obj-$(CONFIG_NEED_MULTIPLE_NODES) += numa.o > +obj-$(CONFIG_NUMA) += numa.o > obj-$(CONFIG_PPC_MM_SLICES) += slice.o > obj-$(CONFIG_HUGETLB_PAGE) += hugetlbpage.o > obj-$(CONFIG_NOT_COHERENT_CACHE) += dma-noncoherent.o > diff --git a/arch/powerpc/mm/mem.c b/arch/powerpc/mm/mem.c > index 043bbeaf407c..7a266991315f 100644 > --- a/arch/powerpc/mm/mem.c > +++ b/arch/powerpc/mm/mem.c > @@ -126,7 +126,7 @@ void __ref arch_remove_memory(int nid, u64 start, u64 size, > } > #endif > > -#ifndef CONFIG_NEED_MULTIPLE_NODES > +#ifndef CONFIG_NUMA > void __init mem_topology_setup(void) > { > max_low_pfn = max_pfn = memblock_end_of_DRAM() >> PAGE_SHIFT; > @@ -161,7 +161,7 @@ static int __init mark_nonram_nosave(void) > > return 0; > } > -#else /* CONFIG_NEED_MULTIPLE_NODES */ > +#else /* CONFIG_NUMA */ > static int __init mark_nonram_nosave(void) > { > return 0; > diff --git a/arch/riscv/Kconfig b/arch/riscv/Kconfig > index a8ad8eb76120..e985dbf9ff27 100644 > --- a/arch/riscv/Kconfig > +++ b/arch/riscv/Kconfig > @@ -331,7 +331,7 @@ config NODES_SHIFT > int "Maximum NUMA Nodes (as a power of 2)" > range 1 10 > default "2" > - depends on NEED_MULTIPLE_NODES > + depends on NUMA > help > Specify the maximum number of NUMA Nodes available on the target > system. Increases memory reserved to accommodate various tables. > diff --git a/arch/s390/Kconfig b/arch/s390/Kconfig > index b4c7c34069f8..707afbcd81c2 100644 > --- a/arch/s390/Kconfig > +++ b/arch/s390/Kconfig > @@ -475,7 +475,7 @@ config NUMA > > config NODES_SHIFT > int > - depends on NEED_MULTIPLE_NODES > + depends on NUMA > default "1" > > config SCHED_SMT > diff --git a/arch/sh/include/asm/mmzone.h b/arch/sh/include/asm/mmzone.h > index 6552a088dc97..7b8dead2723d 100644 > --- a/arch/sh/include/asm/mmzone.h > +++ b/arch/sh/include/asm/mmzone.h > @@ -2,7 +2,7 @@ > #ifndef __ASM_SH_MMZONE_H > #define __ASM_SH_MMZONE_H > > -#ifdef CONFIG_NEED_MULTIPLE_NODES > +#ifdef CONFIG_NUMA > #include > > extern struct pglist_data *node_data[]; > @@ -31,7 +31,7 @@ static inline void > setup_bootmem_node(int nid, unsigned long start, unsigned long end) > { > } > -#endif /* CONFIG_NEED_MULTIPLE_NODES */ > +#endif /* CONFIG_NUMA */ > > /* Platform specific mem init */ > void __init plat_mem_setup(void); > diff --git a/arch/sh/kernel/topology.c b/arch/sh/kernel/topology.c > index 7a989eed3b18..76af6db9daa2 100644 > --- a/arch/sh/kernel/topology.c > +++ b/arch/sh/kernel/topology.c > @@ -46,7 +46,7 @@ static int __init topology_init(void) > { > int i, ret; > > -#ifdef CONFIG_NEED_MULTIPLE_NODES > +#ifdef CONFIG_NUMA > for_each_online_node(i) > register_one_node(i); > #endif > diff --git a/arch/sh/mm/Kconfig b/arch/sh/mm/Kconfig > index d551a9cac41e..ba569cfb4368 100644 > --- a/arch/sh/mm/Kconfig > +++ b/arch/sh/mm/Kconfig > @@ -120,7 +120,7 @@ config NODES_SHIFT > int > default "3" if CPU_SUBTYPE_SHX3 > default "1" > - depends on NEED_MULTIPLE_NODES > + depends on NUMA > > config ARCH_FLATMEM_ENABLE > def_bool y > diff --git a/arch/sh/mm/init.c b/arch/sh/mm/init.c > index 168d7d4dd735..ce26c7f8950a 100644 > --- a/arch/sh/mm/init.c > +++ b/arch/sh/mm/init.c > @@ -211,7 +211,7 @@ void __init allocate_pgdat(unsigned int nid) > > get_pfn_range_for_nid(nid, &start_pfn, &end_pfn); > > -#ifdef CONFIG_NEED_MULTIPLE_NODES > +#ifdef CONFIG_NUMA > NODE_DATA(nid) = memblock_alloc_try_nid( > sizeof(struct pglist_data), > SMP_CACHE_BYTES, MEMBLOCK_LOW_LIMIT, > diff --git a/arch/sparc/Kconfig b/arch/sparc/Kconfig > index 164a5254c91c..c72f52c704cd 100644 > --- a/arch/sparc/Kconfig > +++ b/arch/sparc/Kconfig > @@ -265,7 +265,7 @@ config NODES_SHIFT > int "Maximum NUMA Nodes (as a power of 2)" > range 4 5 if SPARC64 > default "5" > - depends on NEED_MULTIPLE_NODES > + depends on NUMA > help > Specify the maximum number of NUMA Nodes available on the target > system. Increases memory reserved to accommodate various tables. > diff --git a/arch/sparc/include/asm/mmzone.h b/arch/sparc/include/asm/mmzone.h > index 6543fb97a849..a236d8aa893a 100644 > --- a/arch/sparc/include/asm/mmzone.h > +++ b/arch/sparc/include/asm/mmzone.h > @@ -2,7 +2,7 @@ > #ifndef _SPARC64_MMZONE_H > #define _SPARC64_MMZONE_H > > -#ifdef CONFIG_NEED_MULTIPLE_NODES > +#ifdef CONFIG_NUMA > > #include > > @@ -13,6 +13,6 @@ extern struct pglist_data *node_data[]; > extern int numa_cpu_lookup_table[]; > extern cpumask_t numa_cpumask_lookup_table[]; > > -#endif /* CONFIG_NEED_MULTIPLE_NODES */ > +#endif /* CONFIG_NUMA */ > > #endif /* _SPARC64_MMZONE_H */ > diff --git a/arch/sparc/kernel/smp_64.c b/arch/sparc/kernel/smp_64.c > index e38d8bf454e8..c89a5971fb0d 100644 > --- a/arch/sparc/kernel/smp_64.c > +++ b/arch/sparc/kernel/smp_64.c > @@ -1546,7 +1546,7 @@ static void * __init pcpu_alloc_bootmem(unsigned int cpu, size_t size, > size_t align) > { > const unsigned long goal = __pa(MAX_DMA_ADDRESS); > -#ifdef CONFIG_NEED_MULTIPLE_NODES > +#ifdef CONFIG_NUMA > int node = cpu_to_node(cpu); > void *ptr; > > diff --git a/arch/sparc/mm/init_64.c b/arch/sparc/mm/init_64.c > index e454f179cf5d..06e938d03f3b 100644 > --- a/arch/sparc/mm/init_64.c > +++ b/arch/sparc/mm/init_64.c > @@ -903,7 +903,7 @@ struct node_mem_mask { > static struct node_mem_mask node_masks[MAX_NUMNODES]; > static int num_node_masks; > > -#ifdef CONFIG_NEED_MULTIPLE_NODES > +#ifdef CONFIG_NUMA > > struct mdesc_mlgroup { > u64 node; > @@ -1059,7 +1059,7 @@ static void __init allocate_node_data(int nid) > { > struct pglist_data *p; > unsigned long start_pfn, end_pfn; > -#ifdef CONFIG_NEED_MULTIPLE_NODES > +#ifdef CONFIG_NUMA > > NODE_DATA(nid) = memblock_alloc_node(sizeof(struct pglist_data), > SMP_CACHE_BYTES, nid); > @@ -1080,7 +1080,7 @@ static void __init allocate_node_data(int nid) > > static void init_node_masks_nonnuma(void) > { > -#ifdef CONFIG_NEED_MULTIPLE_NODES > +#ifdef CONFIG_NUMA > int i; > #endif > > @@ -1090,7 +1090,7 @@ static void init_node_masks_nonnuma(void) > node_masks[0].match = 0; > num_node_masks = 1; > > -#ifdef CONFIG_NEED_MULTIPLE_NODES > +#ifdef CONFIG_NUMA > for (i = 0; i < NR_CPUS; i++) > numa_cpu_lookup_table[i] = 0; > > @@ -1098,7 +1098,7 @@ static void init_node_masks_nonnuma(void) > #endif > } > > -#ifdef CONFIG_NEED_MULTIPLE_NODES > +#ifdef CONFIG_NUMA > struct pglist_data *node_data[MAX_NUMNODES]; > > EXPORT_SYMBOL(numa_cpu_lookup_table); > @@ -2487,7 +2487,7 @@ int page_in_phys_avail(unsigned long paddr) > > static void __init register_page_bootmem_info(void) > { > -#ifdef CONFIG_NEED_MULTIPLE_NODES > +#ifdef CONFIG_NUMA > int i; > > for_each_online_node(i) > diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig > index 0045e1b44190..5d523ff70fe7 100644 > --- a/arch/x86/Kconfig > +++ b/arch/x86/Kconfig > @@ -1597,7 +1597,7 @@ config NODES_SHIFT > default "10" if MAXSMP > default "6" if X86_64 > default "3" > - depends on NEED_MULTIPLE_NODES > + depends on NUMA > help > Specify the maximum number of NUMA Nodes available on the target > system. Increases memory reserved to accommodate various tables. > diff --git a/arch/x86/kernel/setup_percpu.c b/arch/x86/kernel/setup_percpu.c > index 0941d2f44f2a..78a32b956e81 100644 > --- a/arch/x86/kernel/setup_percpu.c > +++ b/arch/x86/kernel/setup_percpu.c > @@ -66,7 +66,7 @@ EXPORT_SYMBOL(__per_cpu_offset); > */ > static bool __init pcpu_need_numa(void) > { > -#ifdef CONFIG_NEED_MULTIPLE_NODES > +#ifdef CONFIG_NUMA > pg_data_t *last = NULL; > unsigned int cpu; > > @@ -101,7 +101,7 @@ static void * __init pcpu_alloc_bootmem(unsigned int cpu, unsigned long size, > unsigned long align) > { > const unsigned long goal = __pa(MAX_DMA_ADDRESS); > -#ifdef CONFIG_NEED_MULTIPLE_NODES > +#ifdef CONFIG_NUMA > int node = early_cpu_to_node(cpu); > void *ptr; > > @@ -140,7 +140,7 @@ static void __init pcpu_fc_free(void *ptr, size_t size) > > static int __init pcpu_cpu_distance(unsigned int from, unsigned int to) > { > -#ifdef CONFIG_NEED_MULTIPLE_NODES > +#ifdef CONFIG_NUMA > if (early_cpu_to_node(from) == early_cpu_to_node(to)) > return LOCAL_DISTANCE; > else > diff --git a/arch/x86/mm/init_32.c b/arch/x86/mm/init_32.c > index 21ffb03f6c72..74b78840182d 100644 > --- a/arch/x86/mm/init_32.c > +++ b/arch/x86/mm/init_32.c > @@ -651,7 +651,7 @@ void __init find_low_pfn_range(void) > highmem_pfn_init(); > } > > -#ifndef CONFIG_NEED_MULTIPLE_NODES > +#ifndef CONFIG_NUMA > void __init initmem_init(void) > { > #ifdef CONFIG_HIGHMEM > @@ -677,7 +677,7 @@ void __init initmem_init(void) > > setup_bootmem_allocator(); > } > -#endif /* !CONFIG_NEED_MULTIPLE_NODES */ > +#endif /* !CONFIG_NUMA */ > > void __init setup_bootmem_allocator(void) > { > diff --git a/include/asm-generic/topology.h b/include/asm-generic/topology.h > index 5aa8705df87e..4dbe715be65b 100644 > --- a/include/asm-generic/topology.h > +++ b/include/asm-generic/topology.h > @@ -45,7 +45,7 @@ > #endif > > #ifndef cpumask_of_node > - #ifdef CONFIG_NEED_MULTIPLE_NODES > + #ifdef CONFIG_NUMA > #define cpumask_of_node(node) ((node) == 0 ? cpu_online_mask : cpu_none_mask) > #else > #define cpumask_of_node(node) ((void)(node), cpu_online_mask) > diff --git a/include/linux/memblock.h b/include/linux/memblock.h > index 5984fff3f175..552309342c38 100644 > --- a/include/linux/memblock.h > +++ b/include/linux/memblock.h > @@ -50,7 +50,7 @@ struct memblock_region { > phys_addr_t base; > phys_addr_t size; > enum memblock_flags flags; > -#ifdef CONFIG_NEED_MULTIPLE_NODES > +#ifdef CONFIG_NUMA > int nid; > #endif > }; > @@ -347,7 +347,7 @@ int __init deferred_page_init_max_threads(const struct cpumask *node_cpumask); > int memblock_set_node(phys_addr_t base, phys_addr_t size, > struct memblock_type *type, int nid); > > -#ifdef CONFIG_NEED_MULTIPLE_NODES > +#ifdef CONFIG_NUMA > static inline void memblock_set_region_node(struct memblock_region *r, int nid) > { > r->nid = nid; > @@ -366,7 +366,7 @@ static inline int memblock_get_region_node(const struct memblock_region *r) > { > return 0; > } > -#endif /* CONFIG_NEED_MULTIPLE_NODES */ > +#endif /* CONFIG_NUMA */ > > /* Flags for memblock allocation APIs */ > #define MEMBLOCK_ALLOC_ANYWHERE (~(phys_addr_t)0) > diff --git a/include/linux/mm.h b/include/linux/mm.h > index c274f75efcf9..cf66f0ea7956 100644 > --- a/include/linux/mm.h > +++ b/include/linux/mm.h > @@ -46,7 +46,7 @@ extern int sysctl_page_lock_unfairness; > > void init_mm_internals(void); > > -#ifndef CONFIG_NEED_MULTIPLE_NODES /* Don't use mapnrs, do it properly */ > +#ifndef CONFIG_NUMA /* Don't use mapnrs, do it properly */ > extern unsigned long max_mapnr; > > static inline void set_max_mapnr(unsigned long limit) > @@ -2457,7 +2457,7 @@ extern void get_pfn_range_for_nid(unsigned int nid, > unsigned long *start_pfn, unsigned long *end_pfn); > extern unsigned long find_min_pfn_with_active_regions(void); > > -#ifndef CONFIG_NEED_MULTIPLE_NODES > +#ifndef CONFIG_NUMA > static inline int early_pfn_to_nid(unsigned long pfn) > { > return 0; > diff --git a/include/linux/mmzone.h b/include/linux/mmzone.h > index 2b41e252a995..ad42f440c704 100644 > --- a/include/linux/mmzone.h > +++ b/include/linux/mmzone.h > @@ -985,7 +985,7 @@ extern int movable_zone; > #ifdef CONFIG_HIGHMEM > static inline int zone_movable_is_highmem(void) > { > -#ifdef CONFIG_NEED_MULTIPLE_NODES > +#ifdef CONFIG_NUMA > return movable_zone == ZONE_HIGHMEM; > #else > return (ZONE_MOVABLE - 1) == ZONE_HIGHMEM; > @@ -1041,17 +1041,17 @@ extern int percpu_pagelist_fraction; > extern char numa_zonelist_order[]; > #define NUMA_ZONELIST_ORDER_LEN 16 > > -#ifndef CONFIG_NEED_MULTIPLE_NODES > +#ifndef CONFIG_NUMA > > extern struct pglist_data contig_page_data; > #define NODE_DATA(nid) (&contig_page_data) > #define NODE_MEM_MAP(nid) mem_map > > -#else /* CONFIG_NEED_MULTIPLE_NODES */ > +#else /* CONFIG_NUMA */ > > #include > > -#endif /* !CONFIG_NEED_MULTIPLE_NODES */ > +#endif /* !CONFIG_NUMA */ > > extern struct pglist_data *first_online_pgdat(void); > extern struct pglist_data *next_online_pgdat(struct pglist_data *pgdat); > diff --git a/kernel/crash_core.c b/kernel/crash_core.c > index 825284baaf46..53eb8bc6026d 100644 > --- a/kernel/crash_core.c > +++ b/kernel/crash_core.c > @@ -455,7 +455,7 @@ static int __init crash_save_vmcoreinfo_init(void) > VMCOREINFO_SYMBOL(_stext); > VMCOREINFO_SYMBOL(vmap_area_list); > > -#ifndef CONFIG_NEED_MULTIPLE_NODES > +#ifndef CONFIG_NUMA > VMCOREINFO_SYMBOL(mem_map); > VMCOREINFO_SYMBOL(contig_page_data); > #endif > diff --git a/mm/Kconfig b/mm/Kconfig > index 218b96ccc84a..bffe4bd859f3 100644 > --- a/mm/Kconfig > +++ b/mm/Kconfig > @@ -59,15 +59,6 @@ config FLAT_NODE_MEM_MAP > def_bool y > depends on !SPARSEMEM > > -# > -# Both the NUMA code and DISCONTIGMEM use arrays of pg_data_t's > -# to represent different areas of memory. This variable allows > -# those dependencies to exist individually. > -# > -config NEED_MULTIPLE_NODES > - def_bool y > - depends on NUMA > - > # > # SPARSEMEM_EXTREME (which is the default) does some bootmem > # allocations when sparse_init() is called. If this cannot > diff --git a/mm/memblock.c b/mm/memblock.c > index afaefa8fc6ab..123feef5259d 100644 > --- a/mm/memblock.c > +++ b/mm/memblock.c > @@ -92,7 +92,7 @@ > * system initialization completes. > */ > > -#ifndef CONFIG_NEED_MULTIPLE_NODES > +#ifndef CONFIG_NUMA > struct pglist_data __refdata contig_page_data; > EXPORT_SYMBOL(contig_page_data); > #endif > @@ -607,7 +607,7 @@ static int __init_memblock memblock_add_range(struct memblock_type *type, > * area, insert that portion. > */ > if (rbase > base) { > -#ifdef CONFIG_NEED_MULTIPLE_NODES > +#ifdef CONFIG_NUMA > WARN_ON(nid != memblock_get_region_node(rgn)); > #endif > WARN_ON(flags != rgn->flags); > @@ -1205,7 +1205,7 @@ void __init_memblock __next_mem_pfn_range(int *idx, int nid, > int __init_memblock memblock_set_node(phys_addr_t base, phys_addr_t size, > struct memblock_type *type, int nid) > { > -#ifdef CONFIG_NEED_MULTIPLE_NODES > +#ifdef CONFIG_NUMA > int start_rgn, end_rgn; > int i, ret; > > @@ -1849,7 +1849,7 @@ static void __init_memblock memblock_dump(struct memblock_type *type) > size = rgn->size; > end = base + size - 1; > flags = rgn->flags; > -#ifdef CONFIG_NEED_MULTIPLE_NODES > +#ifdef CONFIG_NUMA > if (memblock_get_region_node(rgn) != MAX_NUMNODES) > snprintf(nid_buf, sizeof(nid_buf), " on node %d", > memblock_get_region_node(rgn)); > diff --git a/mm/page_alloc.c b/mm/page_alloc.c > index 6fc22482eaa8..8f08135d3eb4 100644 > --- a/mm/page_alloc.c > +++ b/mm/page_alloc.c > @@ -1596,7 +1596,7 @@ void __free_pages_core(struct page *page, unsigned int order) > __free_pages_ok(page, order, FPI_TO_TAIL | FPI_SKIP_KASAN_POISON); > } > > -#ifdef CONFIG_NEED_MULTIPLE_NODES > +#ifdef CONFIG_NUMA > > /* > * During memory init memblocks map pfns to nids. The search is expensive and > @@ -1646,7 +1646,7 @@ int __meminit early_pfn_to_nid(unsigned long pfn) > > return nid; > } > -#endif /* CONFIG_NEED_MULTIPLE_NODES */ > +#endif /* CONFIG_NUMA */ > > void __init memblock_free_pages(struct page *page, unsigned long pfn, > unsigned int order) > @@ -7276,7 +7276,7 @@ static void __ref alloc_node_mem_map(struct pglist_data *pgdat) > pr_debug("%s: node %d, pgdat %08lx, node_mem_map %08lx\n", > __func__, pgdat->node_id, (unsigned long)pgdat, > (unsigned long)pgdat->node_mem_map); > -#ifndef CONFIG_NEED_MULTIPLE_NODES > +#ifndef CONFIG_NUMA > /* > * With no DISCONTIG, the global mem_map is just set as node 0's > */ > Nice Acked-by: David Hildenbrand -- Thanks, David / dhildenb From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-15.5 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS, USER_AGENT_SANE_1 autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 49F6DC48BCF for ; Wed, 9 Jun 2021 11:00:01 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 0D6A96136D for ; Wed, 9 Jun 2021 11:00:01 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 0D6A96136D Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-snps-arc-bounces+linux-snps-arc=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:Content-Type: Content-Transfer-Encoding:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:Date:Message-ID:From: References:Cc:To:Subject:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=YxcketvUglnonvsIbvJvaIpU4dwLvBTqvUXFvK/VV5M=; b=bzbglD4aGhEzlgguARcAGAVLww OSOxIImpTHUstspy0/E1gQlS3HdaNGLvVdmlJBjSzQbkXmmnwAduUDp0tE0NRNW4uXXFQAJspmDA8 EcquDIPBp+35BnDBFg3OlHsjTgExjoquCOiZ1WEJ+X8yKkaTJzji2YzQdB1nrGO9LJlXdjldDR4Xw 2+qKGaZvn1NZKSaoH1m47j8yP/1zM8C04uOBweTsiHqUzfQBBxuHu2aRjiYe+pPtRFyWZAO1HvRuD sASqLVhvQWEYbo4xdZm9fkauUhLE6FAXu5hnp/oJXrUB5hy+0XRPY1vp5Jp1Pu3Bwyq+BlNsCJE+z 2LkOJ/jQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1lqvwG-00DCtE-G8; Wed, 09 Jun 2021 11:00:00 +0000 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1lqvtR-00DBYT-2S for linux-snps-arc@lists.infradead.org; Wed, 09 Jun 2021 10:57:08 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1623236224; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=1FvxnKPfDfM/0QN9kSJy74v8JuVnkBg3G7v6vsc/x3c=; b=FPxTLNVK8/iumttqXzLWn8TpyEfDS9xkPcKf+6gj2Xx+FvHA+p2jZZ0g0A0d1YhpCbLE63 8f3k6jPTGgQDt3nsdUsGruH2zsTH6J8WC9znem3SRW+OQftqnN5BlvL+IIrAgnxnDyjqSz chi/LnO0lYW9gVQFcAOOGHcMjngCsjY= Received: from mail-wr1-f69.google.com (mail-wr1-f69.google.com [209.85.221.69]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-185-p1a4zZnvO8yrFOlBy0ADSQ-1; Wed, 09 Jun 2021 06:57:02 -0400 X-MC-Unique: p1a4zZnvO8yrFOlBy0ADSQ-1 Received: by mail-wr1-f69.google.com with SMTP id t14-20020adfe44e0000b029011851efa802so10552507wrm.11 for ; Wed, 09 Jun 2021 03:57:02 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:organization :message-id:date:user-agent:mime-version:in-reply-to :content-language:content-transfer-encoding; bh=1FvxnKPfDfM/0QN9kSJy74v8JuVnkBg3G7v6vsc/x3c=; b=OaiH3oBkrCT92uvrS0HrIw8bm+g9d8QbKXr9Q8dLrTDTXUU0rySGakUyKDYYf22rCW ZVZgBEK42xYLO5BcTh/ZcARQ62618YMv/QaBvfVijLmGtfwpiGaMTVO/VVmCB0oa+d5D ZdZ1gEqlXG7WLqCci2vjhwXNZdOxX6bW2TG4LFYcYVZS/tn40UJirgk4ZMHh9mk2YG3N tyexZ8AKbzu4QpMswcAu2kmJXsaKWtqbHtQrn4xDnhtzD+2ALQzNoYheAE85gdaCKmn8 NBYyyKZAlBsoBSEnqwlrIrG3Z6tU1qEu9gG9Q7rKs/FV+6uZummF65wdzvfVabE78GpX ssVA== X-Gm-Message-State: AOAM533iqp6wkEl7/+pM/DQwEqO6bL0EsX9X/YJveQhnqZEhhiKRbhwV ipeLYrsYJbLmJ5CE16k5PSOGL4UUlBq9xcG6lgzK/i7wwfs2y90Tzu65MUczID3sguiFKt55LKu kSxXJnvBXtQ1e7fUefLb6UjMgczLaEz6B X-Received: by 2002:a05:600c:2dcf:: with SMTP id e15mr9108514wmh.117.1623236221410; Wed, 09 Jun 2021 03:57:01 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxxia50/pFxZeButMmgu0RohZ0cO/Gta91kBLXzoklWxVlFQkUp1XOrMMoz2YOn8nWExEedrA== X-Received: by 2002:a05:600c:2dcf:: with SMTP id e15mr9108479wmh.117.1623236220976; Wed, 09 Jun 2021 03:57:00 -0700 (PDT) Received: from [192.168.3.132] (p5b0c611d.dip0.t-ipconnect.de. [91.12.97.29]) by smtp.gmail.com with ESMTPSA id c64sm6250834wma.15.2021.06.09.03.56.59 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 09 Jun 2021 03:57:00 -0700 (PDT) Subject: Re: [PATCH 8/9] mm: replace CONFIG_NEED_MULTIPLE_NODES with CONFIG_NUMA To: Mike Rapoport , Andrew Morton Cc: Arnd Bergmann , Geert Uytterhoeven , Ivan Kokshaysky , Jonathan Corbet , Matt Turner , Mike Rapoport , Richard Henderson , Vineet Gupta , kexec@lists.infradead.org, linux-alpha@vger.kernel.org, linux-arch@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-doc@vger.kernel.org, linux-ia64@vger.kernel.org, linux-kernel@vger.kernel.org, linux-m68k@lists.linux-m68k.org, linux-mips@vger.kernel.org, linux-mm@kvack.org, linux-riscv@lists.infradead.org, linux-s390@vger.kernel.org, linux-sh@vger.kernel.org, linux-snps-arc@lists.infradead.org, linux-xtensa@linux-xtensa.org, linuxppc-dev@lists.ozlabs.org, sparclinux@vger.kernel.org References: <20210602105348.13387-1-rppt@kernel.org> <20210602105348.13387-9-rppt@kernel.org> From: David Hildenbrand Organization: Red Hat Message-ID: <450360f3-0d8d-651d-9f8b-ce6f13a881c4@redhat.com> Date: Wed, 9 Jun 2021 12:56:59 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.10.1 MIME-Version: 1.0 In-Reply-To: <20210602105348.13387-9-rppt@kernel.org> Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=david@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Language: en-US X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210609_035705_399926_1618E44C X-CRM114-Status: GOOD ( 28.45 ) X-BeenThere: linux-snps-arc@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Linux on Synopsys ARC Processors List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii"; Format="flowed" Sender: "linux-snps-arc" Errors-To: linux-snps-arc-bounces+linux-snps-arc=archiver.kernel.org@lists.infradead.org On 02.06.21 12:53, Mike Rapoport wrote: > From: Mike Rapoport > > After removal of DISCINTIGMEM the NEED_MULTIPLE_NODES and NUMA > configuration options are equivalent. > > Drop CONFIG_NEED_MULTIPLE_NODES and use CONFIG_NUMA instead. > > Done with > > $ sed -i 's/CONFIG_NEED_MULTIPLE_NODES/CONFIG_NUMA/' \ > $(git grep -wl CONFIG_NEED_MULTIPLE_NODES) > $ sed -i 's/NEED_MULTIPLE_NODES/NUMA/' \ > $(git grep -wl NEED_MULTIPLE_NODES) > > with manual tweaks afterwards. > > Signed-off-by: Mike Rapoport > --- > arch/arm64/Kconfig | 2 +- > arch/ia64/Kconfig | 2 +- > arch/mips/Kconfig | 2 +- > arch/mips/include/asm/mmzone.h | 2 +- > arch/mips/include/asm/page.h | 2 +- > arch/mips/mm/init.c | 4 ++-- > arch/powerpc/Kconfig | 2 +- > arch/powerpc/include/asm/mmzone.h | 4 ++-- > arch/powerpc/kernel/setup_64.c | 2 +- > arch/powerpc/kernel/smp.c | 2 +- > arch/powerpc/kexec/core.c | 4 ++-- > arch/powerpc/mm/Makefile | 2 +- > arch/powerpc/mm/mem.c | 4 ++-- > arch/riscv/Kconfig | 2 +- > arch/s390/Kconfig | 2 +- > arch/sh/include/asm/mmzone.h | 4 ++-- > arch/sh/kernel/topology.c | 2 +- > arch/sh/mm/Kconfig | 2 +- > arch/sh/mm/init.c | 2 +- > arch/sparc/Kconfig | 2 +- > arch/sparc/include/asm/mmzone.h | 4 ++-- > arch/sparc/kernel/smp_64.c | 2 +- > arch/sparc/mm/init_64.c | 12 ++++++------ > arch/x86/Kconfig | 2 +- > arch/x86/kernel/setup_percpu.c | 6 +++--- > arch/x86/mm/init_32.c | 4 ++-- > include/asm-generic/topology.h | 2 +- > include/linux/memblock.h | 6 +++--- > include/linux/mm.h | 4 ++-- > include/linux/mmzone.h | 8 ++++---- > kernel/crash_core.c | 2 +- > mm/Kconfig | 9 --------- > mm/memblock.c | 8 ++++---- > mm/page_alloc.c | 6 +++--- > 34 files changed, 58 insertions(+), 67 deletions(-) > > diff --git a/arch/arm64/Kconfig b/arch/arm64/Kconfig > index 9f1d8566bbf9..d01a1545ab8f 100644 > --- a/arch/arm64/Kconfig > +++ b/arch/arm64/Kconfig > @@ -1035,7 +1035,7 @@ config NODES_SHIFT > int "Maximum NUMA Nodes (as a power of 2)" > range 1 10 > default "4" > - depends on NEED_MULTIPLE_NODES > + depends on NUMA > help > Specify the maximum number of NUMA Nodes available on the target > system. Increases memory reserved to accommodate various tables. > diff --git a/arch/ia64/Kconfig b/arch/ia64/Kconfig > index 279252e3e0f7..da22a35e6f03 100644 > --- a/arch/ia64/Kconfig > +++ b/arch/ia64/Kconfig > @@ -302,7 +302,7 @@ config NODES_SHIFT > int "Max num nodes shift(3-10)" > range 3 10 > default "10" > - depends on NEED_MULTIPLE_NODES > + depends on NUMA > help > This option specifies the maximum number of nodes in your SSI system. > MAX_NUMNODES will be 2^(This value). > diff --git a/arch/mips/Kconfig b/arch/mips/Kconfig > index ed51970c08e7..4704a16c2e44 100644 > --- a/arch/mips/Kconfig > +++ b/arch/mips/Kconfig > @@ -2867,7 +2867,7 @@ config RANDOMIZE_BASE_MAX_OFFSET > config NODES_SHIFT > int > default "6" > - depends on NEED_MULTIPLE_NODES > + depends on NUMA > > config HW_PERF_EVENTS > bool "Enable hardware performance counter support for perf events" > diff --git a/arch/mips/include/asm/mmzone.h b/arch/mips/include/asm/mmzone.h > index 7649ab45e80c..602a21aee9d4 100644 > --- a/arch/mips/include/asm/mmzone.h > +++ b/arch/mips/include/asm/mmzone.h > @@ -8,7 +8,7 @@ > > #include > > -#ifdef CONFIG_NEED_MULTIPLE_NODES > +#ifdef CONFIG_NUMA > # include > #endif > > diff --git a/arch/mips/include/asm/page.h b/arch/mips/include/asm/page.h > index 195ff4e9771f..96bc798c1ec1 100644 > --- a/arch/mips/include/asm/page.h > +++ b/arch/mips/include/asm/page.h > @@ -239,7 +239,7 @@ static inline int pfn_valid(unsigned long pfn) > > /* pfn_valid is defined in linux/mmzone.h */ > > -#elif defined(CONFIG_NEED_MULTIPLE_NODES) > +#elif defined(CONFIG_NUMA) > > #define pfn_valid(pfn) \ > ({ \ > diff --git a/arch/mips/mm/init.c b/arch/mips/mm/init.c > index 97f6ca341448..19347dc6bbf8 100644 > --- a/arch/mips/mm/init.c > +++ b/arch/mips/mm/init.c > @@ -394,7 +394,7 @@ void maar_init(void) > } > } > > -#ifndef CONFIG_NEED_MULTIPLE_NODES > +#ifndef CONFIG_NUMA > void __init paging_init(void) > { > unsigned long max_zone_pfns[MAX_NR_ZONES]; > @@ -473,7 +473,7 @@ void __init mem_init(void) > 0x80000000 - 4, KCORE_TEXT); > #endif > } > -#endif /* !CONFIG_NEED_MULTIPLE_NODES */ > +#endif /* !CONFIG_NUMA */ > > void free_init_pages(const char *what, unsigned long begin, unsigned long end) > { > diff --git a/arch/powerpc/Kconfig b/arch/powerpc/Kconfig > index 088dd2afcfe4..14b132cf95e2 100644 > --- a/arch/powerpc/Kconfig > +++ b/arch/powerpc/Kconfig > @@ -671,7 +671,7 @@ config NODES_SHIFT > int > default "8" if PPC64 > default "4" > - depends on NEED_MULTIPLE_NODES > + depends on NUMA > > config USE_PERCPU_NUMA_NODE_ID > def_bool y > diff --git a/arch/powerpc/include/asm/mmzone.h b/arch/powerpc/include/asm/mmzone.h > index 6cda76b57c5d..4c6c6dbd182f 100644 > --- a/arch/powerpc/include/asm/mmzone.h > +++ b/arch/powerpc/include/asm/mmzone.h > @@ -18,7 +18,7 @@ > * flags field of the struct page > */ > > -#ifdef CONFIG_NEED_MULTIPLE_NODES > +#ifdef CONFIG_NUMA > > extern struct pglist_data *node_data[]; > /* > @@ -41,7 +41,7 @@ u64 memory_hotplug_max(void); > > #else > #define memory_hotplug_max() memblock_end_of_DRAM() > -#endif /* CONFIG_NEED_MULTIPLE_NODES */ > +#endif /* CONFIG_NUMA */ > #ifdef CONFIG_FA_DUMP > #define __HAVE_ARCH_RESERVED_KERNEL_PAGES > #endif > diff --git a/arch/powerpc/kernel/setup_64.c b/arch/powerpc/kernel/setup_64.c > index e42b85e4f1aa..a35fbf4d0bce 100644 > --- a/arch/powerpc/kernel/setup_64.c > +++ b/arch/powerpc/kernel/setup_64.c > @@ -788,7 +788,7 @@ static void * __init pcpu_alloc_bootmem(unsigned int cpu, size_t size, > size_t align) > { > const unsigned long goal = __pa(MAX_DMA_ADDRESS); > -#ifdef CONFIG_NEED_MULTIPLE_NODES > +#ifdef CONFIG_NUMA > int node = early_cpu_to_node(cpu); > void *ptr; > > diff --git a/arch/powerpc/kernel/smp.c b/arch/powerpc/kernel/smp.c > index 2e05c783440a..a5209ea3859e 100644 > --- a/arch/powerpc/kernel/smp.c > +++ b/arch/powerpc/kernel/smp.c > @@ -1047,7 +1047,7 @@ void __init smp_prepare_cpus(unsigned int max_cpus) > zalloc_cpumask_var_node(&per_cpu(cpu_coregroup_map, cpu), > GFP_KERNEL, cpu_to_node(cpu)); > > -#ifdef CONFIG_NEED_MULTIPLE_NODES > +#ifdef CONFIG_NUMA > /* > * numa_node_id() works after this. > */ > diff --git a/arch/powerpc/kexec/core.c b/arch/powerpc/kexec/core.c > index 56da5eb2b923..48525e8b5730 100644 > --- a/arch/powerpc/kexec/core.c > +++ b/arch/powerpc/kexec/core.c > @@ -68,11 +68,11 @@ void machine_kexec_cleanup(struct kimage *image) > void arch_crash_save_vmcoreinfo(void) > { > > -#ifdef CONFIG_NEED_MULTIPLE_NODES > +#ifdef CONFIG_NUMA > VMCOREINFO_SYMBOL(node_data); > VMCOREINFO_LENGTH(node_data, MAX_NUMNODES); > #endif > -#ifndef CONFIG_NEED_MULTIPLE_NODES > +#ifndef CONFIG_NUMA > VMCOREINFO_SYMBOL(contig_page_data); > #endif > #if defined(CONFIG_PPC64) && defined(CONFIG_SPARSEMEM_VMEMMAP) > diff --git a/arch/powerpc/mm/Makefile b/arch/powerpc/mm/Makefile > index c3df3a8501d4..2ffcf540f08b 100644 > --- a/arch/powerpc/mm/Makefile > +++ b/arch/powerpc/mm/Makefile > @@ -13,7 +13,7 @@ obj-y := fault.o mem.o pgtable.o mmap.o maccess.o \ > obj-$(CONFIG_PPC_MMU_NOHASH) += nohash/ > obj-$(CONFIG_PPC_BOOK3S_32) += book3s32/ > obj-$(CONFIG_PPC_BOOK3S_64) += book3s64/ > -obj-$(CONFIG_NEED_MULTIPLE_NODES) += numa.o > +obj-$(CONFIG_NUMA) += numa.o > obj-$(CONFIG_PPC_MM_SLICES) += slice.o > obj-$(CONFIG_HUGETLB_PAGE) += hugetlbpage.o > obj-$(CONFIG_NOT_COHERENT_CACHE) += dma-noncoherent.o > diff --git a/arch/powerpc/mm/mem.c b/arch/powerpc/mm/mem.c > index 043bbeaf407c..7a266991315f 100644 > --- a/arch/powerpc/mm/mem.c > +++ b/arch/powerpc/mm/mem.c > @@ -126,7 +126,7 @@ void __ref arch_remove_memory(int nid, u64 start, u64 size, > } > #endif > > -#ifndef CONFIG_NEED_MULTIPLE_NODES > +#ifndef CONFIG_NUMA > void __init mem_topology_setup(void) > { > max_low_pfn = max_pfn = memblock_end_of_DRAM() >> PAGE_SHIFT; > @@ -161,7 +161,7 @@ static int __init mark_nonram_nosave(void) > > return 0; > } > -#else /* CONFIG_NEED_MULTIPLE_NODES */ > +#else /* CONFIG_NUMA */ > static int __init mark_nonram_nosave(void) > { > return 0; > diff --git a/arch/riscv/Kconfig b/arch/riscv/Kconfig > index a8ad8eb76120..e985dbf9ff27 100644 > --- a/arch/riscv/Kconfig > +++ b/arch/riscv/Kconfig > @@ -331,7 +331,7 @@ config NODES_SHIFT > int "Maximum NUMA Nodes (as a power of 2)" > range 1 10 > default "2" > - depends on NEED_MULTIPLE_NODES > + depends on NUMA > help > Specify the maximum number of NUMA Nodes available on the target > system. Increases memory reserved to accommodate various tables. > diff --git a/arch/s390/Kconfig b/arch/s390/Kconfig > index b4c7c34069f8..707afbcd81c2 100644 > --- a/arch/s390/Kconfig > +++ b/arch/s390/Kconfig > @@ -475,7 +475,7 @@ config NUMA > > config NODES_SHIFT > int > - depends on NEED_MULTIPLE_NODES > + depends on NUMA > default "1" > > config SCHED_SMT > diff --git a/arch/sh/include/asm/mmzone.h b/arch/sh/include/asm/mmzone.h > index 6552a088dc97..7b8dead2723d 100644 > --- a/arch/sh/include/asm/mmzone.h > +++ b/arch/sh/include/asm/mmzone.h > @@ -2,7 +2,7 @@ > #ifndef __ASM_SH_MMZONE_H > #define __ASM_SH_MMZONE_H > > -#ifdef CONFIG_NEED_MULTIPLE_NODES > +#ifdef CONFIG_NUMA > #include > > extern struct pglist_data *node_data[]; > @@ -31,7 +31,7 @@ static inline void > setup_bootmem_node(int nid, unsigned long start, unsigned long end) > { > } > -#endif /* CONFIG_NEED_MULTIPLE_NODES */ > +#endif /* CONFIG_NUMA */ > > /* Platform specific mem init */ > void __init plat_mem_setup(void); > diff --git a/arch/sh/kernel/topology.c b/arch/sh/kernel/topology.c > index 7a989eed3b18..76af6db9daa2 100644 > --- a/arch/sh/kernel/topology.c > +++ b/arch/sh/kernel/topology.c > @@ -46,7 +46,7 @@ static int __init topology_init(void) > { > int i, ret; > > -#ifdef CONFIG_NEED_MULTIPLE_NODES > +#ifdef CONFIG_NUMA > for_each_online_node(i) > register_one_node(i); > #endif > diff --git a/arch/sh/mm/Kconfig b/arch/sh/mm/Kconfig > index d551a9cac41e..ba569cfb4368 100644 > --- a/arch/sh/mm/Kconfig > +++ b/arch/sh/mm/Kconfig > @@ -120,7 +120,7 @@ config NODES_SHIFT > int > default "3" if CPU_SUBTYPE_SHX3 > default "1" > - depends on NEED_MULTIPLE_NODES > + depends on NUMA > > config ARCH_FLATMEM_ENABLE > def_bool y > diff --git a/arch/sh/mm/init.c b/arch/sh/mm/init.c > index 168d7d4dd735..ce26c7f8950a 100644 > --- a/arch/sh/mm/init.c > +++ b/arch/sh/mm/init.c > @@ -211,7 +211,7 @@ void __init allocate_pgdat(unsigned int nid) > > get_pfn_range_for_nid(nid, &start_pfn, &end_pfn); > > -#ifdef CONFIG_NEED_MULTIPLE_NODES > +#ifdef CONFIG_NUMA > NODE_DATA(nid) = memblock_alloc_try_nid( > sizeof(struct pglist_data), > SMP_CACHE_BYTES, MEMBLOCK_LOW_LIMIT, > diff --git a/arch/sparc/Kconfig b/arch/sparc/Kconfig > index 164a5254c91c..c72f52c704cd 100644 > --- a/arch/sparc/Kconfig > +++ b/arch/sparc/Kconfig > @@ -265,7 +265,7 @@ config NODES_SHIFT > int "Maximum NUMA Nodes (as a power of 2)" > range 4 5 if SPARC64 > default "5" > - depends on NEED_MULTIPLE_NODES > + depends on NUMA > help > Specify the maximum number of NUMA Nodes available on the target > system. Increases memory reserved to accommodate various tables. > diff --git a/arch/sparc/include/asm/mmzone.h b/arch/sparc/include/asm/mmzone.h > index 6543fb97a849..a236d8aa893a 100644 > --- a/arch/sparc/include/asm/mmzone.h > +++ b/arch/sparc/include/asm/mmzone.h > @@ -2,7 +2,7 @@ > #ifndef _SPARC64_MMZONE_H > #define _SPARC64_MMZONE_H > > -#ifdef CONFIG_NEED_MULTIPLE_NODES > +#ifdef CONFIG_NUMA > > #include > > @@ -13,6 +13,6 @@ extern struct pglist_data *node_data[]; > extern int numa_cpu_lookup_table[]; > extern cpumask_t numa_cpumask_lookup_table[]; > > -#endif /* CONFIG_NEED_MULTIPLE_NODES */ > +#endif /* CONFIG_NUMA */ > > #endif /* _SPARC64_MMZONE_H */ > diff --git a/arch/sparc/kernel/smp_64.c b/arch/sparc/kernel/smp_64.c > index e38d8bf454e8..c89a5971fb0d 100644 > --- a/arch/sparc/kernel/smp_64.c > +++ b/arch/sparc/kernel/smp_64.c > @@ -1546,7 +1546,7 @@ static void * __init pcpu_alloc_bootmem(unsigned int cpu, size_t size, > size_t align) > { > const unsigned long goal = __pa(MAX_DMA_ADDRESS); > -#ifdef CONFIG_NEED_MULTIPLE_NODES > +#ifdef CONFIG_NUMA > int node = cpu_to_node(cpu); > void *ptr; > > diff --git a/arch/sparc/mm/init_64.c b/arch/sparc/mm/init_64.c > index e454f179cf5d..06e938d03f3b 100644 > --- a/arch/sparc/mm/init_64.c > +++ b/arch/sparc/mm/init_64.c > @@ -903,7 +903,7 @@ struct node_mem_mask { > static struct node_mem_mask node_masks[MAX_NUMNODES]; > static int num_node_masks; > > -#ifdef CONFIG_NEED_MULTIPLE_NODES > +#ifdef CONFIG_NUMA > > struct mdesc_mlgroup { > u64 node; > @@ -1059,7 +1059,7 @@ static void __init allocate_node_data(int nid) > { > struct pglist_data *p; > unsigned long start_pfn, end_pfn; > -#ifdef CONFIG_NEED_MULTIPLE_NODES > +#ifdef CONFIG_NUMA > > NODE_DATA(nid) = memblock_alloc_node(sizeof(struct pglist_data), > SMP_CACHE_BYTES, nid); > @@ -1080,7 +1080,7 @@ static void __init allocate_node_data(int nid) > > static void init_node_masks_nonnuma(void) > { > -#ifdef CONFIG_NEED_MULTIPLE_NODES > +#ifdef CONFIG_NUMA > int i; > #endif > > @@ -1090,7 +1090,7 @@ static void init_node_masks_nonnuma(void) > node_masks[0].match = 0; > num_node_masks = 1; > > -#ifdef CONFIG_NEED_MULTIPLE_NODES > +#ifdef CONFIG_NUMA > for (i = 0; i < NR_CPUS; i++) > numa_cpu_lookup_table[i] = 0; > > @@ -1098,7 +1098,7 @@ static void init_node_masks_nonnuma(void) > #endif > } > > -#ifdef CONFIG_NEED_MULTIPLE_NODES > +#ifdef CONFIG_NUMA > struct pglist_data *node_data[MAX_NUMNODES]; > > EXPORT_SYMBOL(numa_cpu_lookup_table); > @@ -2487,7 +2487,7 @@ int page_in_phys_avail(unsigned long paddr) > > static void __init register_page_bootmem_info(void) > { > -#ifdef CONFIG_NEED_MULTIPLE_NODES > +#ifdef CONFIG_NUMA > int i; > > for_each_online_node(i) > diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig > index 0045e1b44190..5d523ff70fe7 100644 > --- a/arch/x86/Kconfig > +++ b/arch/x86/Kconfig > @@ -1597,7 +1597,7 @@ config NODES_SHIFT > default "10" if MAXSMP > default "6" if X86_64 > default "3" > - depends on NEED_MULTIPLE_NODES > + depends on NUMA > help > Specify the maximum number of NUMA Nodes available on the target > system. Increases memory reserved to accommodate various tables. > diff --git a/arch/x86/kernel/setup_percpu.c b/arch/x86/kernel/setup_percpu.c > index 0941d2f44f2a..78a32b956e81 100644 > --- a/arch/x86/kernel/setup_percpu.c > +++ b/arch/x86/kernel/setup_percpu.c > @@ -66,7 +66,7 @@ EXPORT_SYMBOL(__per_cpu_offset); > */ > static bool __init pcpu_need_numa(void) > { > -#ifdef CONFIG_NEED_MULTIPLE_NODES > +#ifdef CONFIG_NUMA > pg_data_t *last = NULL; > unsigned int cpu; > > @@ -101,7 +101,7 @@ static void * __init pcpu_alloc_bootmem(unsigned int cpu, unsigned long size, > unsigned long align) > { > const unsigned long goal = __pa(MAX_DMA_ADDRESS); > -#ifdef CONFIG_NEED_MULTIPLE_NODES > +#ifdef CONFIG_NUMA > int node = early_cpu_to_node(cpu); > void *ptr; > > @@ -140,7 +140,7 @@ static void __init pcpu_fc_free(void *ptr, size_t size) > > static int __init pcpu_cpu_distance(unsigned int from, unsigned int to) > { > -#ifdef CONFIG_NEED_MULTIPLE_NODES > +#ifdef CONFIG_NUMA > if (early_cpu_to_node(from) == early_cpu_to_node(to)) > return LOCAL_DISTANCE; > else > diff --git a/arch/x86/mm/init_32.c b/arch/x86/mm/init_32.c > index 21ffb03f6c72..74b78840182d 100644 > --- a/arch/x86/mm/init_32.c > +++ b/arch/x86/mm/init_32.c > @@ -651,7 +651,7 @@ void __init find_low_pfn_range(void) > highmem_pfn_init(); > } > > -#ifndef CONFIG_NEED_MULTIPLE_NODES > +#ifndef CONFIG_NUMA > void __init initmem_init(void) > { > #ifdef CONFIG_HIGHMEM > @@ -677,7 +677,7 @@ void __init initmem_init(void) > > setup_bootmem_allocator(); > } > -#endif /* !CONFIG_NEED_MULTIPLE_NODES */ > +#endif /* !CONFIG_NUMA */ > > void __init setup_bootmem_allocator(void) > { > diff --git a/include/asm-generic/topology.h b/include/asm-generic/topology.h > index 5aa8705df87e..4dbe715be65b 100644 > --- a/include/asm-generic/topology.h > +++ b/include/asm-generic/topology.h > @@ -45,7 +45,7 @@ > #endif > > #ifndef cpumask_of_node > - #ifdef CONFIG_NEED_MULTIPLE_NODES > + #ifdef CONFIG_NUMA > #define cpumask_of_node(node) ((node) == 0 ? cpu_online_mask : cpu_none_mask) > #else > #define cpumask_of_node(node) ((void)(node), cpu_online_mask) > diff --git a/include/linux/memblock.h b/include/linux/memblock.h > index 5984fff3f175..552309342c38 100644 > --- a/include/linux/memblock.h > +++ b/include/linux/memblock.h > @@ -50,7 +50,7 @@ struct memblock_region { > phys_addr_t base; > phys_addr_t size; > enum memblock_flags flags; > -#ifdef CONFIG_NEED_MULTIPLE_NODES > +#ifdef CONFIG_NUMA > int nid; > #endif > }; > @@ -347,7 +347,7 @@ int __init deferred_page_init_max_threads(const struct cpumask *node_cpumask); > int memblock_set_node(phys_addr_t base, phys_addr_t size, > struct memblock_type *type, int nid); > > -#ifdef CONFIG_NEED_MULTIPLE_NODES > +#ifdef CONFIG_NUMA > static inline void memblock_set_region_node(struct memblock_region *r, int nid) > { > r->nid = nid; > @@ -366,7 +366,7 @@ static inline int memblock_get_region_node(const struct memblock_region *r) > { > return 0; > } > -#endif /* CONFIG_NEED_MULTIPLE_NODES */ > +#endif /* CONFIG_NUMA */ > > /* Flags for memblock allocation APIs */ > #define MEMBLOCK_ALLOC_ANYWHERE (~(phys_addr_t)0) > diff --git a/include/linux/mm.h b/include/linux/mm.h > index c274f75efcf9..cf66f0ea7956 100644 > --- a/include/linux/mm.h > +++ b/include/linux/mm.h > @@ -46,7 +46,7 @@ extern int sysctl_page_lock_unfairness; > > void init_mm_internals(void); > > -#ifndef CONFIG_NEED_MULTIPLE_NODES /* Don't use mapnrs, do it properly */ > +#ifndef CONFIG_NUMA /* Don't use mapnrs, do it properly */ > extern unsigned long max_mapnr; > > static inline void set_max_mapnr(unsigned long limit) > @@ -2457,7 +2457,7 @@ extern void get_pfn_range_for_nid(unsigned int nid, > unsigned long *start_pfn, unsigned long *end_pfn); > extern unsigned long find_min_pfn_with_active_regions(void); > > -#ifndef CONFIG_NEED_MULTIPLE_NODES > +#ifndef CONFIG_NUMA > static inline int early_pfn_to_nid(unsigned long pfn) > { > return 0; > diff --git a/include/linux/mmzone.h b/include/linux/mmzone.h > index 2b41e252a995..ad42f440c704 100644 > --- a/include/linux/mmzone.h > +++ b/include/linux/mmzone.h > @@ -985,7 +985,7 @@ extern int movable_zone; > #ifdef CONFIG_HIGHMEM > static inline int zone_movable_is_highmem(void) > { > -#ifdef CONFIG_NEED_MULTIPLE_NODES > +#ifdef CONFIG_NUMA > return movable_zone == ZONE_HIGHMEM; > #else > return (ZONE_MOVABLE - 1) == ZONE_HIGHMEM; > @@ -1041,17 +1041,17 @@ extern int percpu_pagelist_fraction; > extern char numa_zonelist_order[]; > #define NUMA_ZONELIST_ORDER_LEN 16 > > -#ifndef CONFIG_NEED_MULTIPLE_NODES > +#ifndef CONFIG_NUMA > > extern struct pglist_data contig_page_data; > #define NODE_DATA(nid) (&contig_page_data) > #define NODE_MEM_MAP(nid) mem_map > > -#else /* CONFIG_NEED_MULTIPLE_NODES */ > +#else /* CONFIG_NUMA */ > > #include > > -#endif /* !CONFIG_NEED_MULTIPLE_NODES */ > +#endif /* !CONFIG_NUMA */ > > extern struct pglist_data *first_online_pgdat(void); > extern struct pglist_data *next_online_pgdat(struct pglist_data *pgdat); > diff --git a/kernel/crash_core.c b/kernel/crash_core.c > index 825284baaf46..53eb8bc6026d 100644 > --- a/kernel/crash_core.c > +++ b/kernel/crash_core.c > @@ -455,7 +455,7 @@ static int __init crash_save_vmcoreinfo_init(void) > VMCOREINFO_SYMBOL(_stext); > VMCOREINFO_SYMBOL(vmap_area_list); > > -#ifndef CONFIG_NEED_MULTIPLE_NODES > +#ifndef CONFIG_NUMA > VMCOREINFO_SYMBOL(mem_map); > VMCOREINFO_SYMBOL(contig_page_data); > #endif > diff --git a/mm/Kconfig b/mm/Kconfig > index 218b96ccc84a..bffe4bd859f3 100644 > --- a/mm/Kconfig > +++ b/mm/Kconfig > @@ -59,15 +59,6 @@ config FLAT_NODE_MEM_MAP > def_bool y > depends on !SPARSEMEM > > -# > -# Both the NUMA code and DISCONTIGMEM use arrays of pg_data_t's > -# to represent different areas of memory. This variable allows > -# those dependencies to exist individually. > -# > -config NEED_MULTIPLE_NODES > - def_bool y > - depends on NUMA > - > # > # SPARSEMEM_EXTREME (which is the default) does some bootmem > # allocations when sparse_init() is called. If this cannot > diff --git a/mm/memblock.c b/mm/memblock.c > index afaefa8fc6ab..123feef5259d 100644 > --- a/mm/memblock.c > +++ b/mm/memblock.c > @@ -92,7 +92,7 @@ > * system initialization completes. > */ > > -#ifndef CONFIG_NEED_MULTIPLE_NODES > +#ifndef CONFIG_NUMA > struct pglist_data __refdata contig_page_data; > EXPORT_SYMBOL(contig_page_data); > #endif > @@ -607,7 +607,7 @@ static int __init_memblock memblock_add_range(struct memblock_type *type, > * area, insert that portion. > */ > if (rbase > base) { > -#ifdef CONFIG_NEED_MULTIPLE_NODES > +#ifdef CONFIG_NUMA > WARN_ON(nid != memblock_get_region_node(rgn)); > #endif > WARN_ON(flags != rgn->flags); > @@ -1205,7 +1205,7 @@ void __init_memblock __next_mem_pfn_range(int *idx, int nid, > int __init_memblock memblock_set_node(phys_addr_t base, phys_addr_t size, > struct memblock_type *type, int nid) > { > -#ifdef CONFIG_NEED_MULTIPLE_NODES > +#ifdef CONFIG_NUMA > int start_rgn, end_rgn; > int i, ret; > > @@ -1849,7 +1849,7 @@ static void __init_memblock memblock_dump(struct memblock_type *type) > size = rgn->size; > end = base + size - 1; > flags = rgn->flags; > -#ifdef CONFIG_NEED_MULTIPLE_NODES > +#ifdef CONFIG_NUMA > if (memblock_get_region_node(rgn) != MAX_NUMNODES) > snprintf(nid_buf, sizeof(nid_buf), " on node %d", > memblock_get_region_node(rgn)); > diff --git a/mm/page_alloc.c b/mm/page_alloc.c > index 6fc22482eaa8..8f08135d3eb4 100644 > --- a/mm/page_alloc.c > +++ b/mm/page_alloc.c > @@ -1596,7 +1596,7 @@ void __free_pages_core(struct page *page, unsigned int order) > __free_pages_ok(page, order, FPI_TO_TAIL | FPI_SKIP_KASAN_POISON); > } > > -#ifdef CONFIG_NEED_MULTIPLE_NODES > +#ifdef CONFIG_NUMA > > /* > * During memory init memblocks map pfns to nids. The search is expensive and > @@ -1646,7 +1646,7 @@ int __meminit early_pfn_to_nid(unsigned long pfn) > > return nid; > } > -#endif /* CONFIG_NEED_MULTIPLE_NODES */ > +#endif /* CONFIG_NUMA */ > > void __init memblock_free_pages(struct page *page, unsigned long pfn, > unsigned int order) > @@ -7276,7 +7276,7 @@ static void __ref alloc_node_mem_map(struct pglist_data *pgdat) > pr_debug("%s: node %d, pgdat %08lx, node_mem_map %08lx\n", > __func__, pgdat->node_id, (unsigned long)pgdat, > (unsigned long)pgdat->node_mem_map); > -#ifndef CONFIG_NEED_MULTIPLE_NODES > +#ifndef CONFIG_NUMA > /* > * With no DISCONTIG, the global mem_map is just set as node 0's > */ > Nice Acked-by: David Hildenbrand -- Thanks, David / dhildenb _______________________________________________ linux-snps-arc mailing list linux-snps-arc@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-snps-arc From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-15.5 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS, USER_AGENT_SANE_1 autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 3D615C48BCF for ; Wed, 9 Jun 2021 11:02:36 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id EE03A6136D for ; Wed, 9 Jun 2021 11:02:35 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org EE03A6136D Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:Content-Type: Content-Transfer-Encoding:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:Date:Message-ID:From: References:Cc:To:Subject:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=be/U6EAjtAm2RmSdF3pMhkjDPfiNA5V3fiOTSo9si64=; b=KC/l0mToevKzyjF7mDDqQm8XGU iK3HIvLYVMV01Fzn7fE/F6ke/TSGjk8NWCzReDjrueRQc81JhB/THFO39DcMqwOzNqN4LxuDUCJhf bUoBkGxY0CscsllLZaxNn28snP2I45QGKbupC93YU7n2iW/7U+Q2I2LJp0IL71bmyj6xsdW299dyj 87u8T1L/KLdRtQSgDtFs/Bvae4gbi3H5w/VUETNArFPMRuzSfHpT7k/oKo5xX0Lm1gFqcII/CfWXZ hsnjXi7mZgLfOAavlCbwI0LMktjyHnDNqRsvFWv5bdylUBYPdW7qDfHxzUbqOQTGsHhtAZDoRmv93 pByMQqxg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1lqvwR-00DCxj-Pb; Wed, 09 Jun 2021 11:00:12 +0000 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1lqvtR-00DBYe-Ia for linux-arm-kernel@lists.infradead.org; Wed, 09 Jun 2021 10:57:12 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1623236224; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=1FvxnKPfDfM/0QN9kSJy74v8JuVnkBg3G7v6vsc/x3c=; b=FPxTLNVK8/iumttqXzLWn8TpyEfDS9xkPcKf+6gj2Xx+FvHA+p2jZZ0g0A0d1YhpCbLE63 8f3k6jPTGgQDt3nsdUsGruH2zsTH6J8WC9znem3SRW+OQftqnN5BlvL+IIrAgnxnDyjqSz chi/LnO0lYW9gVQFcAOOGHcMjngCsjY= Received: from mail-wm1-f72.google.com (mail-wm1-f72.google.com [209.85.128.72]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-490-RDoyCO_RO5COUcxdFU45Mw-1; Wed, 09 Jun 2021 06:57:03 -0400 X-MC-Unique: RDoyCO_RO5COUcxdFU45Mw-1 Received: by mail-wm1-f72.google.com with SMTP id z25-20020a1c4c190000b029019f15b0657dso1790138wmf.8 for ; Wed, 09 Jun 2021 03:57:02 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:organization :message-id:date:user-agent:mime-version:in-reply-to :content-language:content-transfer-encoding; bh=1FvxnKPfDfM/0QN9kSJy74v8JuVnkBg3G7v6vsc/x3c=; b=pPYuzssOWy5XCtOkrkT5/w9ZnMu6pWfiQoMzZEDduAIjvD/Ey5VHy3eXmzYfIpb3Z2 7j4IczV4Gs4kcCCQyf6abNRFo8Py3GvlOA1g7e4Ba6tOwiuhulPHsAux0lcngI70AYou mRQQ5AyOQF6Loksl2lR1v61GfpYPCYWMhnAOFg7JmaPvUaTpZfzpomPgei3hTdgSv4q0 omBchPx4iIdbibJdCMFhidMIq3Q47IZe3a7RFihXv2MH5oCPBZk0rJwMuOL4sFtXSTQ7 OjJ2AGIky59d1XEOaYTQnZb3YDJTg0Md5+WZlMAL2s/HgO58R+rJG/jDYAPIRjn5oSO3 SXkw== X-Gm-Message-State: AOAM532sjcw6jXlpGlxGREnaV1ksu9CR9/atBHCoGumhWvcORsjiRAiz G5U4VA8LG8jQl0EmMWvrH9mf8BN/uGVXLqG401ab/7RMwH2l+77J0tY4BJedrGuI+Sqy6hIShF6 iHd0oVgSx+1KO9ilYr6uVlta797LaC0e6wFE= X-Received: by 2002:a05:600c:2dcf:: with SMTP id e15mr9108523wmh.117.1623236221435; Wed, 09 Jun 2021 03:57:01 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxxia50/pFxZeButMmgu0RohZ0cO/Gta91kBLXzoklWxVlFQkUp1XOrMMoz2YOn8nWExEedrA== X-Received: by 2002:a05:600c:2dcf:: with SMTP id e15mr9108479wmh.117.1623236220976; Wed, 09 Jun 2021 03:57:00 -0700 (PDT) Received: from [192.168.3.132] (p5b0c611d.dip0.t-ipconnect.de. [91.12.97.29]) by smtp.gmail.com with ESMTPSA id c64sm6250834wma.15.2021.06.09.03.56.59 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 09 Jun 2021 03:57:00 -0700 (PDT) Subject: Re: [PATCH 8/9] mm: replace CONFIG_NEED_MULTIPLE_NODES with CONFIG_NUMA To: Mike Rapoport , Andrew Morton Cc: Arnd Bergmann , Geert Uytterhoeven , Ivan Kokshaysky , Jonathan Corbet , Matt Turner , Mike Rapoport , Richard Henderson , Vineet Gupta , kexec@lists.infradead.org, linux-alpha@vger.kernel.org, linux-arch@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-doc@vger.kernel.org, linux-ia64@vger.kernel.org, linux-kernel@vger.kernel.org, linux-m68k@lists.linux-m68k.org, linux-mips@vger.kernel.org, linux-mm@kvack.org, linux-riscv@lists.infradead.org, linux-s390@vger.kernel.org, linux-sh@vger.kernel.org, linux-snps-arc@lists.infradead.org, linux-xtensa@linux-xtensa.org, linuxppc-dev@lists.ozlabs.org, sparclinux@vger.kernel.org References: <20210602105348.13387-1-rppt@kernel.org> <20210602105348.13387-9-rppt@kernel.org> From: David Hildenbrand Organization: Red Hat Message-ID: <450360f3-0d8d-651d-9f8b-ce6f13a881c4@redhat.com> Date: Wed, 9 Jun 2021 12:56:59 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.10.1 MIME-Version: 1.0 In-Reply-To: <20210602105348.13387-9-rppt@kernel.org> Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=david@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Language: en-US X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210609_035705_846499_8174B3DF X-CRM114-Status: GOOD ( 29.87 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii"; Format="flowed" Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On 02.06.21 12:53, Mike Rapoport wrote: > From: Mike Rapoport > > After removal of DISCINTIGMEM the NEED_MULTIPLE_NODES and NUMA > configuration options are equivalent. > > Drop CONFIG_NEED_MULTIPLE_NODES and use CONFIG_NUMA instead. > > Done with > > $ sed -i 's/CONFIG_NEED_MULTIPLE_NODES/CONFIG_NUMA/' \ > $(git grep -wl CONFIG_NEED_MULTIPLE_NODES) > $ sed -i 's/NEED_MULTIPLE_NODES/NUMA/' \ > $(git grep -wl NEED_MULTIPLE_NODES) > > with manual tweaks afterwards. > > Signed-off-by: Mike Rapoport > --- > arch/arm64/Kconfig | 2 +- > arch/ia64/Kconfig | 2 +- > arch/mips/Kconfig | 2 +- > arch/mips/include/asm/mmzone.h | 2 +- > arch/mips/include/asm/page.h | 2 +- > arch/mips/mm/init.c | 4 ++-- > arch/powerpc/Kconfig | 2 +- > arch/powerpc/include/asm/mmzone.h | 4 ++-- > arch/powerpc/kernel/setup_64.c | 2 +- > arch/powerpc/kernel/smp.c | 2 +- > arch/powerpc/kexec/core.c | 4 ++-- > arch/powerpc/mm/Makefile | 2 +- > arch/powerpc/mm/mem.c | 4 ++-- > arch/riscv/Kconfig | 2 +- > arch/s390/Kconfig | 2 +- > arch/sh/include/asm/mmzone.h | 4 ++-- > arch/sh/kernel/topology.c | 2 +- > arch/sh/mm/Kconfig | 2 +- > arch/sh/mm/init.c | 2 +- > arch/sparc/Kconfig | 2 +- > arch/sparc/include/asm/mmzone.h | 4 ++-- > arch/sparc/kernel/smp_64.c | 2 +- > arch/sparc/mm/init_64.c | 12 ++++++------ > arch/x86/Kconfig | 2 +- > arch/x86/kernel/setup_percpu.c | 6 +++--- > arch/x86/mm/init_32.c | 4 ++-- > include/asm-generic/topology.h | 2 +- > include/linux/memblock.h | 6 +++--- > include/linux/mm.h | 4 ++-- > include/linux/mmzone.h | 8 ++++---- > kernel/crash_core.c | 2 +- > mm/Kconfig | 9 --------- > mm/memblock.c | 8 ++++---- > mm/page_alloc.c | 6 +++--- > 34 files changed, 58 insertions(+), 67 deletions(-) > > diff --git a/arch/arm64/Kconfig b/arch/arm64/Kconfig > index 9f1d8566bbf9..d01a1545ab8f 100644 > --- a/arch/arm64/Kconfig > +++ b/arch/arm64/Kconfig > @@ -1035,7 +1035,7 @@ config NODES_SHIFT > int "Maximum NUMA Nodes (as a power of 2)" > range 1 10 > default "4" > - depends on NEED_MULTIPLE_NODES > + depends on NUMA > help > Specify the maximum number of NUMA Nodes available on the target > system. Increases memory reserved to accommodate various tables. > diff --git a/arch/ia64/Kconfig b/arch/ia64/Kconfig > index 279252e3e0f7..da22a35e6f03 100644 > --- a/arch/ia64/Kconfig > +++ b/arch/ia64/Kconfig > @@ -302,7 +302,7 @@ config NODES_SHIFT > int "Max num nodes shift(3-10)" > range 3 10 > default "10" > - depends on NEED_MULTIPLE_NODES > + depends on NUMA > help > This option specifies the maximum number of nodes in your SSI system. > MAX_NUMNODES will be 2^(This value). > diff --git a/arch/mips/Kconfig b/arch/mips/Kconfig > index ed51970c08e7..4704a16c2e44 100644 > --- a/arch/mips/Kconfig > +++ b/arch/mips/Kconfig > @@ -2867,7 +2867,7 @@ config RANDOMIZE_BASE_MAX_OFFSET > config NODES_SHIFT > int > default "6" > - depends on NEED_MULTIPLE_NODES > + depends on NUMA > > config HW_PERF_EVENTS > bool "Enable hardware performance counter support for perf events" > diff --git a/arch/mips/include/asm/mmzone.h b/arch/mips/include/asm/mmzone.h > index 7649ab45e80c..602a21aee9d4 100644 > --- a/arch/mips/include/asm/mmzone.h > +++ b/arch/mips/include/asm/mmzone.h > @@ -8,7 +8,7 @@ > > #include > > -#ifdef CONFIG_NEED_MULTIPLE_NODES > +#ifdef CONFIG_NUMA > # include > #endif > > diff --git a/arch/mips/include/asm/page.h b/arch/mips/include/asm/page.h > index 195ff4e9771f..96bc798c1ec1 100644 > --- a/arch/mips/include/asm/page.h > +++ b/arch/mips/include/asm/page.h > @@ -239,7 +239,7 @@ static inline int pfn_valid(unsigned long pfn) > > /* pfn_valid is defined in linux/mmzone.h */ > > -#elif defined(CONFIG_NEED_MULTIPLE_NODES) > +#elif defined(CONFIG_NUMA) > > #define pfn_valid(pfn) \ > ({ \ > diff --git a/arch/mips/mm/init.c b/arch/mips/mm/init.c > index 97f6ca341448..19347dc6bbf8 100644 > --- a/arch/mips/mm/init.c > +++ b/arch/mips/mm/init.c > @@ -394,7 +394,7 @@ void maar_init(void) > } > } > > -#ifndef CONFIG_NEED_MULTIPLE_NODES > +#ifndef CONFIG_NUMA > void __init paging_init(void) > { > unsigned long max_zone_pfns[MAX_NR_ZONES]; > @@ -473,7 +473,7 @@ void __init mem_init(void) > 0x80000000 - 4, KCORE_TEXT); > #endif > } > -#endif /* !CONFIG_NEED_MULTIPLE_NODES */ > +#endif /* !CONFIG_NUMA */ > > void free_init_pages(const char *what, unsigned long begin, unsigned long end) > { > diff --git a/arch/powerpc/Kconfig b/arch/powerpc/Kconfig > index 088dd2afcfe4..14b132cf95e2 100644 > --- a/arch/powerpc/Kconfig > +++ b/arch/powerpc/Kconfig > @@ -671,7 +671,7 @@ config NODES_SHIFT > int > default "8" if PPC64 > default "4" > - depends on NEED_MULTIPLE_NODES > + depends on NUMA > > config USE_PERCPU_NUMA_NODE_ID > def_bool y > diff --git a/arch/powerpc/include/asm/mmzone.h b/arch/powerpc/include/asm/mmzone.h > index 6cda76b57c5d..4c6c6dbd182f 100644 > --- a/arch/powerpc/include/asm/mmzone.h > +++ b/arch/powerpc/include/asm/mmzone.h > @@ -18,7 +18,7 @@ > * flags field of the struct page > */ > > -#ifdef CONFIG_NEED_MULTIPLE_NODES > +#ifdef CONFIG_NUMA > > extern struct pglist_data *node_data[]; > /* > @@ -41,7 +41,7 @@ u64 memory_hotplug_max(void); > > #else > #define memory_hotplug_max() memblock_end_of_DRAM() > -#endif /* CONFIG_NEED_MULTIPLE_NODES */ > +#endif /* CONFIG_NUMA */ > #ifdef CONFIG_FA_DUMP > #define __HAVE_ARCH_RESERVED_KERNEL_PAGES > #endif > diff --git a/arch/powerpc/kernel/setup_64.c b/arch/powerpc/kernel/setup_64.c > index e42b85e4f1aa..a35fbf4d0bce 100644 > --- a/arch/powerpc/kernel/setup_64.c > +++ b/arch/powerpc/kernel/setup_64.c > @@ -788,7 +788,7 @@ static void * __init pcpu_alloc_bootmem(unsigned int cpu, size_t size, > size_t align) > { > const unsigned long goal = __pa(MAX_DMA_ADDRESS); > -#ifdef CONFIG_NEED_MULTIPLE_NODES > +#ifdef CONFIG_NUMA > int node = early_cpu_to_node(cpu); > void *ptr; > > diff --git a/arch/powerpc/kernel/smp.c b/arch/powerpc/kernel/smp.c > index 2e05c783440a..a5209ea3859e 100644 > --- a/arch/powerpc/kernel/smp.c > +++ b/arch/powerpc/kernel/smp.c > @@ -1047,7 +1047,7 @@ void __init smp_prepare_cpus(unsigned int max_cpus) > zalloc_cpumask_var_node(&per_cpu(cpu_coregroup_map, cpu), > GFP_KERNEL, cpu_to_node(cpu)); > > -#ifdef CONFIG_NEED_MULTIPLE_NODES > +#ifdef CONFIG_NUMA > /* > * numa_node_id() works after this. > */ > diff --git a/arch/powerpc/kexec/core.c b/arch/powerpc/kexec/core.c > index 56da5eb2b923..48525e8b5730 100644 > --- a/arch/powerpc/kexec/core.c > +++ b/arch/powerpc/kexec/core.c > @@ -68,11 +68,11 @@ void machine_kexec_cleanup(struct kimage *image) > void arch_crash_save_vmcoreinfo(void) > { > > -#ifdef CONFIG_NEED_MULTIPLE_NODES > +#ifdef CONFIG_NUMA > VMCOREINFO_SYMBOL(node_data); > VMCOREINFO_LENGTH(node_data, MAX_NUMNODES); > #endif > -#ifndef CONFIG_NEED_MULTIPLE_NODES > +#ifndef CONFIG_NUMA > VMCOREINFO_SYMBOL(contig_page_data); > #endif > #if defined(CONFIG_PPC64) && defined(CONFIG_SPARSEMEM_VMEMMAP) > diff --git a/arch/powerpc/mm/Makefile b/arch/powerpc/mm/Makefile > index c3df3a8501d4..2ffcf540f08b 100644 > --- a/arch/powerpc/mm/Makefile > +++ b/arch/powerpc/mm/Makefile > @@ -13,7 +13,7 @@ obj-y := fault.o mem.o pgtable.o mmap.o maccess.o \ > obj-$(CONFIG_PPC_MMU_NOHASH) += nohash/ > obj-$(CONFIG_PPC_BOOK3S_32) += book3s32/ > obj-$(CONFIG_PPC_BOOK3S_64) += book3s64/ > -obj-$(CONFIG_NEED_MULTIPLE_NODES) += numa.o > +obj-$(CONFIG_NUMA) += numa.o > obj-$(CONFIG_PPC_MM_SLICES) += slice.o > obj-$(CONFIG_HUGETLB_PAGE) += hugetlbpage.o > obj-$(CONFIG_NOT_COHERENT_CACHE) += dma-noncoherent.o > diff --git a/arch/powerpc/mm/mem.c b/arch/powerpc/mm/mem.c > index 043bbeaf407c..7a266991315f 100644 > --- a/arch/powerpc/mm/mem.c > +++ b/arch/powerpc/mm/mem.c > @@ -126,7 +126,7 @@ void __ref arch_remove_memory(int nid, u64 start, u64 size, > } > #endif > > -#ifndef CONFIG_NEED_MULTIPLE_NODES > +#ifndef CONFIG_NUMA > void __init mem_topology_setup(void) > { > max_low_pfn = max_pfn = memblock_end_of_DRAM() >> PAGE_SHIFT; > @@ -161,7 +161,7 @@ static int __init mark_nonram_nosave(void) > > return 0; > } > -#else /* CONFIG_NEED_MULTIPLE_NODES */ > +#else /* CONFIG_NUMA */ > static int __init mark_nonram_nosave(void) > { > return 0; > diff --git a/arch/riscv/Kconfig b/arch/riscv/Kconfig > index a8ad8eb76120..e985dbf9ff27 100644 > --- a/arch/riscv/Kconfig > +++ b/arch/riscv/Kconfig > @@ -331,7 +331,7 @@ config NODES_SHIFT > int "Maximum NUMA Nodes (as a power of 2)" > range 1 10 > default "2" > - depends on NEED_MULTIPLE_NODES > + depends on NUMA > help > Specify the maximum number of NUMA Nodes available on the target > system. Increases memory reserved to accommodate various tables. > diff --git a/arch/s390/Kconfig b/arch/s390/Kconfig > index b4c7c34069f8..707afbcd81c2 100644 > --- a/arch/s390/Kconfig > +++ b/arch/s390/Kconfig > @@ -475,7 +475,7 @@ config NUMA > > config NODES_SHIFT > int > - depends on NEED_MULTIPLE_NODES > + depends on NUMA > default "1" > > config SCHED_SMT > diff --git a/arch/sh/include/asm/mmzone.h b/arch/sh/include/asm/mmzone.h > index 6552a088dc97..7b8dead2723d 100644 > --- a/arch/sh/include/asm/mmzone.h > +++ b/arch/sh/include/asm/mmzone.h > @@ -2,7 +2,7 @@ > #ifndef __ASM_SH_MMZONE_H > #define __ASM_SH_MMZONE_H > > -#ifdef CONFIG_NEED_MULTIPLE_NODES > +#ifdef CONFIG_NUMA > #include > > extern struct pglist_data *node_data[]; > @@ -31,7 +31,7 @@ static inline void > setup_bootmem_node(int nid, unsigned long start, unsigned long end) > { > } > -#endif /* CONFIG_NEED_MULTIPLE_NODES */ > +#endif /* CONFIG_NUMA */ > > /* Platform specific mem init */ > void __init plat_mem_setup(void); > diff --git a/arch/sh/kernel/topology.c b/arch/sh/kernel/topology.c > index 7a989eed3b18..76af6db9daa2 100644 > --- a/arch/sh/kernel/topology.c > +++ b/arch/sh/kernel/topology.c > @@ -46,7 +46,7 @@ static int __init topology_init(void) > { > int i, ret; > > -#ifdef CONFIG_NEED_MULTIPLE_NODES > +#ifdef CONFIG_NUMA > for_each_online_node(i) > register_one_node(i); > #endif > diff --git a/arch/sh/mm/Kconfig b/arch/sh/mm/Kconfig > index d551a9cac41e..ba569cfb4368 100644 > --- a/arch/sh/mm/Kconfig > +++ b/arch/sh/mm/Kconfig > @@ -120,7 +120,7 @@ config NODES_SHIFT > int > default "3" if CPU_SUBTYPE_SHX3 > default "1" > - depends on NEED_MULTIPLE_NODES > + depends on NUMA > > config ARCH_FLATMEM_ENABLE > def_bool y > diff --git a/arch/sh/mm/init.c b/arch/sh/mm/init.c > index 168d7d4dd735..ce26c7f8950a 100644 > --- a/arch/sh/mm/init.c > +++ b/arch/sh/mm/init.c > @@ -211,7 +211,7 @@ void __init allocate_pgdat(unsigned int nid) > > get_pfn_range_for_nid(nid, &start_pfn, &end_pfn); > > -#ifdef CONFIG_NEED_MULTIPLE_NODES > +#ifdef CONFIG_NUMA > NODE_DATA(nid) = memblock_alloc_try_nid( > sizeof(struct pglist_data), > SMP_CACHE_BYTES, MEMBLOCK_LOW_LIMIT, > diff --git a/arch/sparc/Kconfig b/arch/sparc/Kconfig > index 164a5254c91c..c72f52c704cd 100644 > --- a/arch/sparc/Kconfig > +++ b/arch/sparc/Kconfig > @@ -265,7 +265,7 @@ config NODES_SHIFT > int "Maximum NUMA Nodes (as a power of 2)" > range 4 5 if SPARC64 > default "5" > - depends on NEED_MULTIPLE_NODES > + depends on NUMA > help > Specify the maximum number of NUMA Nodes available on the target > system. Increases memory reserved to accommodate various tables. > diff --git a/arch/sparc/include/asm/mmzone.h b/arch/sparc/include/asm/mmzone.h > index 6543fb97a849..a236d8aa893a 100644 > --- a/arch/sparc/include/asm/mmzone.h > +++ b/arch/sparc/include/asm/mmzone.h > @@ -2,7 +2,7 @@ > #ifndef _SPARC64_MMZONE_H > #define _SPARC64_MMZONE_H > > -#ifdef CONFIG_NEED_MULTIPLE_NODES > +#ifdef CONFIG_NUMA > > #include > > @@ -13,6 +13,6 @@ extern struct pglist_data *node_data[]; > extern int numa_cpu_lookup_table[]; > extern cpumask_t numa_cpumask_lookup_table[]; > > -#endif /* CONFIG_NEED_MULTIPLE_NODES */ > +#endif /* CONFIG_NUMA */ > > #endif /* _SPARC64_MMZONE_H */ > diff --git a/arch/sparc/kernel/smp_64.c b/arch/sparc/kernel/smp_64.c > index e38d8bf454e8..c89a5971fb0d 100644 > --- a/arch/sparc/kernel/smp_64.c > +++ b/arch/sparc/kernel/smp_64.c > @@ -1546,7 +1546,7 @@ static void * __init pcpu_alloc_bootmem(unsigned int cpu, size_t size, > size_t align) > { > const unsigned long goal = __pa(MAX_DMA_ADDRESS); > -#ifdef CONFIG_NEED_MULTIPLE_NODES > +#ifdef CONFIG_NUMA > int node = cpu_to_node(cpu); > void *ptr; > > diff --git a/arch/sparc/mm/init_64.c b/arch/sparc/mm/init_64.c > index e454f179cf5d..06e938d03f3b 100644 > --- a/arch/sparc/mm/init_64.c > +++ b/arch/sparc/mm/init_64.c > @@ -903,7 +903,7 @@ struct node_mem_mask { > static struct node_mem_mask node_masks[MAX_NUMNODES]; > static int num_node_masks; > > -#ifdef CONFIG_NEED_MULTIPLE_NODES > +#ifdef CONFIG_NUMA > > struct mdesc_mlgroup { > u64 node; > @@ -1059,7 +1059,7 @@ static void __init allocate_node_data(int nid) > { > struct pglist_data *p; > unsigned long start_pfn, end_pfn; > -#ifdef CONFIG_NEED_MULTIPLE_NODES > +#ifdef CONFIG_NUMA > > NODE_DATA(nid) = memblock_alloc_node(sizeof(struct pglist_data), > SMP_CACHE_BYTES, nid); > @@ -1080,7 +1080,7 @@ static void __init allocate_node_data(int nid) > > static void init_node_masks_nonnuma(void) > { > -#ifdef CONFIG_NEED_MULTIPLE_NODES > +#ifdef CONFIG_NUMA > int i; > #endif > > @@ -1090,7 +1090,7 @@ static void init_node_masks_nonnuma(void) > node_masks[0].match = 0; > num_node_masks = 1; > > -#ifdef CONFIG_NEED_MULTIPLE_NODES > +#ifdef CONFIG_NUMA > for (i = 0; i < NR_CPUS; i++) > numa_cpu_lookup_table[i] = 0; > > @@ -1098,7 +1098,7 @@ static void init_node_masks_nonnuma(void) > #endif > } > > -#ifdef CONFIG_NEED_MULTIPLE_NODES > +#ifdef CONFIG_NUMA > struct pglist_data *node_data[MAX_NUMNODES]; > > EXPORT_SYMBOL(numa_cpu_lookup_table); > @@ -2487,7 +2487,7 @@ int page_in_phys_avail(unsigned long paddr) > > static void __init register_page_bootmem_info(void) > { > -#ifdef CONFIG_NEED_MULTIPLE_NODES > +#ifdef CONFIG_NUMA > int i; > > for_each_online_node(i) > diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig > index 0045e1b44190..5d523ff70fe7 100644 > --- a/arch/x86/Kconfig > +++ b/arch/x86/Kconfig > @@ -1597,7 +1597,7 @@ config NODES_SHIFT > default "10" if MAXSMP > default "6" if X86_64 > default "3" > - depends on NEED_MULTIPLE_NODES > + depends on NUMA > help > Specify the maximum number of NUMA Nodes available on the target > system. Increases memory reserved to accommodate various tables. > diff --git a/arch/x86/kernel/setup_percpu.c b/arch/x86/kernel/setup_percpu.c > index 0941d2f44f2a..78a32b956e81 100644 > --- a/arch/x86/kernel/setup_percpu.c > +++ b/arch/x86/kernel/setup_percpu.c > @@ -66,7 +66,7 @@ EXPORT_SYMBOL(__per_cpu_offset); > */ > static bool __init pcpu_need_numa(void) > { > -#ifdef CONFIG_NEED_MULTIPLE_NODES > +#ifdef CONFIG_NUMA > pg_data_t *last = NULL; > unsigned int cpu; > > @@ -101,7 +101,7 @@ static void * __init pcpu_alloc_bootmem(unsigned int cpu, unsigned long size, > unsigned long align) > { > const unsigned long goal = __pa(MAX_DMA_ADDRESS); > -#ifdef CONFIG_NEED_MULTIPLE_NODES > +#ifdef CONFIG_NUMA > int node = early_cpu_to_node(cpu); > void *ptr; > > @@ -140,7 +140,7 @@ static void __init pcpu_fc_free(void *ptr, size_t size) > > static int __init pcpu_cpu_distance(unsigned int from, unsigned int to) > { > -#ifdef CONFIG_NEED_MULTIPLE_NODES > +#ifdef CONFIG_NUMA > if (early_cpu_to_node(from) == early_cpu_to_node(to)) > return LOCAL_DISTANCE; > else > diff --git a/arch/x86/mm/init_32.c b/arch/x86/mm/init_32.c > index 21ffb03f6c72..74b78840182d 100644 > --- a/arch/x86/mm/init_32.c > +++ b/arch/x86/mm/init_32.c > @@ -651,7 +651,7 @@ void __init find_low_pfn_range(void) > highmem_pfn_init(); > } > > -#ifndef CONFIG_NEED_MULTIPLE_NODES > +#ifndef CONFIG_NUMA > void __init initmem_init(void) > { > #ifdef CONFIG_HIGHMEM > @@ -677,7 +677,7 @@ void __init initmem_init(void) > > setup_bootmem_allocator(); > } > -#endif /* !CONFIG_NEED_MULTIPLE_NODES */ > +#endif /* !CONFIG_NUMA */ > > void __init setup_bootmem_allocator(void) > { > diff --git a/include/asm-generic/topology.h b/include/asm-generic/topology.h > index 5aa8705df87e..4dbe715be65b 100644 > --- a/include/asm-generic/topology.h > +++ b/include/asm-generic/topology.h > @@ -45,7 +45,7 @@ > #endif > > #ifndef cpumask_of_node > - #ifdef CONFIG_NEED_MULTIPLE_NODES > + #ifdef CONFIG_NUMA > #define cpumask_of_node(node) ((node) == 0 ? cpu_online_mask : cpu_none_mask) > #else > #define cpumask_of_node(node) ((void)(node), cpu_online_mask) > diff --git a/include/linux/memblock.h b/include/linux/memblock.h > index 5984fff3f175..552309342c38 100644 > --- a/include/linux/memblock.h > +++ b/include/linux/memblock.h > @@ -50,7 +50,7 @@ struct memblock_region { > phys_addr_t base; > phys_addr_t size; > enum memblock_flags flags; > -#ifdef CONFIG_NEED_MULTIPLE_NODES > +#ifdef CONFIG_NUMA > int nid; > #endif > }; > @@ -347,7 +347,7 @@ int __init deferred_page_init_max_threads(const struct cpumask *node_cpumask); > int memblock_set_node(phys_addr_t base, phys_addr_t size, > struct memblock_type *type, int nid); > > -#ifdef CONFIG_NEED_MULTIPLE_NODES > +#ifdef CONFIG_NUMA > static inline void memblock_set_region_node(struct memblock_region *r, int nid) > { > r->nid = nid; > @@ -366,7 +366,7 @@ static inline int memblock_get_region_node(const struct memblock_region *r) > { > return 0; > } > -#endif /* CONFIG_NEED_MULTIPLE_NODES */ > +#endif /* CONFIG_NUMA */ > > /* Flags for memblock allocation APIs */ > #define MEMBLOCK_ALLOC_ANYWHERE (~(phys_addr_t)0) > diff --git a/include/linux/mm.h b/include/linux/mm.h > index c274f75efcf9..cf66f0ea7956 100644 > --- a/include/linux/mm.h > +++ b/include/linux/mm.h > @@ -46,7 +46,7 @@ extern int sysctl_page_lock_unfairness; > > void init_mm_internals(void); > > -#ifndef CONFIG_NEED_MULTIPLE_NODES /* Don't use mapnrs, do it properly */ > +#ifndef CONFIG_NUMA /* Don't use mapnrs, do it properly */ > extern unsigned long max_mapnr; > > static inline void set_max_mapnr(unsigned long limit) > @@ -2457,7 +2457,7 @@ extern void get_pfn_range_for_nid(unsigned int nid, > unsigned long *start_pfn, unsigned long *end_pfn); > extern unsigned long find_min_pfn_with_active_regions(void); > > -#ifndef CONFIG_NEED_MULTIPLE_NODES > +#ifndef CONFIG_NUMA > static inline int early_pfn_to_nid(unsigned long pfn) > { > return 0; > diff --git a/include/linux/mmzone.h b/include/linux/mmzone.h > index 2b41e252a995..ad42f440c704 100644 > --- a/include/linux/mmzone.h > +++ b/include/linux/mmzone.h > @@ -985,7 +985,7 @@ extern int movable_zone; > #ifdef CONFIG_HIGHMEM > static inline int zone_movable_is_highmem(void) > { > -#ifdef CONFIG_NEED_MULTIPLE_NODES > +#ifdef CONFIG_NUMA > return movable_zone == ZONE_HIGHMEM; > #else > return (ZONE_MOVABLE - 1) == ZONE_HIGHMEM; > @@ -1041,17 +1041,17 @@ extern int percpu_pagelist_fraction; > extern char numa_zonelist_order[]; > #define NUMA_ZONELIST_ORDER_LEN 16 > > -#ifndef CONFIG_NEED_MULTIPLE_NODES > +#ifndef CONFIG_NUMA > > extern struct pglist_data contig_page_data; > #define NODE_DATA(nid) (&contig_page_data) > #define NODE_MEM_MAP(nid) mem_map > > -#else /* CONFIG_NEED_MULTIPLE_NODES */ > +#else /* CONFIG_NUMA */ > > #include > > -#endif /* !CONFIG_NEED_MULTIPLE_NODES */ > +#endif /* !CONFIG_NUMA */ > > extern struct pglist_data *first_online_pgdat(void); > extern struct pglist_data *next_online_pgdat(struct pglist_data *pgdat); > diff --git a/kernel/crash_core.c b/kernel/crash_core.c > index 825284baaf46..53eb8bc6026d 100644 > --- a/kernel/crash_core.c > +++ b/kernel/crash_core.c > @@ -455,7 +455,7 @@ static int __init crash_save_vmcoreinfo_init(void) > VMCOREINFO_SYMBOL(_stext); > VMCOREINFO_SYMBOL(vmap_area_list); > > -#ifndef CONFIG_NEED_MULTIPLE_NODES > +#ifndef CONFIG_NUMA > VMCOREINFO_SYMBOL(mem_map); > VMCOREINFO_SYMBOL(contig_page_data); > #endif > diff --git a/mm/Kconfig b/mm/Kconfig > index 218b96ccc84a..bffe4bd859f3 100644 > --- a/mm/Kconfig > +++ b/mm/Kconfig > @@ -59,15 +59,6 @@ config FLAT_NODE_MEM_MAP > def_bool y > depends on !SPARSEMEM > > -# > -# Both the NUMA code and DISCONTIGMEM use arrays of pg_data_t's > -# to represent different areas of memory. This variable allows > -# those dependencies to exist individually. > -# > -config NEED_MULTIPLE_NODES > - def_bool y > - depends on NUMA > - > # > # SPARSEMEM_EXTREME (which is the default) does some bootmem > # allocations when sparse_init() is called. If this cannot > diff --git a/mm/memblock.c b/mm/memblock.c > index afaefa8fc6ab..123feef5259d 100644 > --- a/mm/memblock.c > +++ b/mm/memblock.c > @@ -92,7 +92,7 @@ > * system initialization completes. > */ > > -#ifndef CONFIG_NEED_MULTIPLE_NODES > +#ifndef CONFIG_NUMA > struct pglist_data __refdata contig_page_data; > EXPORT_SYMBOL(contig_page_data); > #endif > @@ -607,7 +607,7 @@ static int __init_memblock memblock_add_range(struct memblock_type *type, > * area, insert that portion. > */ > if (rbase > base) { > -#ifdef CONFIG_NEED_MULTIPLE_NODES > +#ifdef CONFIG_NUMA > WARN_ON(nid != memblock_get_region_node(rgn)); > #endif > WARN_ON(flags != rgn->flags); > @@ -1205,7 +1205,7 @@ void __init_memblock __next_mem_pfn_range(int *idx, int nid, > int __init_memblock memblock_set_node(phys_addr_t base, phys_addr_t size, > struct memblock_type *type, int nid) > { > -#ifdef CONFIG_NEED_MULTIPLE_NODES > +#ifdef CONFIG_NUMA > int start_rgn, end_rgn; > int i, ret; > > @@ -1849,7 +1849,7 @@ static void __init_memblock memblock_dump(struct memblock_type *type) > size = rgn->size; > end = base + size - 1; > flags = rgn->flags; > -#ifdef CONFIG_NEED_MULTIPLE_NODES > +#ifdef CONFIG_NUMA > if (memblock_get_region_node(rgn) != MAX_NUMNODES) > snprintf(nid_buf, sizeof(nid_buf), " on node %d", > memblock_get_region_node(rgn)); > diff --git a/mm/page_alloc.c b/mm/page_alloc.c > index 6fc22482eaa8..8f08135d3eb4 100644 > --- a/mm/page_alloc.c > +++ b/mm/page_alloc.c > @@ -1596,7 +1596,7 @@ void __free_pages_core(struct page *page, unsigned int order) > __free_pages_ok(page, order, FPI_TO_TAIL | FPI_SKIP_KASAN_POISON); > } > > -#ifdef CONFIG_NEED_MULTIPLE_NODES > +#ifdef CONFIG_NUMA > > /* > * During memory init memblocks map pfns to nids. The search is expensive and > @@ -1646,7 +1646,7 @@ int __meminit early_pfn_to_nid(unsigned long pfn) > > return nid; > } > -#endif /* CONFIG_NEED_MULTIPLE_NODES */ > +#endif /* CONFIG_NUMA */ > > void __init memblock_free_pages(struct page *page, unsigned long pfn, > unsigned int order) > @@ -7276,7 +7276,7 @@ static void __ref alloc_node_mem_map(struct pglist_data *pgdat) > pr_debug("%s: node %d, pgdat %08lx, node_mem_map %08lx\n", > __func__, pgdat->node_id, (unsigned long)pgdat, > (unsigned long)pgdat->node_mem_map); > -#ifndef CONFIG_NEED_MULTIPLE_NODES > +#ifndef CONFIG_NUMA > /* > * With no DISCONTIG, the global mem_map is just set as node 0's > */ > Nice Acked-by: David Hildenbrand -- Thanks, David / dhildenb _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1lqvtR-00DBYZ-BQ for kexec@lists.infradead.org; Wed, 09 Jun 2021 10:57:08 +0000 Received: by mail-wm1-f72.google.com with SMTP id k5-20020a05600c1c85b02901ac8b854c50so1799376wms.5 for ; Wed, 09 Jun 2021 03:57:02 -0700 (PDT) Subject: Re: [PATCH 8/9] mm: replace CONFIG_NEED_MULTIPLE_NODES with CONFIG_NUMA References: <20210602105348.13387-1-rppt@kernel.org> <20210602105348.13387-9-rppt@kernel.org> From: David Hildenbrand Message-ID: <450360f3-0d8d-651d-9f8b-ce6f13a881c4@redhat.com> Date: Wed, 9 Jun 2021 12:56:59 +0200 MIME-Version: 1.0 In-Reply-To: <20210602105348.13387-9-rppt@kernel.org> Content-Language: en-US List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii"; Format="flowed" Sender: "kexec" Errors-To: kexec-bounces+dwmw2=infradead.org@lists.infradead.org To: Mike Rapoport , Andrew Morton Cc: Arnd Bergmann , Geert Uytterhoeven , Ivan Kokshaysky , Jonathan Corbet , Matt Turner , Mike Rapoport , Richard Henderson , Vineet Gupta , kexec@lists.infradead.org, linux-alpha@vger.kernel.org, linux-arch@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-doc@vger.kernel.org, linux-ia64@vger.kernel.org, linux-kernel@vger.kernel.org, linux-m68k@lists.linux-m68k.org, linux-mips@vger.kernel.org, linux-mm@kvack.org, linux-riscv@lists.infradead.org, linux-s390@vger.kernel.org, linux-sh@vger.kernel.org, linux-snps-arc@lists.infradead.org, linux-xtensa@linux-xtensa.org, linuxppc-dev@lists.ozlabs.org, sparclinux@vger.kernel.org On 02.06.21 12:53, Mike Rapoport wrote: > From: Mike Rapoport > > After removal of DISCINTIGMEM the NEED_MULTIPLE_NODES and NUMA > configuration options are equivalent. > > Drop CONFIG_NEED_MULTIPLE_NODES and use CONFIG_NUMA instead. > > Done with > > $ sed -i 's/CONFIG_NEED_MULTIPLE_NODES/CONFIG_NUMA/' \ > $(git grep -wl CONFIG_NEED_MULTIPLE_NODES) > $ sed -i 's/NEED_MULTIPLE_NODES/NUMA/' \ > $(git grep -wl NEED_MULTIPLE_NODES) > > with manual tweaks afterwards. > > Signed-off-by: Mike Rapoport > --- > arch/arm64/Kconfig | 2 +- > arch/ia64/Kconfig | 2 +- > arch/mips/Kconfig | 2 +- > arch/mips/include/asm/mmzone.h | 2 +- > arch/mips/include/asm/page.h | 2 +- > arch/mips/mm/init.c | 4 ++-- > arch/powerpc/Kconfig | 2 +- > arch/powerpc/include/asm/mmzone.h | 4 ++-- > arch/powerpc/kernel/setup_64.c | 2 +- > arch/powerpc/kernel/smp.c | 2 +- > arch/powerpc/kexec/core.c | 4 ++-- > arch/powerpc/mm/Makefile | 2 +- > arch/powerpc/mm/mem.c | 4 ++-- > arch/riscv/Kconfig | 2 +- > arch/s390/Kconfig | 2 +- > arch/sh/include/asm/mmzone.h | 4 ++-- > arch/sh/kernel/topology.c | 2 +- > arch/sh/mm/Kconfig | 2 +- > arch/sh/mm/init.c | 2 +- > arch/sparc/Kconfig | 2 +- > arch/sparc/include/asm/mmzone.h | 4 ++-- > arch/sparc/kernel/smp_64.c | 2 +- > arch/sparc/mm/init_64.c | 12 ++++++------ > arch/x86/Kconfig | 2 +- > arch/x86/kernel/setup_percpu.c | 6 +++--- > arch/x86/mm/init_32.c | 4 ++-- > include/asm-generic/topology.h | 2 +- > include/linux/memblock.h | 6 +++--- > include/linux/mm.h | 4 ++-- > include/linux/mmzone.h | 8 ++++---- > kernel/crash_core.c | 2 +- > mm/Kconfig | 9 --------- > mm/memblock.c | 8 ++++---- > mm/page_alloc.c | 6 +++--- > 34 files changed, 58 insertions(+), 67 deletions(-) > > diff --git a/arch/arm64/Kconfig b/arch/arm64/Kconfig > index 9f1d8566bbf9..d01a1545ab8f 100644 > --- a/arch/arm64/Kconfig > +++ b/arch/arm64/Kconfig > @@ -1035,7 +1035,7 @@ config NODES_SHIFT > int "Maximum NUMA Nodes (as a power of 2)" > range 1 10 > default "4" > - depends on NEED_MULTIPLE_NODES > + depends on NUMA > help > Specify the maximum number of NUMA Nodes available on the target > system. Increases memory reserved to accommodate various tables. > diff --git a/arch/ia64/Kconfig b/arch/ia64/Kconfig > index 279252e3e0f7..da22a35e6f03 100644 > --- a/arch/ia64/Kconfig > +++ b/arch/ia64/Kconfig > @@ -302,7 +302,7 @@ config NODES_SHIFT > int "Max num nodes shift(3-10)" > range 3 10 > default "10" > - depends on NEED_MULTIPLE_NODES > + depends on NUMA > help > This option specifies the maximum number of nodes in your SSI system. > MAX_NUMNODES will be 2^(This value). > diff --git a/arch/mips/Kconfig b/arch/mips/Kconfig > index ed51970c08e7..4704a16c2e44 100644 > --- a/arch/mips/Kconfig > +++ b/arch/mips/Kconfig > @@ -2867,7 +2867,7 @@ config RANDOMIZE_BASE_MAX_OFFSET > config NODES_SHIFT > int > default "6" > - depends on NEED_MULTIPLE_NODES > + depends on NUMA > > config HW_PERF_EVENTS > bool "Enable hardware performance counter support for perf events" > diff --git a/arch/mips/include/asm/mmzone.h b/arch/mips/include/asm/mmzone.h > index 7649ab45e80c..602a21aee9d4 100644 > --- a/arch/mips/include/asm/mmzone.h > +++ b/arch/mips/include/asm/mmzone.h > @@ -8,7 +8,7 @@ > > #include > > -#ifdef CONFIG_NEED_MULTIPLE_NODES > +#ifdef CONFIG_NUMA > # include > #endif > > diff --git a/arch/mips/include/asm/page.h b/arch/mips/include/asm/page.h > index 195ff4e9771f..96bc798c1ec1 100644 > --- a/arch/mips/include/asm/page.h > +++ b/arch/mips/include/asm/page.h > @@ -239,7 +239,7 @@ static inline int pfn_valid(unsigned long pfn) > > /* pfn_valid is defined in linux/mmzone.h */ > > -#elif defined(CONFIG_NEED_MULTIPLE_NODES) > +#elif defined(CONFIG_NUMA) > > #define pfn_valid(pfn) \ > ({ \ > diff --git a/arch/mips/mm/init.c b/arch/mips/mm/init.c > index 97f6ca341448..19347dc6bbf8 100644 > --- a/arch/mips/mm/init.c > +++ b/arch/mips/mm/init.c > @@ -394,7 +394,7 @@ void maar_init(void) > } > } > > -#ifndef CONFIG_NEED_MULTIPLE_NODES > +#ifndef CONFIG_NUMA > void __init paging_init(void) > { > unsigned long max_zone_pfns[MAX_NR_ZONES]; > @@ -473,7 +473,7 @@ void __init mem_init(void) > 0x80000000 - 4, KCORE_TEXT); > #endif > } > -#endif /* !CONFIG_NEED_MULTIPLE_NODES */ > +#endif /* !CONFIG_NUMA */ > > void free_init_pages(const char *what, unsigned long begin, unsigned long end) > { > diff --git a/arch/powerpc/Kconfig b/arch/powerpc/Kconfig > index 088dd2afcfe4..14b132cf95e2 100644 > --- a/arch/powerpc/Kconfig > +++ b/arch/powerpc/Kconfig > @@ -671,7 +671,7 @@ config NODES_SHIFT > int > default "8" if PPC64 > default "4" > - depends on NEED_MULTIPLE_NODES > + depends on NUMA > > config USE_PERCPU_NUMA_NODE_ID > def_bool y > diff --git a/arch/powerpc/include/asm/mmzone.h b/arch/powerpc/include/asm/mmzone.h > index 6cda76b57c5d..4c6c6dbd182f 100644 > --- a/arch/powerpc/include/asm/mmzone.h > +++ b/arch/powerpc/include/asm/mmzone.h > @@ -18,7 +18,7 @@ > * flags field of the struct page > */ > > -#ifdef CONFIG_NEED_MULTIPLE_NODES > +#ifdef CONFIG_NUMA > > extern struct pglist_data *node_data[]; > /* > @@ -41,7 +41,7 @@ u64 memory_hotplug_max(void); > > #else > #define memory_hotplug_max() memblock_end_of_DRAM() > -#endif /* CONFIG_NEED_MULTIPLE_NODES */ > +#endif /* CONFIG_NUMA */ > #ifdef CONFIG_FA_DUMP > #define __HAVE_ARCH_RESERVED_KERNEL_PAGES > #endif > diff --git a/arch/powerpc/kernel/setup_64.c b/arch/powerpc/kernel/setup_64.c > index e42b85e4f1aa..a35fbf4d0bce 100644 > --- a/arch/powerpc/kernel/setup_64.c > +++ b/arch/powerpc/kernel/setup_64.c > @@ -788,7 +788,7 @@ static void * __init pcpu_alloc_bootmem(unsigned int cpu, size_t size, > size_t align) > { > const unsigned long goal = __pa(MAX_DMA_ADDRESS); > -#ifdef CONFIG_NEED_MULTIPLE_NODES > +#ifdef CONFIG_NUMA > int node = early_cpu_to_node(cpu); > void *ptr; > > diff --git a/arch/powerpc/kernel/smp.c b/arch/powerpc/kernel/smp.c > index 2e05c783440a..a5209ea3859e 100644 > --- a/arch/powerpc/kernel/smp.c > +++ b/arch/powerpc/kernel/smp.c > @@ -1047,7 +1047,7 @@ void __init smp_prepare_cpus(unsigned int max_cpus) > zalloc_cpumask_var_node(&per_cpu(cpu_coregroup_map, cpu), > GFP_KERNEL, cpu_to_node(cpu)); > > -#ifdef CONFIG_NEED_MULTIPLE_NODES > +#ifdef CONFIG_NUMA > /* > * numa_node_id() works after this. > */ > diff --git a/arch/powerpc/kexec/core.c b/arch/powerpc/kexec/core.c > index 56da5eb2b923..48525e8b5730 100644 > --- a/arch/powerpc/kexec/core.c > +++ b/arch/powerpc/kexec/core.c > @@ -68,11 +68,11 @@ void machine_kexec_cleanup(struct kimage *image) > void arch_crash_save_vmcoreinfo(void) > { > > -#ifdef CONFIG_NEED_MULTIPLE_NODES > +#ifdef CONFIG_NUMA > VMCOREINFO_SYMBOL(node_data); > VMCOREINFO_LENGTH(node_data, MAX_NUMNODES); > #endif > -#ifndef CONFIG_NEED_MULTIPLE_NODES > +#ifndef CONFIG_NUMA > VMCOREINFO_SYMBOL(contig_page_data); > #endif > #if defined(CONFIG_PPC64) && defined(CONFIG_SPARSEMEM_VMEMMAP) > diff --git a/arch/powerpc/mm/Makefile b/arch/powerpc/mm/Makefile > index c3df3a8501d4..2ffcf540f08b 100644 > --- a/arch/powerpc/mm/Makefile > +++ b/arch/powerpc/mm/Makefile > @@ -13,7 +13,7 @@ obj-y := fault.o mem.o pgtable.o mmap.o maccess.o \ > obj-$(CONFIG_PPC_MMU_NOHASH) += nohash/ > obj-$(CONFIG_PPC_BOOK3S_32) += book3s32/ > obj-$(CONFIG_PPC_BOOK3S_64) += book3s64/ > -obj-$(CONFIG_NEED_MULTIPLE_NODES) += numa.o > +obj-$(CONFIG_NUMA) += numa.o > obj-$(CONFIG_PPC_MM_SLICES) += slice.o > obj-$(CONFIG_HUGETLB_PAGE) += hugetlbpage.o > obj-$(CONFIG_NOT_COHERENT_CACHE) += dma-noncoherent.o > diff --git a/arch/powerpc/mm/mem.c b/arch/powerpc/mm/mem.c > index 043bbeaf407c..7a266991315f 100644 > --- a/arch/powerpc/mm/mem.c > +++ b/arch/powerpc/mm/mem.c > @@ -126,7 +126,7 @@ void __ref arch_remove_memory(int nid, u64 start, u64 size, > } > #endif > > -#ifndef CONFIG_NEED_MULTIPLE_NODES > +#ifndef CONFIG_NUMA > void __init mem_topology_setup(void) > { > max_low_pfn = max_pfn = memblock_end_of_DRAM() >> PAGE_SHIFT; > @@ -161,7 +161,7 @@ static int __init mark_nonram_nosave(void) > > return 0; > } > -#else /* CONFIG_NEED_MULTIPLE_NODES */ > +#else /* CONFIG_NUMA */ > static int __init mark_nonram_nosave(void) > { > return 0; > diff --git a/arch/riscv/Kconfig b/arch/riscv/Kconfig > index a8ad8eb76120..e985dbf9ff27 100644 > --- a/arch/riscv/Kconfig > +++ b/arch/riscv/Kconfig > @@ -331,7 +331,7 @@ config NODES_SHIFT > int "Maximum NUMA Nodes (as a power of 2)" > range 1 10 > default "2" > - depends on NEED_MULTIPLE_NODES > + depends on NUMA > help > Specify the maximum number of NUMA Nodes available on the target > system. Increases memory reserved to accommodate various tables. > diff --git a/arch/s390/Kconfig b/arch/s390/Kconfig > index b4c7c34069f8..707afbcd81c2 100644 > --- a/arch/s390/Kconfig > +++ b/arch/s390/Kconfig > @@ -475,7 +475,7 @@ config NUMA > > config NODES_SHIFT > int > - depends on NEED_MULTIPLE_NODES > + depends on NUMA > default "1" > > config SCHED_SMT > diff --git a/arch/sh/include/asm/mmzone.h b/arch/sh/include/asm/mmzone.h > index 6552a088dc97..7b8dead2723d 100644 > --- a/arch/sh/include/asm/mmzone.h > +++ b/arch/sh/include/asm/mmzone.h > @@ -2,7 +2,7 @@ > #ifndef __ASM_SH_MMZONE_H > #define __ASM_SH_MMZONE_H > > -#ifdef CONFIG_NEED_MULTIPLE_NODES > +#ifdef CONFIG_NUMA > #include > > extern struct pglist_data *node_data[]; > @@ -31,7 +31,7 @@ static inline void > setup_bootmem_node(int nid, unsigned long start, unsigned long end) > { > } > -#endif /* CONFIG_NEED_MULTIPLE_NODES */ > +#endif /* CONFIG_NUMA */ > > /* Platform specific mem init */ > void __init plat_mem_setup(void); > diff --git a/arch/sh/kernel/topology.c b/arch/sh/kernel/topology.c > index 7a989eed3b18..76af6db9daa2 100644 > --- a/arch/sh/kernel/topology.c > +++ b/arch/sh/kernel/topology.c > @@ -46,7 +46,7 @@ static int __init topology_init(void) > { > int i, ret; > > -#ifdef CONFIG_NEED_MULTIPLE_NODES > +#ifdef CONFIG_NUMA > for_each_online_node(i) > register_one_node(i); > #endif > diff --git a/arch/sh/mm/Kconfig b/arch/sh/mm/Kconfig > index d551a9cac41e..ba569cfb4368 100644 > --- a/arch/sh/mm/Kconfig > +++ b/arch/sh/mm/Kconfig > @@ -120,7 +120,7 @@ config NODES_SHIFT > int > default "3" if CPU_SUBTYPE_SHX3 > default "1" > - depends on NEED_MULTIPLE_NODES > + depends on NUMA > > config ARCH_FLATMEM_ENABLE > def_bool y > diff --git a/arch/sh/mm/init.c b/arch/sh/mm/init.c > index 168d7d4dd735..ce26c7f8950a 100644 > --- a/arch/sh/mm/init.c > +++ b/arch/sh/mm/init.c > @@ -211,7 +211,7 @@ void __init allocate_pgdat(unsigned int nid) > > get_pfn_range_for_nid(nid, &start_pfn, &end_pfn); > > -#ifdef CONFIG_NEED_MULTIPLE_NODES > +#ifdef CONFIG_NUMA > NODE_DATA(nid) = memblock_alloc_try_nid( > sizeof(struct pglist_data), > SMP_CACHE_BYTES, MEMBLOCK_LOW_LIMIT, > diff --git a/arch/sparc/Kconfig b/arch/sparc/Kconfig > index 164a5254c91c..c72f52c704cd 100644 > --- a/arch/sparc/Kconfig > +++ b/arch/sparc/Kconfig > @@ -265,7 +265,7 @@ config NODES_SHIFT > int "Maximum NUMA Nodes (as a power of 2)" > range 4 5 if SPARC64 > default "5" > - depends on NEED_MULTIPLE_NODES > + depends on NUMA > help > Specify the maximum number of NUMA Nodes available on the target > system. Increases memory reserved to accommodate various tables. > diff --git a/arch/sparc/include/asm/mmzone.h b/arch/sparc/include/asm/mmzone.h > index 6543fb97a849..a236d8aa893a 100644 > --- a/arch/sparc/include/asm/mmzone.h > +++ b/arch/sparc/include/asm/mmzone.h > @@ -2,7 +2,7 @@ > #ifndef _SPARC64_MMZONE_H > #define _SPARC64_MMZONE_H > > -#ifdef CONFIG_NEED_MULTIPLE_NODES > +#ifdef CONFIG_NUMA > > #include > > @@ -13,6 +13,6 @@ extern struct pglist_data *node_data[]; > extern int numa_cpu_lookup_table[]; > extern cpumask_t numa_cpumask_lookup_table[]; > > -#endif /* CONFIG_NEED_MULTIPLE_NODES */ > +#endif /* CONFIG_NUMA */ > > #endif /* _SPARC64_MMZONE_H */ > diff --git a/arch/sparc/kernel/smp_64.c b/arch/sparc/kernel/smp_64.c > index e38d8bf454e8..c89a5971fb0d 100644 > --- a/arch/sparc/kernel/smp_64.c > +++ b/arch/sparc/kernel/smp_64.c > @@ -1546,7 +1546,7 @@ static void * __init pcpu_alloc_bootmem(unsigned int cpu, size_t size, > size_t align) > { > const unsigned long goal = __pa(MAX_DMA_ADDRESS); > -#ifdef CONFIG_NEED_MULTIPLE_NODES > +#ifdef CONFIG_NUMA > int node = cpu_to_node(cpu); > void *ptr; > > diff --git a/arch/sparc/mm/init_64.c b/arch/sparc/mm/init_64.c > index e454f179cf5d..06e938d03f3b 100644 > --- a/arch/sparc/mm/init_64.c > +++ b/arch/sparc/mm/init_64.c > @@ -903,7 +903,7 @@ struct node_mem_mask { > static struct node_mem_mask node_masks[MAX_NUMNODES]; > static int num_node_masks; > > -#ifdef CONFIG_NEED_MULTIPLE_NODES > +#ifdef CONFIG_NUMA > > struct mdesc_mlgroup { > u64 node; > @@ -1059,7 +1059,7 @@ static void __init allocate_node_data(int nid) > { > struct pglist_data *p; > unsigned long start_pfn, end_pfn; > -#ifdef CONFIG_NEED_MULTIPLE_NODES > +#ifdef CONFIG_NUMA > > NODE_DATA(nid) = memblock_alloc_node(sizeof(struct pglist_data), > SMP_CACHE_BYTES, nid); > @@ -1080,7 +1080,7 @@ static void __init allocate_node_data(int nid) > > static void init_node_masks_nonnuma(void) > { > -#ifdef CONFIG_NEED_MULTIPLE_NODES > +#ifdef CONFIG_NUMA > int i; > #endif > > @@ -1090,7 +1090,7 @@ static void init_node_masks_nonnuma(void) > node_masks[0].match = 0; > num_node_masks = 1; > > -#ifdef CONFIG_NEED_MULTIPLE_NODES > +#ifdef CONFIG_NUMA > for (i = 0; i < NR_CPUS; i++) > numa_cpu_lookup_table[i] = 0; > > @@ -1098,7 +1098,7 @@ static void init_node_masks_nonnuma(void) > #endif > } > > -#ifdef CONFIG_NEED_MULTIPLE_NODES > +#ifdef CONFIG_NUMA > struct pglist_data *node_data[MAX_NUMNODES]; > > EXPORT_SYMBOL(numa_cpu_lookup_table); > @@ -2487,7 +2487,7 @@ int page_in_phys_avail(unsigned long paddr) > > static void __init register_page_bootmem_info(void) > { > -#ifdef CONFIG_NEED_MULTIPLE_NODES > +#ifdef CONFIG_NUMA > int i; > > for_each_online_node(i) > diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig > index 0045e1b44190..5d523ff70fe7 100644 > --- a/arch/x86/Kconfig > +++ b/arch/x86/Kconfig > @@ -1597,7 +1597,7 @@ config NODES_SHIFT > default "10" if MAXSMP > default "6" if X86_64 > default "3" > - depends on NEED_MULTIPLE_NODES > + depends on NUMA > help > Specify the maximum number of NUMA Nodes available on the target > system. Increases memory reserved to accommodate various tables. > diff --git a/arch/x86/kernel/setup_percpu.c b/arch/x86/kernel/setup_percpu.c > index 0941d2f44f2a..78a32b956e81 100644 > --- a/arch/x86/kernel/setup_percpu.c > +++ b/arch/x86/kernel/setup_percpu.c > @@ -66,7 +66,7 @@ EXPORT_SYMBOL(__per_cpu_offset); > */ > static bool __init pcpu_need_numa(void) > { > -#ifdef CONFIG_NEED_MULTIPLE_NODES > +#ifdef CONFIG_NUMA > pg_data_t *last = NULL; > unsigned int cpu; > > @@ -101,7 +101,7 @@ static void * __init pcpu_alloc_bootmem(unsigned int cpu, unsigned long size, > unsigned long align) > { > const unsigned long goal = __pa(MAX_DMA_ADDRESS); > -#ifdef CONFIG_NEED_MULTIPLE_NODES > +#ifdef CONFIG_NUMA > int node = early_cpu_to_node(cpu); > void *ptr; > > @@ -140,7 +140,7 @@ static void __init pcpu_fc_free(void *ptr, size_t size) > > static int __init pcpu_cpu_distance(unsigned int from, unsigned int to) > { > -#ifdef CONFIG_NEED_MULTIPLE_NODES > +#ifdef CONFIG_NUMA > if (early_cpu_to_node(from) == early_cpu_to_node(to)) > return LOCAL_DISTANCE; > else > diff --git a/arch/x86/mm/init_32.c b/arch/x86/mm/init_32.c > index 21ffb03f6c72..74b78840182d 100644 > --- a/arch/x86/mm/init_32.c > +++ b/arch/x86/mm/init_32.c > @@ -651,7 +651,7 @@ void __init find_low_pfn_range(void) > highmem_pfn_init(); > } > > -#ifndef CONFIG_NEED_MULTIPLE_NODES > +#ifndef CONFIG_NUMA > void __init initmem_init(void) > { > #ifdef CONFIG_HIGHMEM > @@ -677,7 +677,7 @@ void __init initmem_init(void) > > setup_bootmem_allocator(); > } > -#endif /* !CONFIG_NEED_MULTIPLE_NODES */ > +#endif /* !CONFIG_NUMA */ > > void __init setup_bootmem_allocator(void) > { > diff --git a/include/asm-generic/topology.h b/include/asm-generic/topology.h > index 5aa8705df87e..4dbe715be65b 100644 > --- a/include/asm-generic/topology.h > +++ b/include/asm-generic/topology.h > @@ -45,7 +45,7 @@ > #endif > > #ifndef cpumask_of_node > - #ifdef CONFIG_NEED_MULTIPLE_NODES > + #ifdef CONFIG_NUMA > #define cpumask_of_node(node) ((node) == 0 ? cpu_online_mask : cpu_none_mask) > #else > #define cpumask_of_node(node) ((void)(node), cpu_online_mask) > diff --git a/include/linux/memblock.h b/include/linux/memblock.h > index 5984fff3f175..552309342c38 100644 > --- a/include/linux/memblock.h > +++ b/include/linux/memblock.h > @@ -50,7 +50,7 @@ struct memblock_region { > phys_addr_t base; > phys_addr_t size; > enum memblock_flags flags; > -#ifdef CONFIG_NEED_MULTIPLE_NODES > +#ifdef CONFIG_NUMA > int nid; > #endif > }; > @@ -347,7 +347,7 @@ int __init deferred_page_init_max_threads(const struct cpumask *node_cpumask); > int memblock_set_node(phys_addr_t base, phys_addr_t size, > struct memblock_type *type, int nid); > > -#ifdef CONFIG_NEED_MULTIPLE_NODES > +#ifdef CONFIG_NUMA > static inline void memblock_set_region_node(struct memblock_region *r, int nid) > { > r->nid = nid; > @@ -366,7 +366,7 @@ static inline int memblock_get_region_node(const struct memblock_region *r) > { > return 0; > } > -#endif /* CONFIG_NEED_MULTIPLE_NODES */ > +#endif /* CONFIG_NUMA */ > > /* Flags for memblock allocation APIs */ > #define MEMBLOCK_ALLOC_ANYWHERE (~(phys_addr_t)0) > diff --git a/include/linux/mm.h b/include/linux/mm.h > index c274f75efcf9..cf66f0ea7956 100644 > --- a/include/linux/mm.h > +++ b/include/linux/mm.h > @@ -46,7 +46,7 @@ extern int sysctl_page_lock_unfairness; > > void init_mm_internals(void); > > -#ifndef CONFIG_NEED_MULTIPLE_NODES /* Don't use mapnrs, do it properly */ > +#ifndef CONFIG_NUMA /* Don't use mapnrs, do it properly */ > extern unsigned long max_mapnr; > > static inline void set_max_mapnr(unsigned long limit) > @@ -2457,7 +2457,7 @@ extern void get_pfn_range_for_nid(unsigned int nid, > unsigned long *start_pfn, unsigned long *end_pfn); > extern unsigned long find_min_pfn_with_active_regions(void); > > -#ifndef CONFIG_NEED_MULTIPLE_NODES > +#ifndef CONFIG_NUMA > static inline int early_pfn_to_nid(unsigned long pfn) > { > return 0; > diff --git a/include/linux/mmzone.h b/include/linux/mmzone.h > index 2b41e252a995..ad42f440c704 100644 > --- a/include/linux/mmzone.h > +++ b/include/linux/mmzone.h > @@ -985,7 +985,7 @@ extern int movable_zone; > #ifdef CONFIG_HIGHMEM > static inline int zone_movable_is_highmem(void) > { > -#ifdef CONFIG_NEED_MULTIPLE_NODES > +#ifdef CONFIG_NUMA > return movable_zone == ZONE_HIGHMEM; > #else > return (ZONE_MOVABLE - 1) == ZONE_HIGHMEM; > @@ -1041,17 +1041,17 @@ extern int percpu_pagelist_fraction; > extern char numa_zonelist_order[]; > #define NUMA_ZONELIST_ORDER_LEN 16 > > -#ifndef CONFIG_NEED_MULTIPLE_NODES > +#ifndef CONFIG_NUMA > > extern struct pglist_data contig_page_data; > #define NODE_DATA(nid) (&contig_page_data) > #define NODE_MEM_MAP(nid) mem_map > > -#else /* CONFIG_NEED_MULTIPLE_NODES */ > +#else /* CONFIG_NUMA */ > > #include > > -#endif /* !CONFIG_NEED_MULTIPLE_NODES */ > +#endif /* !CONFIG_NUMA */ > > extern struct pglist_data *first_online_pgdat(void); > extern struct pglist_data *next_online_pgdat(struct pglist_data *pgdat); > diff --git a/kernel/crash_core.c b/kernel/crash_core.c > index 825284baaf46..53eb8bc6026d 100644 > --- a/kernel/crash_core.c > +++ b/kernel/crash_core.c > @@ -455,7 +455,7 @@ static int __init crash_save_vmcoreinfo_init(void) > VMCOREINFO_SYMBOL(_stext); > VMCOREINFO_SYMBOL(vmap_area_list); > > -#ifndef CONFIG_NEED_MULTIPLE_NODES > +#ifndef CONFIG_NUMA > VMCOREINFO_SYMBOL(mem_map); > VMCOREINFO_SYMBOL(contig_page_data); > #endif > diff --git a/mm/Kconfig b/mm/Kconfig > index 218b96ccc84a..bffe4bd859f3 100644 > --- a/mm/Kconfig > +++ b/mm/Kconfig > @@ -59,15 +59,6 @@ config FLAT_NODE_MEM_MAP > def_bool y > depends on !SPARSEMEM > > -# > -# Both the NUMA code and DISCONTIGMEM use arrays of pg_data_t's > -# to represent different areas of memory. This variable allows > -# those dependencies to exist individually. > -# > -config NEED_MULTIPLE_NODES > - def_bool y > - depends on NUMA > - > # > # SPARSEMEM_EXTREME (which is the default) does some bootmem > # allocations when sparse_init() is called. If this cannot > diff --git a/mm/memblock.c b/mm/memblock.c > index afaefa8fc6ab..123feef5259d 100644 > --- a/mm/memblock.c > +++ b/mm/memblock.c > @@ -92,7 +92,7 @@ > * system initialization completes. > */ > > -#ifndef CONFIG_NEED_MULTIPLE_NODES > +#ifndef CONFIG_NUMA > struct pglist_data __refdata contig_page_data; > EXPORT_SYMBOL(contig_page_data); > #endif > @@ -607,7 +607,7 @@ static int __init_memblock memblock_add_range(struct memblock_type *type, > * area, insert that portion. > */ > if (rbase > base) { > -#ifdef CONFIG_NEED_MULTIPLE_NODES > +#ifdef CONFIG_NUMA > WARN_ON(nid != memblock_get_region_node(rgn)); > #endif > WARN_ON(flags != rgn->flags); > @@ -1205,7 +1205,7 @@ void __init_memblock __next_mem_pfn_range(int *idx, int nid, > int __init_memblock memblock_set_node(phys_addr_t base, phys_addr_t size, > struct memblock_type *type, int nid) > { > -#ifdef CONFIG_NEED_MULTIPLE_NODES > +#ifdef CONFIG_NUMA > int start_rgn, end_rgn; > int i, ret; > > @@ -1849,7 +1849,7 @@ static void __init_memblock memblock_dump(struct memblock_type *type) > size = rgn->size; > end = base + size - 1; > flags = rgn->flags; > -#ifdef CONFIG_NEED_MULTIPLE_NODES > +#ifdef CONFIG_NUMA > if (memblock_get_region_node(rgn) != MAX_NUMNODES) > snprintf(nid_buf, sizeof(nid_buf), " on node %d", > memblock_get_region_node(rgn)); > diff --git a/mm/page_alloc.c b/mm/page_alloc.c > index 6fc22482eaa8..8f08135d3eb4 100644 > --- a/mm/page_alloc.c > +++ b/mm/page_alloc.c > @@ -1596,7 +1596,7 @@ void __free_pages_core(struct page *page, unsigned int order) > __free_pages_ok(page, order, FPI_TO_TAIL | FPI_SKIP_KASAN_POISON); > } > > -#ifdef CONFIG_NEED_MULTIPLE_NODES > +#ifdef CONFIG_NUMA > > /* > * During memory init memblocks map pfns to nids. The search is expensive and > @@ -1646,7 +1646,7 @@ int __meminit early_pfn_to_nid(unsigned long pfn) > > return nid; > } > -#endif /* CONFIG_NEED_MULTIPLE_NODES */ > +#endif /* CONFIG_NUMA */ > > void __init memblock_free_pages(struct page *page, unsigned long pfn, > unsigned int order) > @@ -7276,7 +7276,7 @@ static void __ref alloc_node_mem_map(struct pglist_data *pgdat) > pr_debug("%s: node %d, pgdat %08lx, node_mem_map %08lx\n", > __func__, pgdat->node_id, (unsigned long)pgdat, > (unsigned long)pgdat->node_mem_map); > -#ifndef CONFIG_NEED_MULTIPLE_NODES > +#ifndef CONFIG_NUMA > /* > * With no DISCONTIG, the global mem_map is just set as node 0's > */ > Nice Acked-by: David Hildenbrand -- Thanks, David / dhildenb _______________________________________________ kexec mailing list kexec@lists.infradead.org http://lists.infradead.org/mailman/listinfo/kexec From mboxrd@z Thu Jan 1 00:00:00 1970 From: David Hildenbrand Date: Wed, 09 Jun 2021 10:56:59 +0000 Subject: Re: [PATCH 8/9] mm: replace CONFIG_NEED_MULTIPLE_NODES with CONFIG_NUMA Message-Id: <450360f3-0d8d-651d-9f8b-ce6f13a881c4@redhat.com> List-Id: References: <20210602105348.13387-1-rppt@kernel.org> <20210602105348.13387-9-rppt@kernel.org> In-Reply-To: <20210602105348.13387-9-rppt@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: Mike Rapoport , Andrew Morton Cc: Arnd Bergmann , Geert Uytterhoeven , Ivan Kokshaysky , Jonathan Corbet , Matt Turner , Mike Rapoport , Richard Henderson , Vineet Gupta , kexec@lists.infradead.org, linux-alpha@vger.kernel.org, linux-arch@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-doc@vger.kernel.org, linux-ia64@vger.kernel.org, linux-kernel@vger.kernel.org, linux-m68k@lists.linux-m68k.org, linux-mips@vger.kernel.org, linux-mm@kvack.org, linux-riscv@lists.infradead.org, linux-s390@vger.kernel.org, linux-sh@vger.kernel.org, linux-snps-arc@lists.infradead.org, linux-xtensa@linux-xtensa.org, linuxppc-dev@lists.ozlabs.org, sparclinux@vger.kernel.org On 02.06.21 12:53, Mike Rapoport wrote: > From: Mike Rapoport > > After removal of DISCINTIGMEM the NEED_MULTIPLE_NODES and NUMA > configuration options are equivalent. > > Drop CONFIG_NEED_MULTIPLE_NODES and use CONFIG_NUMA instead. > > Done with > > $ sed -i 's/CONFIG_NEED_MULTIPLE_NODES/CONFIG_NUMA/' \ > $(git grep -wl CONFIG_NEED_MULTIPLE_NODES) > $ sed -i 's/NEED_MULTIPLE_NODES/NUMA/' \ > $(git grep -wl NEED_MULTIPLE_NODES) > > with manual tweaks afterwards. > > Signed-off-by: Mike Rapoport > --- > arch/arm64/Kconfig | 2 +- > arch/ia64/Kconfig | 2 +- > arch/mips/Kconfig | 2 +- > arch/mips/include/asm/mmzone.h | 2 +- > arch/mips/include/asm/page.h | 2 +- > arch/mips/mm/init.c | 4 ++-- > arch/powerpc/Kconfig | 2 +- > arch/powerpc/include/asm/mmzone.h | 4 ++-- > arch/powerpc/kernel/setup_64.c | 2 +- > arch/powerpc/kernel/smp.c | 2 +- > arch/powerpc/kexec/core.c | 4 ++-- > arch/powerpc/mm/Makefile | 2 +- > arch/powerpc/mm/mem.c | 4 ++-- > arch/riscv/Kconfig | 2 +- > arch/s390/Kconfig | 2 +- > arch/sh/include/asm/mmzone.h | 4 ++-- > arch/sh/kernel/topology.c | 2 +- > arch/sh/mm/Kconfig | 2 +- > arch/sh/mm/init.c | 2 +- > arch/sparc/Kconfig | 2 +- > arch/sparc/include/asm/mmzone.h | 4 ++-- > arch/sparc/kernel/smp_64.c | 2 +- > arch/sparc/mm/init_64.c | 12 ++++++------ > arch/x86/Kconfig | 2 +- > arch/x86/kernel/setup_percpu.c | 6 +++--- > arch/x86/mm/init_32.c | 4 ++-- > include/asm-generic/topology.h | 2 +- > include/linux/memblock.h | 6 +++--- > include/linux/mm.h | 4 ++-- > include/linux/mmzone.h | 8 ++++---- > kernel/crash_core.c | 2 +- > mm/Kconfig | 9 --------- > mm/memblock.c | 8 ++++---- > mm/page_alloc.c | 6 +++--- > 34 files changed, 58 insertions(+), 67 deletions(-) > > diff --git a/arch/arm64/Kconfig b/arch/arm64/Kconfig > index 9f1d8566bbf9..d01a1545ab8f 100644 > --- a/arch/arm64/Kconfig > +++ b/arch/arm64/Kconfig > @@ -1035,7 +1035,7 @@ config NODES_SHIFT > int "Maximum NUMA Nodes (as a power of 2)" > range 1 10 > default "4" > - depends on NEED_MULTIPLE_NODES > + depends on NUMA > help > Specify the maximum number of NUMA Nodes available on the target > system. Increases memory reserved to accommodate various tables. > diff --git a/arch/ia64/Kconfig b/arch/ia64/Kconfig > index 279252e3e0f7..da22a35e6f03 100644 > --- a/arch/ia64/Kconfig > +++ b/arch/ia64/Kconfig > @@ -302,7 +302,7 @@ config NODES_SHIFT > int "Max num nodes shift(3-10)" > range 3 10 > default "10" > - depends on NEED_MULTIPLE_NODES > + depends on NUMA > help > This option specifies the maximum number of nodes in your SSI system. > MAX_NUMNODES will be 2^(This value). > diff --git a/arch/mips/Kconfig b/arch/mips/Kconfig > index ed51970c08e7..4704a16c2e44 100644 > --- a/arch/mips/Kconfig > +++ b/arch/mips/Kconfig > @@ -2867,7 +2867,7 @@ config RANDOMIZE_BASE_MAX_OFFSET > config NODES_SHIFT > int > default "6" > - depends on NEED_MULTIPLE_NODES > + depends on NUMA > > config HW_PERF_EVENTS > bool "Enable hardware performance counter support for perf events" > diff --git a/arch/mips/include/asm/mmzone.h b/arch/mips/include/asm/mmzone.h > index 7649ab45e80c..602a21aee9d4 100644 > --- a/arch/mips/include/asm/mmzone.h > +++ b/arch/mips/include/asm/mmzone.h > @@ -8,7 +8,7 @@ > > #include > > -#ifdef CONFIG_NEED_MULTIPLE_NODES > +#ifdef CONFIG_NUMA > # include > #endif > > diff --git a/arch/mips/include/asm/page.h b/arch/mips/include/asm/page.h > index 195ff4e9771f..96bc798c1ec1 100644 > --- a/arch/mips/include/asm/page.h > +++ b/arch/mips/include/asm/page.h > @@ -239,7 +239,7 @@ static inline int pfn_valid(unsigned long pfn) > > /* pfn_valid is defined in linux/mmzone.h */ > > -#elif defined(CONFIG_NEED_MULTIPLE_NODES) > +#elif defined(CONFIG_NUMA) > > #define pfn_valid(pfn) \ > ({ \ > diff --git a/arch/mips/mm/init.c b/arch/mips/mm/init.c > index 97f6ca341448..19347dc6bbf8 100644 > --- a/arch/mips/mm/init.c > +++ b/arch/mips/mm/init.c > @@ -394,7 +394,7 @@ void maar_init(void) > } > } > > -#ifndef CONFIG_NEED_MULTIPLE_NODES > +#ifndef CONFIG_NUMA > void __init paging_init(void) > { > unsigned long max_zone_pfns[MAX_NR_ZONES]; > @@ -473,7 +473,7 @@ void __init mem_init(void) > 0x80000000 - 4, KCORE_TEXT); > #endif > } > -#endif /* !CONFIG_NEED_MULTIPLE_NODES */ > +#endif /* !CONFIG_NUMA */ > > void free_init_pages(const char *what, unsigned long begin, unsigned long end) > { > diff --git a/arch/powerpc/Kconfig b/arch/powerpc/Kconfig > index 088dd2afcfe4..14b132cf95e2 100644 > --- a/arch/powerpc/Kconfig > +++ b/arch/powerpc/Kconfig > @@ -671,7 +671,7 @@ config NODES_SHIFT > int > default "8" if PPC64 > default "4" > - depends on NEED_MULTIPLE_NODES > + depends on NUMA > > config USE_PERCPU_NUMA_NODE_ID > def_bool y > diff --git a/arch/powerpc/include/asm/mmzone.h b/arch/powerpc/include/asm/mmzone.h > index 6cda76b57c5d..4c6c6dbd182f 100644 > --- a/arch/powerpc/include/asm/mmzone.h > +++ b/arch/powerpc/include/asm/mmzone.h > @@ -18,7 +18,7 @@ > * flags field of the struct page > */ > > -#ifdef CONFIG_NEED_MULTIPLE_NODES > +#ifdef CONFIG_NUMA > > extern struct pglist_data *node_data[]; > /* > @@ -41,7 +41,7 @@ u64 memory_hotplug_max(void); > > #else > #define memory_hotplug_max() memblock_end_of_DRAM() > -#endif /* CONFIG_NEED_MULTIPLE_NODES */ > +#endif /* CONFIG_NUMA */ > #ifdef CONFIG_FA_DUMP > #define __HAVE_ARCH_RESERVED_KERNEL_PAGES > #endif > diff --git a/arch/powerpc/kernel/setup_64.c b/arch/powerpc/kernel/setup_64.c > index e42b85e4f1aa..a35fbf4d0bce 100644 > --- a/arch/powerpc/kernel/setup_64.c > +++ b/arch/powerpc/kernel/setup_64.c > @@ -788,7 +788,7 @@ static void * __init pcpu_alloc_bootmem(unsigned int cpu, size_t size, > size_t align) > { > const unsigned long goal = __pa(MAX_DMA_ADDRESS); > -#ifdef CONFIG_NEED_MULTIPLE_NODES > +#ifdef CONFIG_NUMA > int node = early_cpu_to_node(cpu); > void *ptr; > > diff --git a/arch/powerpc/kernel/smp.c b/arch/powerpc/kernel/smp.c > index 2e05c783440a..a5209ea3859e 100644 > --- a/arch/powerpc/kernel/smp.c > +++ b/arch/powerpc/kernel/smp.c > @@ -1047,7 +1047,7 @@ void __init smp_prepare_cpus(unsigned int max_cpus) > zalloc_cpumask_var_node(&per_cpu(cpu_coregroup_map, cpu), > GFP_KERNEL, cpu_to_node(cpu)); > > -#ifdef CONFIG_NEED_MULTIPLE_NODES > +#ifdef CONFIG_NUMA > /* > * numa_node_id() works after this. > */ > diff --git a/arch/powerpc/kexec/core.c b/arch/powerpc/kexec/core.c > index 56da5eb2b923..48525e8b5730 100644 > --- a/arch/powerpc/kexec/core.c > +++ b/arch/powerpc/kexec/core.c > @@ -68,11 +68,11 @@ void machine_kexec_cleanup(struct kimage *image) > void arch_crash_save_vmcoreinfo(void) > { > > -#ifdef CONFIG_NEED_MULTIPLE_NODES > +#ifdef CONFIG_NUMA > VMCOREINFO_SYMBOL(node_data); > VMCOREINFO_LENGTH(node_data, MAX_NUMNODES); > #endif > -#ifndef CONFIG_NEED_MULTIPLE_NODES > +#ifndef CONFIG_NUMA > VMCOREINFO_SYMBOL(contig_page_data); > #endif > #if defined(CONFIG_PPC64) && defined(CONFIG_SPARSEMEM_VMEMMAP) > diff --git a/arch/powerpc/mm/Makefile b/arch/powerpc/mm/Makefile > index c3df3a8501d4..2ffcf540f08b 100644 > --- a/arch/powerpc/mm/Makefile > +++ b/arch/powerpc/mm/Makefile > @@ -13,7 +13,7 @@ obj-y := fault.o mem.o pgtable.o mmap.o maccess.o \ > obj-$(CONFIG_PPC_MMU_NOHASH) += nohash/ > obj-$(CONFIG_PPC_BOOK3S_32) += book3s32/ > obj-$(CONFIG_PPC_BOOK3S_64) += book3s64/ > -obj-$(CONFIG_NEED_MULTIPLE_NODES) += numa.o > +obj-$(CONFIG_NUMA) += numa.o > obj-$(CONFIG_PPC_MM_SLICES) += slice.o > obj-$(CONFIG_HUGETLB_PAGE) += hugetlbpage.o > obj-$(CONFIG_NOT_COHERENT_CACHE) += dma-noncoherent.o > diff --git a/arch/powerpc/mm/mem.c b/arch/powerpc/mm/mem.c > index 043bbeaf407c..7a266991315f 100644 > --- a/arch/powerpc/mm/mem.c > +++ b/arch/powerpc/mm/mem.c > @@ -126,7 +126,7 @@ void __ref arch_remove_memory(int nid, u64 start, u64 size, > } > #endif > > -#ifndef CONFIG_NEED_MULTIPLE_NODES > +#ifndef CONFIG_NUMA > void __init mem_topology_setup(void) > { > max_low_pfn = max_pfn = memblock_end_of_DRAM() >> PAGE_SHIFT; > @@ -161,7 +161,7 @@ static int __init mark_nonram_nosave(void) > > return 0; > } > -#else /* CONFIG_NEED_MULTIPLE_NODES */ > +#else /* CONFIG_NUMA */ > static int __init mark_nonram_nosave(void) > { > return 0; > diff --git a/arch/riscv/Kconfig b/arch/riscv/Kconfig > index a8ad8eb76120..e985dbf9ff27 100644 > --- a/arch/riscv/Kconfig > +++ b/arch/riscv/Kconfig > @@ -331,7 +331,7 @@ config NODES_SHIFT > int "Maximum NUMA Nodes (as a power of 2)" > range 1 10 > default "2" > - depends on NEED_MULTIPLE_NODES > + depends on NUMA > help > Specify the maximum number of NUMA Nodes available on the target > system. Increases memory reserved to accommodate various tables. > diff --git a/arch/s390/Kconfig b/arch/s390/Kconfig > index b4c7c34069f8..707afbcd81c2 100644 > --- a/arch/s390/Kconfig > +++ b/arch/s390/Kconfig > @@ -475,7 +475,7 @@ config NUMA > > config NODES_SHIFT > int > - depends on NEED_MULTIPLE_NODES > + depends on NUMA > default "1" > > config SCHED_SMT > diff --git a/arch/sh/include/asm/mmzone.h b/arch/sh/include/asm/mmzone.h > index 6552a088dc97..7b8dead2723d 100644 > --- a/arch/sh/include/asm/mmzone.h > +++ b/arch/sh/include/asm/mmzone.h > @@ -2,7 +2,7 @@ > #ifndef __ASM_SH_MMZONE_H > #define __ASM_SH_MMZONE_H > > -#ifdef CONFIG_NEED_MULTIPLE_NODES > +#ifdef CONFIG_NUMA > #include > > extern struct pglist_data *node_data[]; > @@ -31,7 +31,7 @@ static inline void > setup_bootmem_node(int nid, unsigned long start, unsigned long end) > { > } > -#endif /* CONFIG_NEED_MULTIPLE_NODES */ > +#endif /* CONFIG_NUMA */ > > /* Platform specific mem init */ > void __init plat_mem_setup(void); > diff --git a/arch/sh/kernel/topology.c b/arch/sh/kernel/topology.c > index 7a989eed3b18..76af6db9daa2 100644 > --- a/arch/sh/kernel/topology.c > +++ b/arch/sh/kernel/topology.c > @@ -46,7 +46,7 @@ static int __init topology_init(void) > { > int i, ret; > > -#ifdef CONFIG_NEED_MULTIPLE_NODES > +#ifdef CONFIG_NUMA > for_each_online_node(i) > register_one_node(i); > #endif > diff --git a/arch/sh/mm/Kconfig b/arch/sh/mm/Kconfig > index d551a9cac41e..ba569cfb4368 100644 > --- a/arch/sh/mm/Kconfig > +++ b/arch/sh/mm/Kconfig > @@ -120,7 +120,7 @@ config NODES_SHIFT > int > default "3" if CPU_SUBTYPE_SHX3 > default "1" > - depends on NEED_MULTIPLE_NODES > + depends on NUMA > > config ARCH_FLATMEM_ENABLE > def_bool y > diff --git a/arch/sh/mm/init.c b/arch/sh/mm/init.c > index 168d7d4dd735..ce26c7f8950a 100644 > --- a/arch/sh/mm/init.c > +++ b/arch/sh/mm/init.c > @@ -211,7 +211,7 @@ void __init allocate_pgdat(unsigned int nid) > > get_pfn_range_for_nid(nid, &start_pfn, &end_pfn); > > -#ifdef CONFIG_NEED_MULTIPLE_NODES > +#ifdef CONFIG_NUMA > NODE_DATA(nid) = memblock_alloc_try_nid( > sizeof(struct pglist_data), > SMP_CACHE_BYTES, MEMBLOCK_LOW_LIMIT, > diff --git a/arch/sparc/Kconfig b/arch/sparc/Kconfig > index 164a5254c91c..c72f52c704cd 100644 > --- a/arch/sparc/Kconfig > +++ b/arch/sparc/Kconfig > @@ -265,7 +265,7 @@ config NODES_SHIFT > int "Maximum NUMA Nodes (as a power of 2)" > range 4 5 if SPARC64 > default "5" > - depends on NEED_MULTIPLE_NODES > + depends on NUMA > help > Specify the maximum number of NUMA Nodes available on the target > system. Increases memory reserved to accommodate various tables. > diff --git a/arch/sparc/include/asm/mmzone.h b/arch/sparc/include/asm/mmzone.h > index 6543fb97a849..a236d8aa893a 100644 > --- a/arch/sparc/include/asm/mmzone.h > +++ b/arch/sparc/include/asm/mmzone.h > @@ -2,7 +2,7 @@ > #ifndef _SPARC64_MMZONE_H > #define _SPARC64_MMZONE_H > > -#ifdef CONFIG_NEED_MULTIPLE_NODES > +#ifdef CONFIG_NUMA > > #include > > @@ -13,6 +13,6 @@ extern struct pglist_data *node_data[]; > extern int numa_cpu_lookup_table[]; > extern cpumask_t numa_cpumask_lookup_table[]; > > -#endif /* CONFIG_NEED_MULTIPLE_NODES */ > +#endif /* CONFIG_NUMA */ > > #endif /* _SPARC64_MMZONE_H */ > diff --git a/arch/sparc/kernel/smp_64.c b/arch/sparc/kernel/smp_64.c > index e38d8bf454e8..c89a5971fb0d 100644 > --- a/arch/sparc/kernel/smp_64.c > +++ b/arch/sparc/kernel/smp_64.c > @@ -1546,7 +1546,7 @@ static void * __init pcpu_alloc_bootmem(unsigned int cpu, size_t size, > size_t align) > { > const unsigned long goal = __pa(MAX_DMA_ADDRESS); > -#ifdef CONFIG_NEED_MULTIPLE_NODES > +#ifdef CONFIG_NUMA > int node = cpu_to_node(cpu); > void *ptr; > > diff --git a/arch/sparc/mm/init_64.c b/arch/sparc/mm/init_64.c > index e454f179cf5d..06e938d03f3b 100644 > --- a/arch/sparc/mm/init_64.c > +++ b/arch/sparc/mm/init_64.c > @@ -903,7 +903,7 @@ struct node_mem_mask { > static struct node_mem_mask node_masks[MAX_NUMNODES]; > static int num_node_masks; > > -#ifdef CONFIG_NEED_MULTIPLE_NODES > +#ifdef CONFIG_NUMA > > struct mdesc_mlgroup { > u64 node; > @@ -1059,7 +1059,7 @@ static void __init allocate_node_data(int nid) > { > struct pglist_data *p; > unsigned long start_pfn, end_pfn; > -#ifdef CONFIG_NEED_MULTIPLE_NODES > +#ifdef CONFIG_NUMA > > NODE_DATA(nid) = memblock_alloc_node(sizeof(struct pglist_data), > SMP_CACHE_BYTES, nid); > @@ -1080,7 +1080,7 @@ static void __init allocate_node_data(int nid) > > static void init_node_masks_nonnuma(void) > { > -#ifdef CONFIG_NEED_MULTIPLE_NODES > +#ifdef CONFIG_NUMA > int i; > #endif > > @@ -1090,7 +1090,7 @@ static void init_node_masks_nonnuma(void) > node_masks[0].match = 0; > num_node_masks = 1; > > -#ifdef CONFIG_NEED_MULTIPLE_NODES > +#ifdef CONFIG_NUMA > for (i = 0; i < NR_CPUS; i++) > numa_cpu_lookup_table[i] = 0; > > @@ -1098,7 +1098,7 @@ static void init_node_masks_nonnuma(void) > #endif > } > > -#ifdef CONFIG_NEED_MULTIPLE_NODES > +#ifdef CONFIG_NUMA > struct pglist_data *node_data[MAX_NUMNODES]; > > EXPORT_SYMBOL(numa_cpu_lookup_table); > @@ -2487,7 +2487,7 @@ int page_in_phys_avail(unsigned long paddr) > > static void __init register_page_bootmem_info(void) > { > -#ifdef CONFIG_NEED_MULTIPLE_NODES > +#ifdef CONFIG_NUMA > int i; > > for_each_online_node(i) > diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig > index 0045e1b44190..5d523ff70fe7 100644 > --- a/arch/x86/Kconfig > +++ b/arch/x86/Kconfig > @@ -1597,7 +1597,7 @@ config NODES_SHIFT > default "10" if MAXSMP > default "6" if X86_64 > default "3" > - depends on NEED_MULTIPLE_NODES > + depends on NUMA > help > Specify the maximum number of NUMA Nodes available on the target > system. Increases memory reserved to accommodate various tables. > diff --git a/arch/x86/kernel/setup_percpu.c b/arch/x86/kernel/setup_percpu.c > index 0941d2f44f2a..78a32b956e81 100644 > --- a/arch/x86/kernel/setup_percpu.c > +++ b/arch/x86/kernel/setup_percpu.c > @@ -66,7 +66,7 @@ EXPORT_SYMBOL(__per_cpu_offset); > */ > static bool __init pcpu_need_numa(void) > { > -#ifdef CONFIG_NEED_MULTIPLE_NODES > +#ifdef CONFIG_NUMA > pg_data_t *last = NULL; > unsigned int cpu; > > @@ -101,7 +101,7 @@ static void * __init pcpu_alloc_bootmem(unsigned int cpu, unsigned long size, > unsigned long align) > { > const unsigned long goal = __pa(MAX_DMA_ADDRESS); > -#ifdef CONFIG_NEED_MULTIPLE_NODES > +#ifdef CONFIG_NUMA > int node = early_cpu_to_node(cpu); > void *ptr; > > @@ -140,7 +140,7 @@ static void __init pcpu_fc_free(void *ptr, size_t size) > > static int __init pcpu_cpu_distance(unsigned int from, unsigned int to) > { > -#ifdef CONFIG_NEED_MULTIPLE_NODES > +#ifdef CONFIG_NUMA > if (early_cpu_to_node(from) = early_cpu_to_node(to)) > return LOCAL_DISTANCE; > else > diff --git a/arch/x86/mm/init_32.c b/arch/x86/mm/init_32.c > index 21ffb03f6c72..74b78840182d 100644 > --- a/arch/x86/mm/init_32.c > +++ b/arch/x86/mm/init_32.c > @@ -651,7 +651,7 @@ void __init find_low_pfn_range(void) > highmem_pfn_init(); > } > > -#ifndef CONFIG_NEED_MULTIPLE_NODES > +#ifndef CONFIG_NUMA > void __init initmem_init(void) > { > #ifdef CONFIG_HIGHMEM > @@ -677,7 +677,7 @@ void __init initmem_init(void) > > setup_bootmem_allocator(); > } > -#endif /* !CONFIG_NEED_MULTIPLE_NODES */ > +#endif /* !CONFIG_NUMA */ > > void __init setup_bootmem_allocator(void) > { > diff --git a/include/asm-generic/topology.h b/include/asm-generic/topology.h > index 5aa8705df87e..4dbe715be65b 100644 > --- a/include/asm-generic/topology.h > +++ b/include/asm-generic/topology.h > @@ -45,7 +45,7 @@ > #endif > > #ifndef cpumask_of_node > - #ifdef CONFIG_NEED_MULTIPLE_NODES > + #ifdef CONFIG_NUMA > #define cpumask_of_node(node) ((node) = 0 ? cpu_online_mask : cpu_none_mask) > #else > #define cpumask_of_node(node) ((void)(node), cpu_online_mask) > diff --git a/include/linux/memblock.h b/include/linux/memblock.h > index 5984fff3f175..552309342c38 100644 > --- a/include/linux/memblock.h > +++ b/include/linux/memblock.h > @@ -50,7 +50,7 @@ struct memblock_region { > phys_addr_t base; > phys_addr_t size; > enum memblock_flags flags; > -#ifdef CONFIG_NEED_MULTIPLE_NODES > +#ifdef CONFIG_NUMA > int nid; > #endif > }; > @@ -347,7 +347,7 @@ int __init deferred_page_init_max_threads(const struct cpumask *node_cpumask); > int memblock_set_node(phys_addr_t base, phys_addr_t size, > struct memblock_type *type, int nid); > > -#ifdef CONFIG_NEED_MULTIPLE_NODES > +#ifdef CONFIG_NUMA > static inline void memblock_set_region_node(struct memblock_region *r, int nid) > { > r->nid = nid; > @@ -366,7 +366,7 @@ static inline int memblock_get_region_node(const struct memblock_region *r) > { > return 0; > } > -#endif /* CONFIG_NEED_MULTIPLE_NODES */ > +#endif /* CONFIG_NUMA */ > > /* Flags for memblock allocation APIs */ > #define MEMBLOCK_ALLOC_ANYWHERE (~(phys_addr_t)0) > diff --git a/include/linux/mm.h b/include/linux/mm.h > index c274f75efcf9..cf66f0ea7956 100644 > --- a/include/linux/mm.h > +++ b/include/linux/mm.h > @@ -46,7 +46,7 @@ extern int sysctl_page_lock_unfairness; > > void init_mm_internals(void); > > -#ifndef CONFIG_NEED_MULTIPLE_NODES /* Don't use mapnrs, do it properly */ > +#ifndef CONFIG_NUMA /* Don't use mapnrs, do it properly */ > extern unsigned long max_mapnr; > > static inline void set_max_mapnr(unsigned long limit) > @@ -2457,7 +2457,7 @@ extern void get_pfn_range_for_nid(unsigned int nid, > unsigned long *start_pfn, unsigned long *end_pfn); > extern unsigned long find_min_pfn_with_active_regions(void); > > -#ifndef CONFIG_NEED_MULTIPLE_NODES > +#ifndef CONFIG_NUMA > static inline int early_pfn_to_nid(unsigned long pfn) > { > return 0; > diff --git a/include/linux/mmzone.h b/include/linux/mmzone.h > index 2b41e252a995..ad42f440c704 100644 > --- a/include/linux/mmzone.h > +++ b/include/linux/mmzone.h > @@ -985,7 +985,7 @@ extern int movable_zone; > #ifdef CONFIG_HIGHMEM > static inline int zone_movable_is_highmem(void) > { > -#ifdef CONFIG_NEED_MULTIPLE_NODES > +#ifdef CONFIG_NUMA > return movable_zone = ZONE_HIGHMEM; > #else > return (ZONE_MOVABLE - 1) = ZONE_HIGHMEM; > @@ -1041,17 +1041,17 @@ extern int percpu_pagelist_fraction; > extern char numa_zonelist_order[]; > #define NUMA_ZONELIST_ORDER_LEN 16 > > -#ifndef CONFIG_NEED_MULTIPLE_NODES > +#ifndef CONFIG_NUMA > > extern struct pglist_data contig_page_data; > #define NODE_DATA(nid) (&contig_page_data) > #define NODE_MEM_MAP(nid) mem_map > > -#else /* CONFIG_NEED_MULTIPLE_NODES */ > +#else /* CONFIG_NUMA */ > > #include > > -#endif /* !CONFIG_NEED_MULTIPLE_NODES */ > +#endif /* !CONFIG_NUMA */ > > extern struct pglist_data *first_online_pgdat(void); > extern struct pglist_data *next_online_pgdat(struct pglist_data *pgdat); > diff --git a/kernel/crash_core.c b/kernel/crash_core.c > index 825284baaf46..53eb8bc6026d 100644 > --- a/kernel/crash_core.c > +++ b/kernel/crash_core.c > @@ -455,7 +455,7 @@ static int __init crash_save_vmcoreinfo_init(void) > VMCOREINFO_SYMBOL(_stext); > VMCOREINFO_SYMBOL(vmap_area_list); > > -#ifndef CONFIG_NEED_MULTIPLE_NODES > +#ifndef CONFIG_NUMA > VMCOREINFO_SYMBOL(mem_map); > VMCOREINFO_SYMBOL(contig_page_data); > #endif > diff --git a/mm/Kconfig b/mm/Kconfig > index 218b96ccc84a..bffe4bd859f3 100644 > --- a/mm/Kconfig > +++ b/mm/Kconfig > @@ -59,15 +59,6 @@ config FLAT_NODE_MEM_MAP > def_bool y > depends on !SPARSEMEM > > -# > -# Both the NUMA code and DISCONTIGMEM use arrays of pg_data_t's > -# to represent different areas of memory. This variable allows > -# those dependencies to exist individually. > -# > -config NEED_MULTIPLE_NODES > - def_bool y > - depends on NUMA > - > # > # SPARSEMEM_EXTREME (which is the default) does some bootmem > # allocations when sparse_init() is called. If this cannot > diff --git a/mm/memblock.c b/mm/memblock.c > index afaefa8fc6ab..123feef5259d 100644 > --- a/mm/memblock.c > +++ b/mm/memblock.c > @@ -92,7 +92,7 @@ > * system initialization completes. > */ > > -#ifndef CONFIG_NEED_MULTIPLE_NODES > +#ifndef CONFIG_NUMA > struct pglist_data __refdata contig_page_data; > EXPORT_SYMBOL(contig_page_data); > #endif > @@ -607,7 +607,7 @@ static int __init_memblock memblock_add_range(struct memblock_type *type, > * area, insert that portion. > */ > if (rbase > base) { > -#ifdef CONFIG_NEED_MULTIPLE_NODES > +#ifdef CONFIG_NUMA > WARN_ON(nid != memblock_get_region_node(rgn)); > #endif > WARN_ON(flags != rgn->flags); > @@ -1205,7 +1205,7 @@ void __init_memblock __next_mem_pfn_range(int *idx, int nid, > int __init_memblock memblock_set_node(phys_addr_t base, phys_addr_t size, > struct memblock_type *type, int nid) > { > -#ifdef CONFIG_NEED_MULTIPLE_NODES > +#ifdef CONFIG_NUMA > int start_rgn, end_rgn; > int i, ret; > > @@ -1849,7 +1849,7 @@ static void __init_memblock memblock_dump(struct memblock_type *type) > size = rgn->size; > end = base + size - 1; > flags = rgn->flags; > -#ifdef CONFIG_NEED_MULTIPLE_NODES > +#ifdef CONFIG_NUMA > if (memblock_get_region_node(rgn) != MAX_NUMNODES) > snprintf(nid_buf, sizeof(nid_buf), " on node %d", > memblock_get_region_node(rgn)); > diff --git a/mm/page_alloc.c b/mm/page_alloc.c > index 6fc22482eaa8..8f08135d3eb4 100644 > --- a/mm/page_alloc.c > +++ b/mm/page_alloc.c > @@ -1596,7 +1596,7 @@ void __free_pages_core(struct page *page, unsigned int order) > __free_pages_ok(page, order, FPI_TO_TAIL | FPI_SKIP_KASAN_POISON); > } > > -#ifdef CONFIG_NEED_MULTIPLE_NODES > +#ifdef CONFIG_NUMA > > /* > * During memory init memblocks map pfns to nids. The search is expensive and > @@ -1646,7 +1646,7 @@ int __meminit early_pfn_to_nid(unsigned long pfn) > > return nid; > } > -#endif /* CONFIG_NEED_MULTIPLE_NODES */ > +#endif /* CONFIG_NUMA */ > > void __init memblock_free_pages(struct page *page, unsigned long pfn, > unsigned int order) > @@ -7276,7 +7276,7 @@ static void __ref alloc_node_mem_map(struct pglist_data *pgdat) > pr_debug("%s: node %d, pgdat %08lx, node_mem_map %08lx\n", > __func__, pgdat->node_id, (unsigned long)pgdat, > (unsigned long)pgdat->node_mem_map); > -#ifndef CONFIG_NEED_MULTIPLE_NODES > +#ifndef CONFIG_NUMA > /* > * With no DISCONTIG, the global mem_map is just set as node 0's > */ > Nice Acked-by: David Hildenbrand -- Thanks, David / dhildenb From mboxrd@z Thu Jan 1 00:00:00 1970 From: David Hildenbrand Subject: Re: [PATCH 8/9] mm: replace CONFIG_NEED_MULTIPLE_NODES with CONFIG_NUMA Date: Wed, 9 Jun 2021 12:56:59 +0200 Message-ID: <450360f3-0d8d-651d-9f8b-ce6f13a881c4@redhat.com> References: <20210602105348.13387-1-rppt@kernel.org> <20210602105348.13387-9-rppt@kernel.org> Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Return-path: DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1623236224; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=1FvxnKPfDfM/0QN9kSJy74v8JuVnkBg3G7v6vsc/x3c=; b=FPxTLNVK8/iumttqXzLWn8TpyEfDS9xkPcKf+6gj2Xx+FvHA+p2jZZ0g0A0d1YhpCbLE63 8f3k6jPTGgQDt3nsdUsGruH2zsTH6J8WC9znem3SRW+OQftqnN5BlvL+IIrAgnxnDyjqSz chi/LnO0lYW9gVQFcAOOGHcMjngCsjY= In-Reply-To: <20210602105348.13387-9-rppt@kernel.org> Content-Language: en-US List-ID: Content-Type: text/plain; charset="us-ascii"; format="flowed" To: Mike Rapoport , Andrew Morton Cc: Arnd Bergmann , Geert Uytterhoeven , Ivan Kokshaysky , Jonathan Corbet , Matt Turner , Mike Rapoport , Richard Henderson , Vineet Gupta , kexec@lists.infradead.org, linux-alpha@vger.kernel.org, linux-arch@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-doc@vger.kernel.org, linux-ia64@vger.kernel.org, linux-kernel@vger.kernel.org, linux-m68k@lists.linux-m68k.org, linux-mips@vger.kernel.org, linux-mm@kvack.org, linux-riscv@lists.infradead.org, linux-s390@vger.kernel.org, linux-sh@vger.kernel.org, linux-snps-arc@lists.infradead.org, linux-xtensa@linux-xtensa.org, linuxppc-dev@lists.ozlabs.org, sparclin On 02.06.21 12:53, Mike Rapoport wrote: > From: Mike Rapoport > > After removal of DISCINTIGMEM the NEED_MULTIPLE_NODES and NUMA > configuration options are equivalent. > > Drop CONFIG_NEED_MULTIPLE_NODES and use CONFIG_NUMA instead. > > Done with > > $ sed -i 's/CONFIG_NEED_MULTIPLE_NODES/CONFIG_NUMA/' \ > $(git grep -wl CONFIG_NEED_MULTIPLE_NODES) > $ sed -i 's/NEED_MULTIPLE_NODES/NUMA/' \ > $(git grep -wl NEED_MULTIPLE_NODES) > > with manual tweaks afterwards. > > Signed-off-by: Mike Rapoport > --- > arch/arm64/Kconfig | 2 +- > arch/ia64/Kconfig | 2 +- > arch/mips/Kconfig | 2 +- > arch/mips/include/asm/mmzone.h | 2 +- > arch/mips/include/asm/page.h | 2 +- > arch/mips/mm/init.c | 4 ++-- > arch/powerpc/Kconfig | 2 +- > arch/powerpc/include/asm/mmzone.h | 4 ++-- > arch/powerpc/kernel/setup_64.c | 2 +- > arch/powerpc/kernel/smp.c | 2 +- > arch/powerpc/kexec/core.c | 4 ++-- > arch/powerpc/mm/Makefile | 2 +- > arch/powerpc/mm/mem.c | 4 ++-- > arch/riscv/Kconfig | 2 +- > arch/s390/Kconfig | 2 +- > arch/sh/include/asm/mmzone.h | 4 ++-- > arch/sh/kernel/topology.c | 2 +- > arch/sh/mm/Kconfig | 2 +- > arch/sh/mm/init.c | 2 +- > arch/sparc/Kconfig | 2 +- > arch/sparc/include/asm/mmzone.h | 4 ++-- > arch/sparc/kernel/smp_64.c | 2 +- > arch/sparc/mm/init_64.c | 12 ++++++------ > arch/x86/Kconfig | 2 +- > arch/x86/kernel/setup_percpu.c | 6 +++--- > arch/x86/mm/init_32.c | 4 ++-- > include/asm-generic/topology.h | 2 +- > include/linux/memblock.h | 6 +++--- > include/linux/mm.h | 4 ++-- > include/linux/mmzone.h | 8 ++++---- > kernel/crash_core.c | 2 +- > mm/Kconfig | 9 --------- > mm/memblock.c | 8 ++++---- > mm/page_alloc.c | 6 +++--- > 34 files changed, 58 insertions(+), 67 deletions(-) > > diff --git a/arch/arm64/Kconfig b/arch/arm64/Kconfig > index 9f1d8566bbf9..d01a1545ab8f 100644 > --- a/arch/arm64/Kconfig > +++ b/arch/arm64/Kconfig > @@ -1035,7 +1035,7 @@ config NODES_SHIFT > int "Maximum NUMA Nodes (as a power of 2)" > range 1 10 > default "4" > - depends on NEED_MULTIPLE_NODES > + depends on NUMA > help > Specify the maximum number of NUMA Nodes available on the target > system. Increases memory reserved to accommodate various tables. > diff --git a/arch/ia64/Kconfig b/arch/ia64/Kconfig > index 279252e3e0f7..da22a35e6f03 100644 > --- a/arch/ia64/Kconfig > +++ b/arch/ia64/Kconfig > @@ -302,7 +302,7 @@ config NODES_SHIFT > int "Max num nodes shift(3-10)" > range 3 10 > default "10" > - depends on NEED_MULTIPLE_NODES > + depends on NUMA > help > This option specifies the maximum number of nodes in your SSI system. > MAX_NUMNODES will be 2^(This value). > diff --git a/arch/mips/Kconfig b/arch/mips/Kconfig > index ed51970c08e7..4704a16c2e44 100644 > --- a/arch/mips/Kconfig > +++ b/arch/mips/Kconfig > @@ -2867,7 +2867,7 @@ config RANDOMIZE_BASE_MAX_OFFSET > config NODES_SHIFT > int > default "6" > - depends on NEED_MULTIPLE_NODES > + depends on NUMA > > config HW_PERF_EVENTS > bool "Enable hardware performance counter support for perf events" > diff --git a/arch/mips/include/asm/mmzone.h b/arch/mips/include/asm/mmzone.h > index 7649ab45e80c..602a21aee9d4 100644 > --- a/arch/mips/include/asm/mmzone.h > +++ b/arch/mips/include/asm/mmzone.h > @@ -8,7 +8,7 @@ > > #include > > -#ifdef CONFIG_NEED_MULTIPLE_NODES > +#ifdef CONFIG_NUMA > # include > #endif > > diff --git a/arch/mips/include/asm/page.h b/arch/mips/include/asm/page.h > index 195ff4e9771f..96bc798c1ec1 100644 > --- a/arch/mips/include/asm/page.h > +++ b/arch/mips/include/asm/page.h > @@ -239,7 +239,7 @@ static inline int pfn_valid(unsigned long pfn) > > /* pfn_valid is defined in linux/mmzone.h */ > > -#elif defined(CONFIG_NEED_MULTIPLE_NODES) > +#elif defined(CONFIG_NUMA) > > #define pfn_valid(pfn) \ > ({ \ > diff --git a/arch/mips/mm/init.c b/arch/mips/mm/init.c > index 97f6ca341448..19347dc6bbf8 100644 > --- a/arch/mips/mm/init.c > +++ b/arch/mips/mm/init.c > @@ -394,7 +394,7 @@ void maar_init(void) > } > } > > -#ifndef CONFIG_NEED_MULTIPLE_NODES > +#ifndef CONFIG_NUMA > void __init paging_init(void) > { > unsigned long max_zone_pfns[MAX_NR_ZONES]; > @@ -473,7 +473,7 @@ void __init mem_init(void) > 0x80000000 - 4, KCORE_TEXT); > #endif > } > -#endif /* !CONFIG_NEED_MULTIPLE_NODES */ > +#endif /* !CONFIG_NUMA */ > > void free_init_pages(const char *what, unsigned long begin, unsigned long end) > { > diff --git a/arch/powerpc/Kconfig b/arch/powerpc/Kconfig > index 088dd2afcfe4..14b132cf95e2 100644 > --- a/arch/powerpc/Kconfig > +++ b/arch/powerpc/Kconfig > @@ -671,7 +671,7 @@ config NODES_SHIFT > int > default "8" if PPC64 > default "4" > - depends on NEED_MULTIPLE_NODES > + depends on NUMA > > config USE_PERCPU_NUMA_NODE_ID > def_bool y > diff --git a/arch/powerpc/include/asm/mmzone.h b/arch/powerpc/include/asm/mmzone.h > index 6cda76b57c5d..4c6c6dbd182f 100644 > --- a/arch/powerpc/include/asm/mmzone.h > +++ b/arch/powerpc/include/asm/mmzone.h > @@ -18,7 +18,7 @@ > * flags field of the struct page > */ > > -#ifdef CONFIG_NEED_MULTIPLE_NODES > +#ifdef CONFIG_NUMA > > extern struct pglist_data *node_data[]; > /* > @@ -41,7 +41,7 @@ u64 memory_hotplug_max(void); > > #else > #define memory_hotplug_max() memblock_end_of_DRAM() > -#endif /* CONFIG_NEED_MULTIPLE_NODES */ > +#endif /* CONFIG_NUMA */ > #ifdef CONFIG_FA_DUMP > #define __HAVE_ARCH_RESERVED_KERNEL_PAGES > #endif > diff --git a/arch/powerpc/kernel/setup_64.c b/arch/powerpc/kernel/setup_64.c > index e42b85e4f1aa..a35fbf4d0bce 100644 > --- a/arch/powerpc/kernel/setup_64.c > +++ b/arch/powerpc/kernel/setup_64.c > @@ -788,7 +788,7 @@ static void * __init pcpu_alloc_bootmem(unsigned int cpu, size_t size, > size_t align) > { > const unsigned long goal = __pa(MAX_DMA_ADDRESS); > -#ifdef CONFIG_NEED_MULTIPLE_NODES > +#ifdef CONFIG_NUMA > int node = early_cpu_to_node(cpu); > void *ptr; > > diff --git a/arch/powerpc/kernel/smp.c b/arch/powerpc/kernel/smp.c > index 2e05c783440a..a5209ea3859e 100644 > --- a/arch/powerpc/kernel/smp.c > +++ b/arch/powerpc/kernel/smp.c > @@ -1047,7 +1047,7 @@ void __init smp_prepare_cpus(unsigned int max_cpus) > zalloc_cpumask_var_node(&per_cpu(cpu_coregroup_map, cpu), > GFP_KERNEL, cpu_to_node(cpu)); > > -#ifdef CONFIG_NEED_MULTIPLE_NODES > +#ifdef CONFIG_NUMA > /* > * numa_node_id() works after this. > */ > diff --git a/arch/powerpc/kexec/core.c b/arch/powerpc/kexec/core.c > index 56da5eb2b923..48525e8b5730 100644 > --- a/arch/powerpc/kexec/core.c > +++ b/arch/powerpc/kexec/core.c > @@ -68,11 +68,11 @@ void machine_kexec_cleanup(struct kimage *image) > void arch_crash_save_vmcoreinfo(void) > { > > -#ifdef CONFIG_NEED_MULTIPLE_NODES > +#ifdef CONFIG_NUMA > VMCOREINFO_SYMBOL(node_data); > VMCOREINFO_LENGTH(node_data, MAX_NUMNODES); > #endif > -#ifndef CONFIG_NEED_MULTIPLE_NODES > +#ifndef CONFIG_NUMA > VMCOREINFO_SYMBOL(contig_page_data); > #endif > #if defined(CONFIG_PPC64) && defined(CONFIG_SPARSEMEM_VMEMMAP) > diff --git a/arch/powerpc/mm/Makefile b/arch/powerpc/mm/Makefile > index c3df3a8501d4..2ffcf540f08b 100644 > --- a/arch/powerpc/mm/Makefile > +++ b/arch/powerpc/mm/Makefile > @@ -13,7 +13,7 @@ obj-y := fault.o mem.o pgtable.o mmap.o maccess.o \ > obj-$(CONFIG_PPC_MMU_NOHASH) += nohash/ > obj-$(CONFIG_PPC_BOOK3S_32) += book3s32/ > obj-$(CONFIG_PPC_BOOK3S_64) += book3s64/ > -obj-$(CONFIG_NEED_MULTIPLE_NODES) += numa.o > +obj-$(CONFIG_NUMA) += numa.o > obj-$(CONFIG_PPC_MM_SLICES) += slice.o > obj-$(CONFIG_HUGETLB_PAGE) += hugetlbpage.o > obj-$(CONFIG_NOT_COHERENT_CACHE) += dma-noncoherent.o > diff --git a/arch/powerpc/mm/mem.c b/arch/powerpc/mm/mem.c > index 043bbeaf407c..7a266991315f 100644 > --- a/arch/powerpc/mm/mem.c > +++ b/arch/powerpc/mm/mem.c > @@ -126,7 +126,7 @@ void __ref arch_remove_memory(int nid, u64 start, u64 size, > } > #endif > > -#ifndef CONFIG_NEED_MULTIPLE_NODES > +#ifndef CONFIG_NUMA > void __init mem_topology_setup(void) > { > max_low_pfn = max_pfn = memblock_end_of_DRAM() >> PAGE_SHIFT; > @@ -161,7 +161,7 @@ static int __init mark_nonram_nosave(void) > > return 0; > } > -#else /* CONFIG_NEED_MULTIPLE_NODES */ > +#else /* CONFIG_NUMA */ > static int __init mark_nonram_nosave(void) > { > return 0; > diff --git a/arch/riscv/Kconfig b/arch/riscv/Kconfig > index a8ad8eb76120..e985dbf9ff27 100644 > --- a/arch/riscv/Kconfig > +++ b/arch/riscv/Kconfig > @@ -331,7 +331,7 @@ config NODES_SHIFT > int "Maximum NUMA Nodes (as a power of 2)" > range 1 10 > default "2" > - depends on NEED_MULTIPLE_NODES > + depends on NUMA > help > Specify the maximum number of NUMA Nodes available on the target > system. Increases memory reserved to accommodate various tables. > diff --git a/arch/s390/Kconfig b/arch/s390/Kconfig > index b4c7c34069f8..707afbcd81c2 100644 > --- a/arch/s390/Kconfig > +++ b/arch/s390/Kconfig > @@ -475,7 +475,7 @@ config NUMA > > config NODES_SHIFT > int > - depends on NEED_MULTIPLE_NODES > + depends on NUMA > default "1" > > config SCHED_SMT > diff --git a/arch/sh/include/asm/mmzone.h b/arch/sh/include/asm/mmzone.h > index 6552a088dc97..7b8dead2723d 100644 > --- a/arch/sh/include/asm/mmzone.h > +++ b/arch/sh/include/asm/mmzone.h > @@ -2,7 +2,7 @@ > #ifndef __ASM_SH_MMZONE_H > #define __ASM_SH_MMZONE_H > > -#ifdef CONFIG_NEED_MULTIPLE_NODES > +#ifdef CONFIG_NUMA > #include > > extern struct pglist_data *node_data[]; > @@ -31,7 +31,7 @@ static inline void > setup_bootmem_node(int nid, unsigned long start, unsigned long end) > { > } > -#endif /* CONFIG_NEED_MULTIPLE_NODES */ > +#endif /* CONFIG_NUMA */ > > /* Platform specific mem init */ > void __init plat_mem_setup(void); > diff --git a/arch/sh/kernel/topology.c b/arch/sh/kernel/topology.c > index 7a989eed3b18..76af6db9daa2 100644 > --- a/arch/sh/kernel/topology.c > +++ b/arch/sh/kernel/topology.c > @@ -46,7 +46,7 @@ static int __init topology_init(void) > { > int i, ret; > > -#ifdef CONFIG_NEED_MULTIPLE_NODES > +#ifdef CONFIG_NUMA > for_each_online_node(i) > register_one_node(i); > #endif > diff --git a/arch/sh/mm/Kconfig b/arch/sh/mm/Kconfig > index d551a9cac41e..ba569cfb4368 100644 > --- a/arch/sh/mm/Kconfig > +++ b/arch/sh/mm/Kconfig > @@ -120,7 +120,7 @@ config NODES_SHIFT > int > default "3" if CPU_SUBTYPE_SHX3 > default "1" > - depends on NEED_MULTIPLE_NODES > + depends on NUMA > > config ARCH_FLATMEM_ENABLE > def_bool y > diff --git a/arch/sh/mm/init.c b/arch/sh/mm/init.c > index 168d7d4dd735..ce26c7f8950a 100644 > --- a/arch/sh/mm/init.c > +++ b/arch/sh/mm/init.c > @@ -211,7 +211,7 @@ void __init allocate_pgdat(unsigned int nid) > > get_pfn_range_for_nid(nid, &start_pfn, &end_pfn); > > -#ifdef CONFIG_NEED_MULTIPLE_NODES > +#ifdef CONFIG_NUMA > NODE_DATA(nid) = memblock_alloc_try_nid( > sizeof(struct pglist_data), > SMP_CACHE_BYTES, MEMBLOCK_LOW_LIMIT, > diff --git a/arch/sparc/Kconfig b/arch/sparc/Kconfig > index 164a5254c91c..c72f52c704cd 100644 > --- a/arch/sparc/Kconfig > +++ b/arch/sparc/Kconfig > @@ -265,7 +265,7 @@ config NODES_SHIFT > int "Maximum NUMA Nodes (as a power of 2)" > range 4 5 if SPARC64 > default "5" > - depends on NEED_MULTIPLE_NODES > + depends on NUMA > help > Specify the maximum number of NUMA Nodes available on the target > system. Increases memory reserved to accommodate various tables. > diff --git a/arch/sparc/include/asm/mmzone.h b/arch/sparc/include/asm/mmzone.h > index 6543fb97a849..a236d8aa893a 100644 > --- a/arch/sparc/include/asm/mmzone.h > +++ b/arch/sparc/include/asm/mmzone.h > @@ -2,7 +2,7 @@ > #ifndef _SPARC64_MMZONE_H > #define _SPARC64_MMZONE_H > > -#ifdef CONFIG_NEED_MULTIPLE_NODES > +#ifdef CONFIG_NUMA > > #include > > @@ -13,6 +13,6 @@ extern struct pglist_data *node_data[]; > extern int numa_cpu_lookup_table[]; > extern cpumask_t numa_cpumask_lookup_table[]; > > -#endif /* CONFIG_NEED_MULTIPLE_NODES */ > +#endif /* CONFIG_NUMA */ > > #endif /* _SPARC64_MMZONE_H */ > diff --git a/arch/sparc/kernel/smp_64.c b/arch/sparc/kernel/smp_64.c > index e38d8bf454e8..c89a5971fb0d 100644 > --- a/arch/sparc/kernel/smp_64.c > +++ b/arch/sparc/kernel/smp_64.c > @@ -1546,7 +1546,7 @@ static void * __init pcpu_alloc_bootmem(unsigned int cpu, size_t size, > size_t align) > { > const unsigned long goal = __pa(MAX_DMA_ADDRESS); > -#ifdef CONFIG_NEED_MULTIPLE_NODES > +#ifdef CONFIG_NUMA > int node = cpu_to_node(cpu); > void *ptr; > > diff --git a/arch/sparc/mm/init_64.c b/arch/sparc/mm/init_64.c > index e454f179cf5d..06e938d03f3b 100644 > --- a/arch/sparc/mm/init_64.c > +++ b/arch/sparc/mm/init_64.c > @@ -903,7 +903,7 @@ struct node_mem_mask { > static struct node_mem_mask node_masks[MAX_NUMNODES]; > static int num_node_masks; > > -#ifdef CONFIG_NEED_MULTIPLE_NODES > +#ifdef CONFIG_NUMA > > struct mdesc_mlgroup { > u64 node; > @@ -1059,7 +1059,7 @@ static void __init allocate_node_data(int nid) > { > struct pglist_data *p; > unsigned long start_pfn, end_pfn; > -#ifdef CONFIG_NEED_MULTIPLE_NODES > +#ifdef CONFIG_NUMA > > NODE_DATA(nid) = memblock_alloc_node(sizeof(struct pglist_data), > SMP_CACHE_BYTES, nid); > @@ -1080,7 +1080,7 @@ static void __init allocate_node_data(int nid) > > static void init_node_masks_nonnuma(void) > { > -#ifdef CONFIG_NEED_MULTIPLE_NODES > +#ifdef CONFIG_NUMA > int i; > #endif > > @@ -1090,7 +1090,7 @@ static void init_node_masks_nonnuma(void) > node_masks[0].match = 0; > num_node_masks = 1; > > -#ifdef CONFIG_NEED_MULTIPLE_NODES > +#ifdef CONFIG_NUMA > for (i = 0; i < NR_CPUS; i++) > numa_cpu_lookup_table[i] = 0; > > @@ -1098,7 +1098,7 @@ static void init_node_masks_nonnuma(void) > #endif > } > > -#ifdef CONFIG_NEED_MULTIPLE_NODES > +#ifdef CONFIG_NUMA > struct pglist_data *node_data[MAX_NUMNODES]; > > EXPORT_SYMBOL(numa_cpu_lookup_table); > @@ -2487,7 +2487,7 @@ int page_in_phys_avail(unsigned long paddr) > > static void __init register_page_bootmem_info(void) > { > -#ifdef CONFIG_NEED_MULTIPLE_NODES > +#ifdef CONFIG_NUMA > int i; > > for_each_online_node(i) > diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig > index 0045e1b44190..5d523ff70fe7 100644 > --- a/arch/x86/Kconfig > +++ b/arch/x86/Kconfig > @@ -1597,7 +1597,7 @@ config NODES_SHIFT > default "10" if MAXSMP > default "6" if X86_64 > default "3" > - depends on NEED_MULTIPLE_NODES > + depends on NUMA > help > Specify the maximum number of NUMA Nodes available on the target > system. Increases memory reserved to accommodate various tables. > diff --git a/arch/x86/kernel/setup_percpu.c b/arch/x86/kernel/setup_percpu.c > index 0941d2f44f2a..78a32b956e81 100644 > --- a/arch/x86/kernel/setup_percpu.c > +++ b/arch/x86/kernel/setup_percpu.c > @@ -66,7 +66,7 @@ EXPORT_SYMBOL(__per_cpu_offset); > */ > static bool __init pcpu_need_numa(void) > { > -#ifdef CONFIG_NEED_MULTIPLE_NODES > +#ifdef CONFIG_NUMA > pg_data_t *last = NULL; > unsigned int cpu; > > @@ -101,7 +101,7 @@ static void * __init pcpu_alloc_bootmem(unsigned int cpu, unsigned long size, > unsigned long align) > { > const unsigned long goal = __pa(MAX_DMA_ADDRESS); > -#ifdef CONFIG_NEED_MULTIPLE_NODES > +#ifdef CONFIG_NUMA > int node = early_cpu_to_node(cpu); > void *ptr; > > @@ -140,7 +140,7 @@ static void __init pcpu_fc_free(void *ptr, size_t size) > > static int __init pcpu_cpu_distance(unsigned int from, unsigned int to) > { > -#ifdef CONFIG_NEED_MULTIPLE_NODES > +#ifdef CONFIG_NUMA > if (early_cpu_to_node(from) == early_cpu_to_node(to)) > return LOCAL_DISTANCE; > else > diff --git a/arch/x86/mm/init_32.c b/arch/x86/mm/init_32.c > index 21ffb03f6c72..74b78840182d 100644 > --- a/arch/x86/mm/init_32.c > +++ b/arch/x86/mm/init_32.c > @@ -651,7 +651,7 @@ void __init find_low_pfn_range(void) > highmem_pfn_init(); > } > > -#ifndef CONFIG_NEED_MULTIPLE_NODES > +#ifndef CONFIG_NUMA > void __init initmem_init(void) > { > #ifdef CONFIG_HIGHMEM > @@ -677,7 +677,7 @@ void __init initmem_init(void) > > setup_bootmem_allocator(); > } > -#endif /* !CONFIG_NEED_MULTIPLE_NODES */ > +#endif /* !CONFIG_NUMA */ > > void __init setup_bootmem_allocator(void) > { > diff --git a/include/asm-generic/topology.h b/include/asm-generic/topology.h > index 5aa8705df87e..4dbe715be65b 100644 > --- a/include/asm-generic/topology.h > +++ b/include/asm-generic/topology.h > @@ -45,7 +45,7 @@ > #endif > > #ifndef cpumask_of_node > - #ifdef CONFIG_NEED_MULTIPLE_NODES > + #ifdef CONFIG_NUMA > #define cpumask_of_node(node) ((node) == 0 ? cpu_online_mask : cpu_none_mask) > #else > #define cpumask_of_node(node) ((void)(node), cpu_online_mask) > diff --git a/include/linux/memblock.h b/include/linux/memblock.h > index 5984fff3f175..552309342c38 100644 > --- a/include/linux/memblock.h > +++ b/include/linux/memblock.h > @@ -50,7 +50,7 @@ struct memblock_region { > phys_addr_t base; > phys_addr_t size; > enum memblock_flags flags; > -#ifdef CONFIG_NEED_MULTIPLE_NODES > +#ifdef CONFIG_NUMA > int nid; > #endif > }; > @@ -347,7 +347,7 @@ int __init deferred_page_init_max_threads(const struct cpumask *node_cpumask); > int memblock_set_node(phys_addr_t base, phys_addr_t size, > struct memblock_type *type, int nid); > > -#ifdef CONFIG_NEED_MULTIPLE_NODES > +#ifdef CONFIG_NUMA > static inline void memblock_set_region_node(struct memblock_region *r, int nid) > { > r->nid = nid; > @@ -366,7 +366,7 @@ static inline int memblock_get_region_node(const struct memblock_region *r) > { > return 0; > } > -#endif /* CONFIG_NEED_MULTIPLE_NODES */ > +#endif /* CONFIG_NUMA */ > > /* Flags for memblock allocation APIs */ > #define MEMBLOCK_ALLOC_ANYWHERE (~(phys_addr_t)0) > diff --git a/include/linux/mm.h b/include/linux/mm.h > index c274f75efcf9..cf66f0ea7956 100644 > --- a/include/linux/mm.h > +++ b/include/linux/mm.h > @@ -46,7 +46,7 @@ extern int sysctl_page_lock_unfairness; > > void init_mm_internals(void); > > -#ifndef CONFIG_NEED_MULTIPLE_NODES /* Don't use mapnrs, do it properly */ > +#ifndef CONFIG_NUMA /* Don't use mapnrs, do it properly */ > extern unsigned long max_mapnr; > > static inline void set_max_mapnr(unsigned long limit) > @@ -2457,7 +2457,7 @@ extern void get_pfn_range_for_nid(unsigned int nid, > unsigned long *start_pfn, unsigned long *end_pfn); > extern unsigned long find_min_pfn_with_active_regions(void); > > -#ifndef CONFIG_NEED_MULTIPLE_NODES > +#ifndef CONFIG_NUMA > static inline int early_pfn_to_nid(unsigned long pfn) > { > return 0; > diff --git a/include/linux/mmzone.h b/include/linux/mmzone.h > index 2b41e252a995..ad42f440c704 100644 > --- a/include/linux/mmzone.h > +++ b/include/linux/mmzone.h > @@ -985,7 +985,7 @@ extern int movable_zone; > #ifdef CONFIG_HIGHMEM > static inline int zone_movable_is_highmem(void) > { > -#ifdef CONFIG_NEED_MULTIPLE_NODES > +#ifdef CONFIG_NUMA > return movable_zone == ZONE_HIGHMEM; > #else > return (ZONE_MOVABLE - 1) == ZONE_HIGHMEM; > @@ -1041,17 +1041,17 @@ extern int percpu_pagelist_fraction; > extern char numa_zonelist_order[]; > #define NUMA_ZONELIST_ORDER_LEN 16 > > -#ifndef CONFIG_NEED_MULTIPLE_NODES > +#ifndef CONFIG_NUMA > > extern struct pglist_data contig_page_data; > #define NODE_DATA(nid) (&contig_page_data) > #define NODE_MEM_MAP(nid) mem_map > > -#else /* CONFIG_NEED_MULTIPLE_NODES */ > +#else /* CONFIG_NUMA */ > > #include > > -#endif /* !CONFIG_NEED_MULTIPLE_NODES */ > +#endif /* !CONFIG_NUMA */ > > extern struct pglist_data *first_online_pgdat(void); > extern struct pglist_data *next_online_pgdat(struct pglist_data *pgdat); > diff --git a/kernel/crash_core.c b/kernel/crash_core.c > index 825284baaf46..53eb8bc6026d 100644 > --- a/kernel/crash_core.c > +++ b/kernel/crash_core.c > @@ -455,7 +455,7 @@ static int __init crash_save_vmcoreinfo_init(void) > VMCOREINFO_SYMBOL(_stext); > VMCOREINFO_SYMBOL(vmap_area_list); > > -#ifndef CONFIG_NEED_MULTIPLE_NODES > +#ifndef CONFIG_NUMA > VMCOREINFO_SYMBOL(mem_map); > VMCOREINFO_SYMBOL(contig_page_data); > #endif > diff --git a/mm/Kconfig b/mm/Kconfig > index 218b96ccc84a..bffe4bd859f3 100644 > --- a/mm/Kconfig > +++ b/mm/Kconfig > @@ -59,15 +59,6 @@ config FLAT_NODE_MEM_MAP > def_bool y > depends on !SPARSEMEM > > -# > -# Both the NUMA code and DISCONTIGMEM use arrays of pg_data_t's > -# to represent different areas of memory. This variable allows > -# those dependencies to exist individually. > -# > -config NEED_MULTIPLE_NODES > - def_bool y > - depends on NUMA > - > # > # SPARSEMEM_EXTREME (which is the default) does some bootmem > # allocations when sparse_init() is called. If this cannot > diff --git a/mm/memblock.c b/mm/memblock.c > index afaefa8fc6ab..123feef5259d 100644 > --- a/mm/memblock.c > +++ b/mm/memblock.c > @@ -92,7 +92,7 @@ > * system initialization completes. > */ > > -#ifndef CONFIG_NEED_MULTIPLE_NODES > +#ifndef CONFIG_NUMA > struct pglist_data __refdata contig_page_data; > EXPORT_SYMBOL(contig_page_data); > #endif > @@ -607,7 +607,7 @@ static int __init_memblock memblock_add_range(struct memblock_type *type, > * area, insert that portion. > */ > if (rbase > base) { > -#ifdef CONFIG_NEED_MULTIPLE_NODES > +#ifdef CONFIG_NUMA > WARN_ON(nid != memblock_get_region_node(rgn)); > #endif > WARN_ON(flags != rgn->flags); > @@ -1205,7 +1205,7 @@ void __init_memblock __next_mem_pfn_range(int *idx, int nid, > int __init_memblock memblock_set_node(phys_addr_t base, phys_addr_t size, > struct memblock_type *type, int nid) > { > -#ifdef CONFIG_NEED_MULTIPLE_NODES > +#ifdef CONFIG_NUMA > int start_rgn, end_rgn; > int i, ret; > > @@ -1849,7 +1849,7 @@ static void __init_memblock memblock_dump(struct memblock_type *type) > size = rgn->size; > end = base + size - 1; > flags = rgn->flags; > -#ifdef CONFIG_NEED_MULTIPLE_NODES > +#ifdef CONFIG_NUMA > if (memblock_get_region_node(rgn) != MAX_NUMNODES) > snprintf(nid_buf, sizeof(nid_buf), " on node %d", > memblock_get_region_node(rgn)); > diff --git a/mm/page_alloc.c b/mm/page_alloc.c > index 6fc22482eaa8..8f08135d3eb4 100644 > --- a/mm/page_alloc.c > +++ b/mm/page_alloc.c > @@ -1596,7 +1596,7 @@ void __free_pages_core(struct page *page, unsigned int order) > __free_pages_ok(page, order, FPI_TO_TAIL | FPI_SKIP_KASAN_POISON); > } > > -#ifdef CONFIG_NEED_MULTIPLE_NODES > +#ifdef CONFIG_NUMA > > /* > * During memory init memblocks map pfns to nids. The search is expensive and > @@ -1646,7 +1646,7 @@ int __meminit early_pfn_to_nid(unsigned long pfn) > > return nid; > } > -#endif /* CONFIG_NEED_MULTIPLE_NODES */ > +#endif /* CONFIG_NUMA */ > > void __init memblock_free_pages(struct page *page, unsigned long pfn, > unsigned int order) > @@ -7276,7 +7276,7 @@ static void __ref alloc_node_mem_map(struct pglist_data *pgdat) > pr_debug("%s: node %d, pgdat %08lx, node_mem_map %08lx\n", > __func__, pgdat->node_id, (unsigned long)pgdat, > (unsigned long)pgdat->node_mem_map); > -#ifndef CONFIG_NEED_MULTIPLE_NODES > +#ifndef CONFIG_NUMA > /* > * With no DISCONTIG, the global mem_map is just set as node 0's > */ > Nice Acked-by: David Hildenbrand -- Thanks, David / dhildenb