diff options
author | Heiko Carstens <heiko.carstens@de.ibm.com> | 2006-12-08 09:56:10 -0500 |
---|---|---|
committer | Martin Schwidefsky <schwidefsky@de.ibm.com> | 2006-12-08 09:56:10 -0500 |
commit | 39b742f957a287a7514a8a35c9f516cdf30b9ff5 (patch) | |
tree | 4b4e9c0747bb047e906fed6c04919c00ccfa2b35 /arch/s390/mm | |
parent | f4eb07c17df2e6cf9bd58bfcd9cc9e05e9489d07 (diff) |
[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>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Diffstat (limited to 'arch/s390/mm')
-rw-r--r-- | arch/s390/mm/init.c | 23 |
1 files changed, 6 insertions, 17 deletions
diff --git a/arch/s390/mm/init.c b/arch/s390/mm/init.c index 5ea12a573cad..aa39591ca130 100644 --- a/arch/s390/mm/init.c +++ b/arch/s390/mm/init.c | |||
@@ -106,8 +106,8 @@ static void __init setup_ro_region(void) | |||
106 | } | 106 | } |
107 | } | 107 | } |
108 | 108 | ||
109 | extern unsigned long __initdata zholes_size[]; | ||
110 | extern void vmem_map_init(void); | 109 | extern void vmem_map_init(void); |
110 | |||
111 | /* | 111 | /* |
112 | * paging_init() sets up the page tables | 112 | * paging_init() sets up the page tables |
113 | */ | 113 | */ |
@@ -117,8 +117,7 @@ void __init paging_init(void) | |||
117 | int i; | 117 | int i; |
118 | unsigned long pgdir_k; | 118 | unsigned long pgdir_k; |
119 | static const int ssm_mask = 0x04000000L; | 119 | static const int ssm_mask = 0x04000000L; |
120 | unsigned long zones_size[MAX_NR_ZONES]; | 120 | unsigned long max_zone_pfns[MAX_NR_ZONES]; |
121 | unsigned long dma_pfn, high_pfn; | ||
122 | 121 | ||
123 | pg_dir = swapper_pg_dir; | 122 | pg_dir = swapper_pg_dir; |
124 | 123 | ||
@@ -142,20 +141,10 @@ void __init paging_init(void) | |||
142 | __ctl_load(pgdir_k, 13, 13); | 141 | __ctl_load(pgdir_k, 13, 13); |
143 | __raw_local_irq_ssm(ssm_mask); | 142 | __raw_local_irq_ssm(ssm_mask); |
144 | 143 | ||
145 | memset(zones_size, 0, sizeof(zones_size)); | 144 | memset(max_zone_pfns, 0, sizeof(max_zone_pfns)); |
146 | dma_pfn = MAX_DMA_ADDRESS >> PAGE_SHIFT; | 145 | max_zone_pfns[ZONE_DMA] = PFN_DOWN(MAX_DMA_ADDRESS); |
147 | high_pfn = max_low_pfn; | 146 | max_zone_pfns[ZONE_NORMAL] = max_low_pfn; |
148 | 147 | free_area_init_nodes(max_zone_pfns); | |
149 | if (dma_pfn > high_pfn) | ||
150 | zones_size[ZONE_DMA] = high_pfn; | ||
151 | else { | ||
152 | zones_size[ZONE_DMA] = dma_pfn; | ||
153 | zones_size[ZONE_NORMAL] = high_pfn - dma_pfn; | ||
154 | } | ||
155 | |||
156 | /* Initialize mem_map[]. */ | ||
157 | free_area_init_node(0, &contig_page_data, zones_size, | ||
158 | __pa(PAGE_OFFSET) >> PAGE_SHIFT, zholes_size); | ||
159 | } | 148 | } |
160 | 149 | ||
161 | void __init mem_init(void) | 150 | void __init mem_init(void) |