[PATCH] Have Power use add_active_range() and free_area_init_nodes()
Size zones and holes in an architecture independent manner for Power. [judith@osdl.org: build fix] Signed-off-by: Mel Gorman <mel@csn.ul.ie> Cc: Dave Hansen <haveblue@us.ibm.com> Cc: Andy Whitcroft <apw@shadowen.org> Cc: Andi Kleen <ak@muc.de> Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org> Cc: Paul Mackerras <paulus@samba.org> Cc: "Keith Mannthey" <kmannth@gmail.com> Cc: "Luck, Tony" <tony.luck@intel.com> Cc: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com> Cc: Yasunori Goto <y-goto@jp.fujitsu.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
This commit is contained in:

committed by
Linus Torvalds

parent
c713216dee
commit
c67c3cb4c9
@@ -358,8 +358,8 @@ void __init do_init_bootmem(void)
|
||||
*/
|
||||
void __init paging_init(void)
|
||||
{
|
||||
unsigned long zones_size[MAX_NR_ZONES], i;
|
||||
|
||||
unsigned long start_pfn, end_pfn;
|
||||
unsigned long max_zone_pfns[MAX_NR_ZONES];
|
||||
#ifdef CONFIG_HIGHMEM
|
||||
map_page(PKMAP_BASE, 0, 0); /* XXX gross */
|
||||
pkmap_page_table = pte_offset_kernel(pmd_offset(pgd_offset_k
|
||||
@@ -369,19 +369,18 @@ void __init paging_init(void)
|
||||
(KMAP_FIX_BEGIN), KMAP_FIX_BEGIN), KMAP_FIX_BEGIN);
|
||||
kmap_prot = PAGE_KERNEL;
|
||||
#endif /* CONFIG_HIGHMEM */
|
||||
|
||||
/*
|
||||
* All pages are DMA-able so we put them all in the DMA zone.
|
||||
*/
|
||||
zones_size[ZONE_DMA] = total_lowmem >> PAGE_SHIFT;
|
||||
for (i = 1; i < MAX_NR_ZONES; i++)
|
||||
zones_size[i] = 0;
|
||||
/* All pages are DMA-able so we put them all in the DMA zone. */
|
||||
start_pfn = __pa(PAGE_OFFSET) >> PAGE_SHIFT;
|
||||
end_pfn = start_pfn + (total_memory >> PAGE_SHIFT);
|
||||
add_active_range(0, start_pfn, end_pfn);
|
||||
|
||||
#ifdef CONFIG_HIGHMEM
|
||||
zones_size[ZONE_HIGHMEM] = (total_memory - total_lowmem) >> PAGE_SHIFT;
|
||||
max_zone_pfns[0] = total_lowmem >> PAGE_SHIFT;
|
||||
max_zone_pfns[1] = total_memory >> PAGE_SHIFT;
|
||||
#else
|
||||
max_zone_pfns[0] = total_memory >> PAGE_SHIFT;
|
||||
#endif /* CONFIG_HIGHMEM */
|
||||
|
||||
free_area_init(zones_size);
|
||||
free_area_init_nodes(max_zone_pfns);
|
||||
}
|
||||
|
||||
void __init mem_init(void)
|
||||
|
Reference in New Issue
Block a user