aboutsummaryrefslogtreecommitdiffstats
path: root/mm/mm_init.c
diff options
context:
space:
mode:
Diffstat (limited to 'mm/mm_init.c')
-rw-r--r--mm/mm_init.c45
1 files changed, 45 insertions, 0 deletions
diff --git a/mm/mm_init.c b/mm/mm_init.c
index e16990d629e6..ce445ca097e7 100644
--- a/mm/mm_init.c
+++ b/mm/mm_init.c
@@ -11,6 +11,51 @@
11 11
12int __meminitdata mminit_loglevel; 12int __meminitdata mminit_loglevel;
13 13
14/* The zonelists are simply reported, validation is manual. */
15void mminit_verify_zonelist(void)
16{
17 int nid;
18
19 if (mminit_loglevel < MMINIT_VERIFY)
20 return;
21
22 for_each_online_node(nid) {
23 pg_data_t *pgdat = NODE_DATA(nid);
24 struct zone *zone;
25 struct zoneref *z;
26 struct zonelist *zonelist;
27 int i, listid, zoneid;
28
29 BUG_ON(MAX_ZONELISTS > 2);
30 for (i = 0; i < MAX_ZONELISTS * MAX_NR_ZONES; i++) {
31
32 /* Identify the zone and nodelist */
33 zoneid = i % MAX_NR_ZONES;
34 listid = i / MAX_NR_ZONES;
35 zonelist = &pgdat->node_zonelists[listid];
36 zone = &pgdat->node_zones[zoneid];
37 if (!populated_zone(zone))
38 continue;
39
40 /* Print information about the zonelist */
41 printk(KERN_DEBUG "mminit::zonelist %s %d:%s = ",
42 listid > 0 ? "thisnode" : "general", nid,
43 zone->name);
44
45 /* Iterate the zonelist */
46 for_each_zone_zonelist(zone, z, zonelist, zoneid) {
47#ifdef CONFIG_NUMA
48 printk(KERN_CONT "%d:%s ",
49 zone->node, zone->name);
50#else
51 printk(KERN_CONT "0:%s ", zone->name);
52#endif /* CONFIG_NUMA */
53 }
54 printk(KERN_CONT "\n");
55 }
56 }
57}
58
14void __init mminit_verify_pageflags_layout(void) 59void __init mminit_verify_pageflags_layout(void)
15{ 60{
16 int shift, width; 61 int shift, width;