linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/2] mm: Move definition of 'zone_names' array into mmzone.h
@ 2016-08-31  3:25 Anshuman Khandual
  2016-08-31  3:25 ` [PATCH 2/2] mm: Add sysfs interface to dump each node's zonelist information Anshuman Khandual
  2016-08-31 21:10 ` [PATCH 1/2] mm: Move definition of 'zone_names' array into mmzone.h Andrew Morton
  0 siblings, 2 replies; 6+ messages in thread
From: Anshuman Khandual @ 2016-08-31  3:25 UTC (permalink / raw)
  To: linux-mm, linux-kernel; +Cc: akpm

zone_names[] is used to identify any zone given it's index which
can be used in many other places. So moving the definition into
include/linux/mmzone.h for broader access.

Signed-off-by: Anshuman Khandual <khandual@linux.vnet.ibm.com>
---
 include/linux/mmzone.h | 17 +++++++++++++++++
 mm/page_alloc.c        | 17 -----------------
 2 files changed, 17 insertions(+), 17 deletions(-)

diff --git a/include/linux/mmzone.h b/include/linux/mmzone.h
index d572b78..01ca3f4 100644
--- a/include/linux/mmzone.h
+++ b/include/linux/mmzone.h
@@ -341,6 +341,23 @@ enum zone_type {
 
 };
 
+static char * const zone_names[__MAX_NR_ZONES] = {
+#ifdef CONFIG_ZONE_DMA
+	 "DMA",
+#endif
+#ifdef CONFIG_ZONE_DMA32
+	 "DMA32",
+#endif
+	 "Normal",
+#ifdef CONFIG_HIGHMEM
+	 "HighMem",
+#endif
+	 "Movable",
+#ifdef CONFIG_ZONE_DEVICE
+	 "Device",
+#endif
+};
+
 #ifndef __GENERATING_BOUNDS_H
 
 struct zone {
diff --git a/mm/page_alloc.c b/mm/page_alloc.c
index 3fbe73a..8e2261c 100644
--- a/mm/page_alloc.c
+++ b/mm/page_alloc.c
@@ -207,23 +207,6 @@ int sysctl_lowmem_reserve_ratio[MAX_NR_ZONES-1] = {
 
 EXPORT_SYMBOL(totalram_pages);
 
-static char * const zone_names[MAX_NR_ZONES] = {
-#ifdef CONFIG_ZONE_DMA
-	 "DMA",
-#endif
-#ifdef CONFIG_ZONE_DMA32
-	 "DMA32",
-#endif
-	 "Normal",
-#ifdef CONFIG_HIGHMEM
-	 "HighMem",
-#endif
-	 "Movable",
-#ifdef CONFIG_ZONE_DEVICE
-	 "Device",
-#endif
-};
-
 char * const migratetype_names[MIGRATE_TYPES] = {
 	"Unmovable",
 	"Movable",
-- 
1.9.3

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2016-09-02  4:34 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-08-31  3:25 [PATCH 1/2] mm: Move definition of 'zone_names' array into mmzone.h Anshuman Khandual
2016-08-31  3:25 ` [PATCH 2/2] mm: Add sysfs interface to dump each node's zonelist information Anshuman Khandual
2016-08-31 21:12   ` Andrew Morton
2016-09-02  4:34     ` Anshuman Khandual
2016-08-31 21:10 ` [PATCH 1/2] mm: Move definition of 'zone_names' array into mmzone.h Andrew Morton
2016-09-02  4:29   ` Anshuman Khandual

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).