aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorRoman Zippel <zippel@linux-m68k.org>2006-06-23 05:04:58 -0400
committerLinus Torvalds <torvalds@g5.osdl.org>2006-06-23 10:43:01 -0400
commit2dcf15b78d14c8d92fa1ce1be95b75e8d27ef99f (patch)
tree782bc7e735f077832c7c6200be1b5454cac6293b /arch
parent882905c7ff81763a3aa3413629f7253b75587cb1 (diff)
[PATCH] m68k: use proper defines for zone initialization
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>
Diffstat (limited to 'arch')
-rw-r--r--arch/m68k/mm/motorola.c12
-rw-r--r--arch/m68k/mm/sun3mmu.c5
2 files changed, 8 insertions, 9 deletions
diff --git a/arch/m68k/mm/motorola.c b/arch/m68k/mm/motorola.c
index afb57eeafdcb..bdb11103694b 100644
--- a/arch/m68k/mm/motorola.c
+++ b/arch/m68k/mm/motorola.c
@@ -203,7 +203,7 @@ void __init paging_init(void)
203{ 203{
204 int chunk; 204 int chunk;
205 unsigned long mem_avail = 0; 205 unsigned long mem_avail = 0;
206 unsigned long zones_size[3] = { 0, }; 206 unsigned long zones_size[MAX_NR_ZONES] = { 0, };
207 207
208#ifdef DEBUG 208#ifdef DEBUG
209 { 209 {
@@ -257,12 +257,12 @@ void __init paging_init(void)
257#ifdef DEBUG 257#ifdef DEBUG
258 printk ("before free_area_init\n"); 258 printk ("before free_area_init\n");
259#endif 259#endif
260 zones_size[0] = (mach_max_dma_address < (unsigned long)high_memory ? 260 zones_size[ZONE_DMA] = (mach_max_dma_address < (unsigned long)high_memory ?
261 (mach_max_dma_address+1) : (unsigned long)high_memory); 261 (mach_max_dma_address+1) : (unsigned long)high_memory);
262 zones_size[1] = (unsigned long)high_memory - zones_size[0]; 262 zones_size[ZONE_NORMAL] = (unsigned long)high_memory - zones_size[0];
263 263
264 zones_size[0] = (zones_size[0] - PAGE_OFFSET) >> PAGE_SHIFT; 264 zones_size[ZONE_DMA] = (zones_size[ZONE_DMA] - PAGE_OFFSET) >> PAGE_SHIFT;
265 zones_size[1] >>= PAGE_SHIFT; 265 zones_size[ZONE_NORMAL] >>= PAGE_SHIFT;
266 266
267 free_area_init(zones_size); 267 free_area_init(zones_size);
268} 268}
diff --git a/arch/m68k/mm/sun3mmu.c b/arch/m68k/mm/sun3mmu.c
index a47be196a47c..ac6640ade0b1 100644
--- a/arch/m68k/mm/sun3mmu.c
+++ b/arch/m68k/mm/sun3mmu.c
@@ -46,7 +46,7 @@ void __init paging_init(void)
46 unsigned long address; 46 unsigned long address;
47 unsigned long next_pgtable; 47 unsigned long next_pgtable;
48 unsigned long bootmem_end; 48 unsigned long bootmem_end;
49 unsigned long zones_size[3] = {0, 0, 0}; 49 unsigned long zones_size[MAX_NR_ZONES] = { 0, };
50 unsigned long size; 50 unsigned long size;
51 51
52 52
@@ -92,8 +92,7 @@ void __init paging_init(void)
92 current->mm = NULL; 92 current->mm = NULL;
93 93
94 /* memory sizing is a hack stolen from motorola.c.. hope it works for us */ 94 /* memory sizing is a hack stolen from motorola.c.. hope it works for us */
95 zones_size[0] = ((unsigned long)high_memory - PAGE_OFFSET) >> PAGE_SHIFT; 95 zones_size[ZONE_DMA] = ((unsigned long)high_memory - PAGE_OFFSET) >> PAGE_SHIFT;
96 zones_size[1] = 0;
97 96
98 free_area_init(zones_size); 97 free_area_init(zones_size);
99 98