[PATCH] m68k: use proper defines for zone initialization
authorRoman Zippel <zippel@linux-m68k.org>
Fri, 23 Jun 2006 09:04:58 +0000 (02:04 -0700)
committerLinus Torvalds <torvalds@g5.osdl.org>
Fri, 23 Jun 2006 14:43:01 +0000 (07:43 -0700)
MAX_NR_ZONES changed, so use correct defines now.

Signed-off-by: Roman Zippel <zippel@linux-m68k.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
arch/m68k/mm/motorola.c
arch/m68k/mm/sun3mmu.c

index afb57eeafdcb191c68a22058db46a6ba9044686e..bdb11103694b31a36af51eaf43b78e5a9e0d01b2 100644 (file)
@@ -203,7 +203,7 @@ void __init paging_init(void)
 {
        int chunk;
        unsigned long mem_avail = 0;
-       unsigned long zones_size[3] = { 0, };
+       unsigned long zones_size[MAX_NR_ZONES] = { 0, };
 
 #ifdef DEBUG
        {
@@ -257,12 +257,12 @@ void __init paging_init(void)
 #ifdef DEBUG
        printk ("before free_area_init\n");
 #endif
-       zones_size[0] = (mach_max_dma_address < (unsigned long)high_memory ?
-                        (mach_max_dma_address+1) : (unsigned long)high_memory);
-       zones_size[1] = (unsigned long)high_memory - zones_size[0];
+       zones_size[ZONE_DMA] = (mach_max_dma_address < (unsigned long)high_memory ?
+                               (mach_max_dma_address+1) : (unsigned long)high_memory);
+       zones_size[ZONE_NORMAL] = (unsigned long)high_memory - zones_size[0];
 
-       zones_size[0] = (zones_size[0] - PAGE_OFFSET) >> PAGE_SHIFT;
-       zones_size[1] >>= PAGE_SHIFT;
+       zones_size[ZONE_DMA] = (zones_size[ZONE_DMA] - PAGE_OFFSET) >> PAGE_SHIFT;
+       zones_size[ZONE_NORMAL] >>= PAGE_SHIFT;
 
        free_area_init(zones_size);
 }
index a47be196a47c4a9faa33451839394a5d963bfb5f..ac6640ade0b1f519ee0ce7363d2ac5131843615c 100644 (file)
@@ -46,7 +46,7 @@ void __init paging_init(void)
        unsigned long address;
        unsigned long next_pgtable;
        unsigned long bootmem_end;
-       unsigned long zones_size[3] = {0, 0, 0};
+       unsigned long zones_size[MAX_NR_ZONES] = { 0, };
        unsigned long size;
 
 
@@ -92,8 +92,7 @@ void __init paging_init(void)
        current->mm = NULL;
 
        /* memory sizing is a hack stolen from motorola.c..  hope it works for us */
-       zones_size[0] = ((unsigned long)high_memory - PAGE_OFFSET) >> PAGE_SHIFT;
-       zones_size[1] = 0;
+       zones_size[ZONE_DMA] = ((unsigned long)high_memory - PAGE_OFFSET) >> PAGE_SHIFT;
 
        free_area_init(zones_size);