aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mm/init.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm/mm/init.c')
-rw-r--r--arch/arm/mm/init.c34
1 files changed, 0 insertions, 34 deletions
diff --git a/arch/arm/mm/init.c b/arch/arm/mm/init.c
index 0ed29bfeba1c..1ba6cf5a2c02 100644
--- a/arch/arm/mm/init.c
+++ b/arch/arm/mm/init.c
@@ -15,7 +15,6 @@
15#include <linux/mman.h> 15#include <linux/mman.h>
16#include <linux/nodemask.h> 16#include <linux/nodemask.h>
17#include <linux/initrd.h> 17#include <linux/initrd.h>
18#include <linux/sort.h>
19#include <linux/highmem.h> 18#include <linux/highmem.h>
20#include <linux/gfp.h> 19#include <linux/gfp.h>
21 20
@@ -224,20 +223,6 @@ static int __init check_initrd(struct meminfo *mi)
224 return initrd_node; 223 return initrd_node;
225} 224}
226 225
227static inline void map_memory_bank(struct membank *bank)
228{
229#ifdef CONFIG_MMU
230 struct map_desc map;
231
232 map.pfn = bank_pfn_start(bank);
233 map.virtual = __phys_to_virt(bank_phys_start(bank));
234 map.length = bank_phys_size(bank);
235 map.type = MT_MEMORY;
236
237 create_mapping(&map);
238#endif
239}
240
241static void __init bootmem_init_node(int node, struct meminfo *mi, 226static void __init bootmem_init_node(int node, struct meminfo *mi,
242 unsigned long start_pfn, unsigned long end_pfn) 227 unsigned long start_pfn, unsigned long end_pfn)
243{ 228{
@@ -247,16 +232,6 @@ static void __init bootmem_init_node(int node, struct meminfo *mi,
247 int i; 232 int i;
248 233
249 /* 234 /*
250 * Map the memory banks for this node.
251 */
252 for_each_nodebank(i, mi, node) {
253 struct membank *bank = &mi->bank[i];
254
255 if (!bank->highmem)
256 map_memory_bank(bank);
257 }
258
259 /*
260 * Allocate the bootmem bitmap page. 235 * Allocate the bootmem bitmap page.
261 */ 236 */
262 boot_pages = bootmem_bootmap_pages(end_pfn - start_pfn); 237 boot_pages = bootmem_bootmap_pages(end_pfn - start_pfn);
@@ -385,21 +360,12 @@ static void arm_memory_present(struct meminfo *mi, int node)
385} 360}
386#endif 361#endif
387 362
388static int __init meminfo_cmp(const void *_a, const void *_b)
389{
390 const struct membank *a = _a, *b = _b;
391 long cmp = bank_pfn_start(a) - bank_pfn_start(b);
392 return cmp < 0 ? -1 : cmp > 0 ? 1 : 0;
393}
394
395void __init bootmem_init(void) 363void __init bootmem_init(void)
396{ 364{
397 struct meminfo *mi = &meminfo; 365 struct meminfo *mi = &meminfo;
398 unsigned long min, max_low, max_high; 366 unsigned long min, max_low, max_high;
399 int node, initrd_node; 367 int node, initrd_node;
400 368
401 sort(&mi->bank, mi->nr_banks, sizeof(mi->bank[0]), meminfo_cmp, NULL);
402
403 /* 369 /*
404 * Locate which node contains the ramdisk image, if any. 370 * Locate which node contains the ramdisk image, if any.
405 */ 371 */