Skip to contentSkip to conversation

mm-introduce-numa_memblks.patch removed from -mm tree

merged mm-stable Andrew Morton 1 participant 1 message Sep 4, 2024

lore
Share & tools
lore

Andrew Morton

author tree notice Applied
#0 lore raw

The quilt patch titled
Subject: mm: introduce numa_memblks
has been removed from the -mm tree. Its filename was
mm-introduce-numa_memblks.patch

This patch was dropped because it was merged into the mm-stable branch of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm

------------------------------------------------------
From: "Mike Rapoport (Microsoft)" <[email protected]>
Subject: mm: introduce numa_memblks
Date: Wed, 7 Aug 2024 09:41:01 +0300

Move code dealing with numa_memblks from arch/x86 to mm/ and add Kconfig options to let x86 select it in its Kconfig.

This code will be later reused by arch_numa.

No functional changes.

Cc Alexander Gordeev <[email protected]>
Cc Andreas Larsson <[email protected]>
Cc Arnd Bergmann <[email protected]>
Cc Borislav Petkov <[email protected]>
Cc Catalin Marinas <[email protected]>
Cc Christophe Leroy <[email protected]>
Cc Dave Hansen <[email protected]>
Cc Davidlohr Bueso <[email protected]>
Cc David S. Miller <[email protected]>
Cc Greg Kroah-Hartman <[email protected]>
Cc Heiko Carstens <[email protected]>
Cc Huacai Chen <[email protected]>
Cc Ingo Molnar <[email protected]>
Cc Jiaxun Yang <[email protected]>
Cc John Paul Adrian Glaubitz <[email protected]>
Cc Jonathan Corbet <[email protected]>
Cc Michael Ellerman <[email protected]>
Cc Palmer Dabbelt <[email protected]>
Cc Rafael J. Wysocki <[email protected]>
Cc Rob Herring (Arm) <[email protected]>
Cc Samuel Holland <[email protected]>
Cc Thomas Bogendoerfer <[email protected]>
Cc Thomas Gleixner <[email protected]>
Cc Vasily Gorbik <[email protected]>
Cc Will Deacon <[email protected]>

---

 arch/x86/Kconfig             |    1 
 arch/x86/include/asm/numa.h  |    3 
 arch/x86/mm/amdtopology.c    |    1 
 arch/x86/mm/numa.c           |  372 -------------------------------
 arch/x86/mm/numa_emulation.c |    1 
 arch/x86/mm/numa_internal.h  |   15 -
 drivers/acpi/numa/srat.c     |    1 
 drivers/of/of_numa.c         |    1 
 include/linux/numa_memblks.h |   35 +++
 mm/Kconfig                   |    3 
 mm/Makefile                  |    1 
 mm/numa_memblks.c            |  385 +++++++++++++++++++++++++++++++++
 12 files changed, 436 insertions(+), 383 deletions(-)
arch/x86/include/asm/numa.h renamed from arch/x86/include/asm/numa.h~mm-introduce-numa_memblks +0 -3
@@ -10,8 +10,6 @@
 
 #ifdef CONFIG_NUMA
 
