diff options
author | Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it> | 2005-11-07 00:58:58 -0800 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2005-11-07 07:53:32 -0800 |
commit | 353f8d1cd5b8540c1591f00a5cbd3aeca699cfcf (patch) | |
tree | 4bd57d623792b6dc912d6aaed4f6e3b601ce5963 | |
parent | 77cc0db46e5d04b476e1984134892edb86cda8e6 (diff) |
[PATCH] uml: fix hardcoded ZONE_* constants in zone setup
Remove usage of hardcoded constants in paging_init().
By chance I spotted a bug in zones_setup involving a change to ZONE_*
constants, due to the ZONE_DMA32 patch from Andi Kleen (which is in -mm).
So, possibly, instead of zones_size[2] you will find zones_size[3] in the
code, but that change is wrong and this patch is still correct.
Signed-off-by: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>
Cc: Jeff Dike <jdike@addtoit.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
-rw-r--r-- | arch/um/kernel/mem.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/arch/um/kernel/mem.c b/arch/um/kernel/mem.c index 462cc9d65386..fa4f915be5c5 100644 --- a/arch/um/kernel/mem.c +++ b/arch/um/kernel/mem.c @@ -234,8 +234,8 @@ void paging_init(void) empty_bad_page = (unsigned long *) alloc_bootmem_low_pages(PAGE_SIZE); for(i=0;i<sizeof(zones_size)/sizeof(zones_size[0]);i++) zones_size[i] = 0; - zones_size[0] = (end_iomem >> PAGE_SHIFT) - (uml_physmem >> PAGE_SHIFT); - zones_size[2] = highmem >> PAGE_SHIFT; + zones_size[ZONE_DMA] = (end_iomem >> PAGE_SHIFT) - (uml_physmem >> PAGE_SHIFT); + zones_size[ZONE_HIGHMEM] = highmem >> PAGE_SHIFT; free_area_init(zones_size); /* |