mm-commits.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [nacked] mm-rename-the-global-section-array-to-mem_sections.patch removed from -mm tree
@ 2021-06-02 20:49 akpm
  0 siblings, 0 replies; only message in thread
From: akpm @ 2021-06-02 20:49 UTC (permalink / raw)
  To: aisheng.dong, bhe, dyoung, mm-commits, vgoyal


The patch titled
     Subject: mm: rename the global section array to mem_sections
has been removed from the -mm tree.  Its filename was
     mm-rename-the-global-section-array-to-mem_sections.patch

This patch was dropped because it was nacked

------------------------------------------------------
From: Dong Aisheng <aisheng.dong@nxp.com>
Subject: mm: rename the global section array to mem_sections

In order to distinguish the struct mem_section for a better code
readability and align with kernel doc [1] name below, change the global
mem section name to 'mem_sections' from 'mem_section'.

[1] Documentation/vm/memory-model.rst
"The `mem_section` objects are arranged in a two-dimensional array
called `mem_sections`."

[akpm@linux-foundation.org: update comment]
[akpm@linux-foundation.org: fix another site]
Link: https://lkml.kernel.org/r/20210531091908.1738465-5-aisheng.dong@nxp.com
Signed-off-by: Dong Aisheng <aisheng.dong@nxp.com>
Cc: Dave Young <dyoung@redhat.com>
Cc: Baoquan He <bhe@redhat.com>
Cc: Vivek Goyal <vgoyal@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---

 include/linux/mmzone.h |   10 +++++-----
 kernel/crash_core.c    |    4 ++--
 mm/sparse.c            |   20 ++++++++++----------
 3 files changed, 17 insertions(+), 17 deletions(-)

--- a/include/linux/mmzone.h~mm-rename-the-global-section-array-to-mem_sections
+++ a/include/linux/mmzone.h
@@ -1301,9 +1301,9 @@ struct mem_section {
 #define SECTION_ROOT_MASK	(SECTIONS_PER_ROOT - 1)
 
 #ifdef CONFIG_SPARSEMEM_EXTREME
-extern struct mem_section **mem_section;
+extern struct mem_section **mem_sections;
 #else
-extern struct mem_section mem_section[NR_SECTION_ROOTS][SECTIONS_PER_ROOT];
+extern struct mem_section mem_sections[NR_SECTION_ROOTS][SECTIONS_PER_ROOT];
 #endif
 
 static inline unsigned long *section_to_usemap(struct mem_section *ms)
@@ -1314,12 +1314,12 @@ static inline unsigned long *section_to_
 static inline struct mem_section *__nr_to_section(unsigned long nr)
 {
 #ifdef CONFIG_SPARSEMEM_EXTREME
-	if (!mem_section)
+	if (!mem_sections)
 		return NULL;
 #endif
-	if (!mem_section[SECTION_NR_TO_ROOT(nr)])
+	if (!mem_sections[SECTION_NR_TO_ROOT(nr)])
 		return NULL;
-	return &mem_section[SECTION_NR_TO_ROOT(nr)][nr & SECTION_ROOT_MASK];
+	return &mem_sections[SECTION_NR_TO_ROOT(nr)][nr & SECTION_ROOT_MASK];
 }
 extern unsigned long __section_nr(struct mem_section *ms);
 extern size_t mem_section_usage_size(void);
--- a/kernel/crash_core.c~mm-rename-the-global-section-array-to-mem_sections
+++ a/kernel/crash_core.c
@@ -460,8 +460,8 @@ static int __init crash_save_vmcoreinfo_
 	VMCOREINFO_SYMBOL(contig_page_data);
 #endif
 #ifdef CONFIG_SPARSEMEM
-	VMCOREINFO_SYMBOL_ARRAY(mem_section);
-	VMCOREINFO_LENGTH(mem_section, NR_SECTION_ROOTS);
+	VMCOREINFO_SYMBOL_ARRAY(mem_sections);
+	VMCOREINFO_LENGTH(mem_sections, NR_SECTION_ROOTS);
 	VMCOREINFO_STRUCT_SIZE(mem_section);
 	VMCOREINFO_OFFSET(mem_section, section_mem_map);
 	VMCOREINFO_NUMBER(MAX_PHYSMEM_BITS);
--- a/mm/sparse.c~mm-rename-the-global-section-array-to-mem_sections
+++ a/mm/sparse.c
@@ -20,15 +20,15 @@
 /*
  * Permanent SPARSEMEM data:
  *
- * 1) mem_section	- memory sections, mem_map's for valid memory
+ * 1) mem_sections - memory sections, mem_map's for valid memory
  */
 #ifdef CONFIG_SPARSEMEM_EXTREME
-struct mem_section **mem_section;
+struct mem_section **mem_sections;
 #else
-struct mem_section mem_section[NR_SECTION_ROOTS][SECTIONS_PER_ROOT]
+struct mem_section mem_sections[NR_SECTION_ROOTS][SECTIONS_PER_ROOT]
 	____cacheline_internodealigned_in_smp;
 #endif
-EXPORT_SYMBOL(mem_section);
+EXPORT_SYMBOL(mem_sections);
 
 #ifdef NODE_NOT_IN_PAGE_FLAGS
 /*
@@ -90,14 +90,14 @@ static int __meminit sparse_index_init(u
 	 *
 	 * The mem_hotplug_lock resolves the apparent race below.
 	 */
-	if (mem_section[root])
+	if (mem_sections[root])
 		return 0;
 
 	section = sparse_index_alloc(nid);
 	if (!section)
 		return -ENOMEM;
 
-	mem_section[root] = section;
+	mem_sections[root] = section;
 
 	return 0;
 }
@@ -130,7 +130,7 @@ unsigned long __section_nr(struct mem_se
 #else
 unsigned long __section_nr(struct mem_section *ms)
 {
-	return (unsigned long)(ms - mem_section[0]);
+	return (unsigned long)(ms - mem_sections[0]);
 }
 #endif
 
@@ -254,13 +254,13 @@ static void __init memory_present(int ni
 	unsigned long pfn;
 
 #ifdef CONFIG_SPARSEMEM_EXTREME
-	if (unlikely(!mem_section)) {
+	if (unlikely(!mem_sections)) {
 		unsigned long size, align;
 
 		size = sizeof(struct mem_section *) * NR_SECTION_ROOTS;
 		align = 1 << (INTERNODE_CACHE_SHIFT);
-		mem_section = memblock_alloc(size, align);
-		if (!mem_section)
+	mem_sections = memblock_alloc(size, align);
+	if (!mem_sections)
 			panic("%s: Failed to allocate %lu bytes align=0x%lx\n",
 			      __func__, size, align);
 	}
_

Patches currently in -mm which might be from aisheng.dong@nxp.com are

mm-drop-section_shift-in-code-comments.patch
mm-page_alloc-improve-memmap_pages-dbg-msg.patch


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2021-06-02 20:49 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-02 20:49 [nacked] mm-rename-the-global-section-array-to-mem_sections.patch removed from -mm tree akpm

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).