-#define NR_NODE_MEMBLKS		(MAX_NUMNODES*2)
-
 extern int numa_off;
 
 /*
@@ -25,7 +23,6 @@ extern int numa_off;
 extern s16 __apicid_to_node[MAX_LOCAL_APIC];
 extern nodemask_t numa_nodes_parsed __initdata;
 
-extern int __init numa_add_memblk(int nodeid, u64 start, u64 end);
 extern void __init numa_set_distance(int from, int to, int distance);
 
 static inline void set_apicid_to_node(int apicid, s16 node)
arch/x86/Kconfig renamed from arch/x86/Kconfig~mm-introduce-numa_memblks +1 -0
@@ -296,6 +296,7 @@ config X86
 	select NEED_PER_CPU_EMBED_FIRST_CHUNK
 	select NEED_PER_CPU_PAGE_FIRST_CHUNK
 	select NEED_SG_DMA_LENGTH
+	select NUMA_MEMBLKS			if NUMA
 	select PCI_DOMAINS			if PCI
 	select PCI_LOCKLESS_CONFIG		if PCI
 	select PERF_EVENTS
arch/x86/mm/amdtopology.c renamed from arch/x86/mm/amdtopology.c~mm-introduce-numa_memblks +1 -0
@@ -12,6 +12,7 @@
 #include <linux/string.h>
 #include <linux/nodemask.h>
 #include <linux/memblock.h>
+#include <linux/numa_memblks.h>
 
 #include <asm/io.h>
 #include <linux/pci_ids.h>
arch/x86/mm/numa.c renamed from arch/x86/mm/numa.c~mm-introduce-numa_memblks +5 -367

402 lines not on this page · raw message

arch/x86/mm/numa_emulation.c renamed from arch/x86/mm/numa_emulation.c~mm-introduce-numa_memblks +1 -0
@@ -6,6 +6,7 @@
 #include <linux/errno.h>
 #include <linux/topology.h>
 #include <linux/memblock.h>
+#include <linux/numa_memblks.h>
 #include <asm/dma.h>
 
 #include "numa_internal.h"
arch/x86/mm/numa_internal.h renamed from arch/x86/mm/numa_internal.h~mm-introduce-numa_memblks +2 -13
@@ -5,23 +5,12 @@
 #include <linux/types.h>
 #include <asm/numa.h>
 
-struct numa_memblk {
-	u64			start;
-	u64			end;
-	int			nid;
-};
-
-struct numa_meminfo {
-	int			nr_blks;
-	struct numa_memblk	blk[NR_NODE_MEMBLKS];
-};
-
-void __init numa_remove_memblk_from(int idx, struct numa_meminfo *mi);
-int __init numa_cleanup_meminfo(struct numa_meminfo *mi);
 void __init numa_reset_distance(void);
 
 void __init x86_numa_init(void);
 
+struct numa_meminfo;
+
 #ifdef CONFIG_NUMA_EMU
 void __init numa_emulation(struct numa_meminfo *numa_meminfo,
 			   int numa_dist_cnt);
drivers/acpi/numa/srat.c renamed from drivers/acpi/numa/srat.c~mm-introduce-numa_memblks +1 -0
@@ -17,6 +17,7 @@
 #include <linux/numa.h>
 #include <linux/nodemask.h>
 #include <linux/topology.h>
+#include <linux/numa_memblks.h>
 
 static nodemask_t nodes_found_map = NODE_MASK_NONE;
 
drivers/of/of_numa.c renamed from drivers/of/of_numa.c~mm-introduce-numa_memblks +1 -0
@@ -10,6 +10,7 @@
 #include <linux/of.h>
 #include <linux/of_address.h>
 #include <linux/nodemask.h>
+#include <linux/numa_memblks.h>
 
 #include <asm/numa.h>
 
include/linux/numa_memblks.h new file +35 -0
new file mode 100644
@@ -0,0 +1,35 @@
+/* SPDX-License-Identifier: GPL-2.0 */
+#ifndef __NUMA_MEMBLKS_H
+#define __NUMA_MEMBLKS_H
+
+#ifdef CONFIG_NUMA_MEMBLKS
+#include <linux/types.h>
+
+#define NR_NODE_MEMBLKS		(MAX_NUMNODES * 2)
+
+struct numa_memblk {
+	u64			start;
+	u64			end;
+	int			nid;
+};
+
+struct numa_meminfo {
+	int			nr_blks;
+	struct numa_memblk	blk[NR_NODE_MEMBLKS];
+};
+
+extern struct numa_meminfo numa_meminfo __initdata_or_meminfo;
+extern struct numa_meminfo numa_reserved_meminfo __initdata_or_meminfo;
+
+int __init numa_add_memblk(int nodeid, u64 start, u64 end);
+void __init numa_remove_memblk_from(int idx, struct numa_meminfo *mi);
+
+int __init numa_cleanup_meminfo(struct numa_meminfo *mi);
+int __init numa_register_meminfo(struct numa_meminfo *mi);
+
+void __init numa_nodemask_from_meminfo(nodemask_t *nodemask,
+				       const struct numa_meminfo *mi);
+
+#endif /* CONFIG_NUMA_MEMBLKS */
+
+#endif	/* __NUMA_MEMBLKS_H */
mm/Kconfig renamed from mm/Kconfig~mm-introduce-numa_memblks +3 -0
@@ -1267,6 +1267,9 @@ config IOMMU_MM_DATA
 config EXECMEM
 	bool
 
+config NUMA_MEMBLKS
+	bool
+
 source "mm/damon/Kconfig"
 
 endmenu
mm/Makefile renamed from mm/Makefile~mm-introduce-numa_memblks +1 -0
@@ -118,6 +118,7 @@ obj-$(CONFIG_Z3FOLD)	+= z3fold.o
 obj-$(CONFIG_GENERIC_EARLY_IOREMAP) += early_ioremap.o
 obj-$(CONFIG_CMA)	+= cma.o
 obj-$(CONFIG_NUMA) += numa.o
+obj-$(CONFIG_NUMA_MEMBLKS) += numa_memblks.o
 obj-$(CONFIG_MEMORY_BALLOON) += balloon_compaction.o
 obj-$(CONFIG_PAGE_EXTENSION) += page_ext.o
 obj-$(CONFIG_PAGE_TABLE_CHECK) += page_table_check.o
mm/numa_memblks.c new file +385 -0

385 lines not on this page · raw message

_

Patches currently in -mm which might be from [email protected] are