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 7829cb5425f5..105d1d4f420b 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 19
21#include <asm/mach-types.h> 20#include <asm/mach-types.h>
@@ -226,20 +225,6 @@ static int __init check_initrd(struct meminfo *mi)
226 return initrd_node; 225 return initrd_node;
227} 226}
228 227
229static inline void map_memory_bank(struct membank *bank)
230{
231#ifdef CONFIG_MMU
232 struct map_desc map;
233
234 map.pfn = bank_pfn_start(bank);
235 map.virtual = __phys_to_virt(bank_phys_start(bank));
236 map.length = bank_phys_size(bank);
237 map.type = MT_MEMORY;
238
239 create_mapping(&map);
240#endif
241}
242
243static void __init bootmem_init_node(int node, struct meminfo *mi, 228static void __init bootmem_init_node(int node, struct meminfo *mi,
244 unsigned long start_pfn, unsigned long end_pfn) 229 unsigned long start_pfn, unsigned long end_pfn)
245{ 230{
@@ -249,16 +234,6 @@ static void __init bootmem_init_node(int node, struct meminfo *mi,
249 int i; 234 int i;
250 235
251 /* 236 /*
252 * Map the memory banks for this node.
253 */
254 for_each_nodebank(i, mi, node) {
255 struct membank *bank = &mi->bank[i];
256
257 if (!bank->highmem)
258 map_memory_bank(bank);
259 }
260
261 /*
262 * Allocate the bootmem bitmap page. 237 * Allocate the bootmem bitmap page.
263 */ 238 */
264 boot_pages = bootmem_bootmap_pages(end_pfn - start_pfn); 239 boot_pages = bootmem_bootmap_pages(end_pfn - start_pfn);
@@ -387,21 +362,12 @@ static void arm_memory_present(struct meminfo *mi, int node)
387} 362}
388#endif 363#endif
389 364
390static int __init meminfo_cmp(const void *_a, const void *_b)
391{
392 const struct membank *a = _a, *b = _b;
393 long cmp = bank_pfn_start(a) - bank_pfn_start(b);
394 return cmp < 0 ? -1 : cmp > 0 ? 1 : 0;
395}
396
397void __init bootmem_init(void) 365void __init bootmem_init(void)
398{ 366{
399 struct meminfo *mi = &meminfo; 367 struct meminfo *mi = &meminfo;
400 unsigned long min, max_low, max_high; 368 unsigned long min, max_low, max_high;
401 int node, initrd_node; 369 int node, initrd_node;
402 370
403 sort(&mi->bank, mi->nr_banks, sizeof(mi->bank[0]), meminfo_cmp, NULL);
404
405 /* 371 /*
406 * Locate which node contains the ramdisk image, if any. 372 * Locate which node contains the ramdisk image, if any.
407 */ 373 */