diff options
author | Heiko Carstens <heiko.carstens@de.ibm.com> | 2006-10-04 20:02:19 +0200 |
---|---|---|
committer | Martin Schwidefsky <schwidefsky@de.ibm.com> | 2006-10-04 20:02:19 +0200 |
commit | 7676bef9c183fd573822cac9992927ef596d584c (patch) | |
tree | 1bf18f9cfda947b23e69d47b84500614a59ba95e /arch/s390/mm | |
parent | cb601d41c175b7419efc91075a714d6a157bb0ac (diff) | |
download | op-kernel-dev-7676bef9c183fd573822cac9992927ef596d584c.zip op-kernel-dev-7676bef9c183fd573822cac9992927ef596d584c.tar.gz |
[S390] Have s390 use add_active_range() and free_area_init_nodes.
Size zones and holes in an architecture independent manner for s390.
Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Diffstat (limited to 'arch/s390/mm')
-rw-r--r-- | arch/s390/mm/init.c | 35 |
1 files changed, 10 insertions, 25 deletions
diff --git a/arch/s390/mm/init.c b/arch/s390/mm/init.c index 127044e..c302508 100644 --- a/arch/s390/mm/init.c +++ b/arch/s390/mm/init.c @@ -82,7 +82,6 @@ void show_mem(void) printk("%d pages swap cached\n",cached); } -extern unsigned long __initdata zholes_size[]; /* * paging_init() sets up the page tables */ @@ -99,16 +98,15 @@ void __init paging_init(void) unsigned long pgdir_k = (__pa(swapper_pg_dir) & PAGE_MASK) | _KERNSEG_TABLE; static const int ssm_mask = 0x04000000L; unsigned long ro_start_pfn, ro_end_pfn; - unsigned long zones_size[MAX_NR_ZONES]; + unsigned long max_zone_pfns[MAX_NR_ZONES]; ro_start_pfn = PFN_DOWN((unsigned long)&__start_rodata); ro_end_pfn = PFN_UP((unsigned long)&__end_rodata); - memset(zones_size, 0, sizeof(zones_size)); - zones_size[ZONE_DMA] = max_low_pfn; - free_area_init_node(0, &contig_page_data, zones_size, - __pa(PAGE_OFFSET) >> PAGE_SHIFT, - zholes_size); + memset(max_zone_pfns, 0, sizeof(max_zone_pfns)); + max_zone_pfns[ZONE_DMA] = max_low_pfn; + max_zone_pfns[ZONE_NORMAL] = max_low_pfn; + free_area_init_nodes(max_zone_pfns); /* unmap whole virtual address space */ @@ -153,7 +151,6 @@ void __init paging_init(void) __raw_local_irq_ssm(ssm_mask); local_flush_tlb(); - return; } #else /* CONFIG_64BIT */ @@ -169,26 +166,16 @@ void __init paging_init(void) unsigned long pgdir_k = (__pa(swapper_pg_dir) & PAGE_MASK) | _KERN_REGION_TABLE; static const int ssm_mask = 0x04000000L; - unsigned long zones_size[MAX_NR_ZONES]; - unsigned long dma_pfn, high_pfn; unsigned long ro_start_pfn, ro_end_pfn; + unsigned long max_zone_pfns[MAX_NR_ZONES]; - memset(zones_size, 0, sizeof(zones_size)); - dma_pfn = MAX_DMA_ADDRESS >> PAGE_SHIFT; - high_pfn = max_low_pfn; ro_start_pfn = PFN_DOWN((unsigned long)&__start_rodata); ro_end_pfn = PFN_UP((unsigned long)&__end_rodata); - if (dma_pfn > high_pfn) - zones_size[ZONE_DMA] = high_pfn; - else { - zones_size[ZONE_DMA] = dma_pfn; - zones_size[ZONE_NORMAL] = high_pfn - dma_pfn; - } - - /* Initialize mem_map[]. */ - free_area_init_node(0, &contig_page_data, zones_size, - __pa(PAGE_OFFSET) >> PAGE_SHIFT, zholes_size); + memset(max_zone_pfns, 0, sizeof(max_zone_pfns)); + max_zone_pfns[ZONE_DMA] = PFN_DOWN(MAX_DMA_ADDRESS); + max_zone_pfns[ZONE_NORMAL] = max_low_pfn; + free_area_init_nodes(max_zone_pfns); /* * map whole physical memory to virtual memory (identity mapping) @@ -237,8 +224,6 @@ void __init paging_init(void) __raw_local_irq_ssm(ssm_mask); local_flush_tlb(); - - return; } #endif /* CONFIG_64BIT */ |