diff options
Diffstat (limited to 'arch/ia64/mm/contig.c')
-rw-r--r-- | arch/ia64/mm/contig.c | 30 |
1 files changed, 6 insertions, 24 deletions
diff --git a/arch/ia64/mm/contig.c b/arch/ia64/mm/contig.c index fb0f4698f5d..44ce5ed9444 100644 --- a/arch/ia64/mm/contig.c +++ b/arch/ia64/mm/contig.c | |||
@@ -97,26 +97,6 @@ void show_mem(void) | |||
97 | unsigned long bootmap_start; | 97 | unsigned long bootmap_start; |
98 | 98 | ||
99 | /** | 99 | /** |
100 | * find_max_pfn - adjust the maximum page number callback | ||
101 | * @start: start of range | ||
102 | * @end: end of range | ||
103 | * @arg: address of pointer to global max_pfn variable | ||
104 | * | ||
105 | * Passed as a callback function to efi_memmap_walk() to determine the highest | ||
106 | * available page frame number in the system. | ||
107 | */ | ||
108 | int | ||
109 | find_max_pfn (unsigned long start, unsigned long end, void *arg) | ||
110 | { | ||
111 | unsigned long *max_pfnp = arg, pfn; | ||
112 | |||
113 | pfn = (PAGE_ALIGN(end - 1) - PAGE_OFFSET) >> PAGE_SHIFT; | ||
114 | if (pfn > *max_pfnp) | ||
115 | *max_pfnp = pfn; | ||
116 | return 0; | ||
117 | } | ||
118 | |||
119 | /** | ||
120 | * find_bootmap_location - callback to find a memory area for the bootmap | 100 | * find_bootmap_location - callback to find a memory area for the bootmap |
121 | * @start: start of region | 101 | * @start: start of region |
122 | * @end: end of region | 102 | * @end: end of region |
@@ -177,9 +157,10 @@ find_memory (void) | |||
177 | reserve_memory(); | 157 | reserve_memory(); |
178 | 158 | ||
179 | /* first find highest page frame number */ | 159 | /* first find highest page frame number */ |
180 | max_pfn = 0; | 160 | min_low_pfn = ~0UL; |
181 | efi_memmap_walk(find_max_pfn, &max_pfn); | 161 | max_low_pfn = 0; |
182 | 162 | efi_memmap_walk(find_max_min_low_pfn, NULL); | |
163 | max_pfn = max_low_pfn; | ||
183 | /* how many bytes to cover all the pages */ | 164 | /* how many bytes to cover all the pages */ |
184 | bootmap_size = bootmem_bootmap_pages(max_pfn) << PAGE_SHIFT; | 165 | bootmap_size = bootmem_bootmap_pages(max_pfn) << PAGE_SHIFT; |
185 | 166 | ||
@@ -189,7 +170,8 @@ find_memory (void) | |||
189 | if (bootmap_start == ~0UL) | 170 | if (bootmap_start == ~0UL) |
190 | panic("Cannot find %ld bytes for bootmap\n", bootmap_size); | 171 | panic("Cannot find %ld bytes for bootmap\n", bootmap_size); |
191 | 172 | ||
192 | bootmap_size = init_bootmem(bootmap_start >> PAGE_SHIFT, max_pfn); | 173 | bootmap_size = init_bootmem_node(NODE_DATA(0), |
174 | (bootmap_start >> PAGE_SHIFT), 0, max_pfn); | ||
193 | 175 | ||
194 | /* Free all available memory, then mark bootmem-map as being in use. */ | 176 | /* Free all available memory, then mark bootmem-map as being in use. */ |
195 | efi_memmap_walk(filter_rsvd_memory, free_bootmem); | 177 | efi_memmap_walk(filter_rsvd_memory, free_bootmem); |