[PATCH] mm: use symbolic names instead of indices for zone initialisation
[sfrench/cifs-2.6.git] / arch / powerpc / mm / mem.c
index 16fe027bbc12ffb873222dbbdc170d474028ca91..d1c0758c56110628e5cc691263f48d1eda36bbb9 100644 (file)
@@ -307,11 +307,12 @@ void __init paging_init(void)
               top_of_ram, total_ram);
        printk(KERN_DEBUG "Memory hole size: %ldMB\n",
               (top_of_ram - total_ram) >> 20);
+       memset(max_zone_pfns, 0, sizeof(max_zone_pfns));
 #ifdef CONFIG_HIGHMEM
-       max_zone_pfns[0] = total_lowmem >> PAGE_SHIFT;
-       max_zone_pfns[1] = top_of_ram >> PAGE_SHIFT;
+       max_zone_pfns[ZONE_DMA] = total_lowmem >> PAGE_SHIFT;
+       max_zone_pfns[ZONE_HIGHMEM] = top_of_ram >> PAGE_SHIFT;
 #else
-       max_zone_pfns[0] = top_of_ram >> PAGE_SHIFT;
+       max_zone_pfns[ZONE_DMA] = top_of_ram >> PAGE_SHIFT;
 #endif
        free_area_init_nodes(max_zone_pfns);
 }