diff options
Diffstat (limited to 'arch/arm/mm/nommu.c')
-rw-r--r-- | arch/arm/mm/nommu.c | 23 |
1 files changed, 5 insertions, 18 deletions
diff --git a/arch/arm/mm/nommu.c b/arch/arm/mm/nommu.c index 07b62b238979..ad7bacc693b2 100644 --- a/arch/arm/mm/nommu.c +++ b/arch/arm/mm/nommu.c | |||
@@ -10,6 +10,7 @@ | |||
10 | #include <linux/io.h> | 10 | #include <linux/io.h> |
11 | 11 | ||
12 | #include <asm/cacheflush.h> | 12 | #include <asm/cacheflush.h> |
13 | #include <asm/sections.h> | ||
13 | #include <asm/page.h> | 14 | #include <asm/page.h> |
14 | #include <asm/mach/arch.h> | 15 | #include <asm/mach/arch.h> |
15 | 16 | ||
@@ -25,10 +26,10 @@ void __init reserve_node_zero(pg_data_t *pgdat) | |||
25 | * Note that this can only be in node 0. | 26 | * Note that this can only be in node 0. |
26 | */ | 27 | */ |
27 | #ifdef CONFIG_XIP_KERNEL | 28 | #ifdef CONFIG_XIP_KERNEL |
28 | reserve_bootmem_node(pgdat, __pa(&__data_start), &_end - &__data_start, | 29 | reserve_bootmem_node(pgdat, __pa(_data), _end - _data, |
29 | BOOTMEM_DEFAULT); | 30 | BOOTMEM_DEFAULT); |
30 | #else | 31 | #else |
31 | reserve_bootmem_node(pgdat, __pa(&_stext), &_end - &_stext, | 32 | reserve_bootmem_node(pgdat, __pa(_stext), _end - _stext, |
32 | BOOTMEM_DEFAULT); | 33 | BOOTMEM_DEFAULT); |
33 | #endif | 34 | #endif |
34 | 35 | ||
@@ -41,27 +42,13 @@ void __init reserve_node_zero(pg_data_t *pgdat) | |||
41 | BOOTMEM_DEFAULT); | 42 | BOOTMEM_DEFAULT); |
42 | } | 43 | } |
43 | 44 | ||
44 | static void __init sanity_check_meminfo(struct meminfo *mi) | ||
45 | { | ||
46 | int i, j; | ||
47 | |||
48 | for (i = 0, j = 0; i < mi->nr_banks; i++) { | ||
49 | struct membank *mb = &mi->bank[i]; | ||
50 | |||
51 | if (mb->size != 0 && mb->node < MAX_NUMNODES) | ||
52 | mi->bank[j++] = mi->bank[i]; | ||
53 | } | ||
54 | mi->nr_banks = j; | ||
55 | } | ||
56 | |||
57 | /* | 45 | /* |
58 | * paging_init() sets up the page tables, initialises the zone memory | 46 | * paging_init() sets up the page tables, initialises the zone memory |
59 | * maps, and sets up the zero page, bad page and bad page tables. | 47 | * maps, and sets up the zero page, bad page and bad page tables. |
60 | */ | 48 | */ |
61 | void __init paging_init(struct meminfo *mi, struct machine_desc *mdesc) | 49 | void __init paging_init(struct machine_desc *mdesc) |
62 | { | 50 | { |
63 | sanity_check_meminfo(mi); | 51 | bootmem_init(); |
64 | bootmem_init(mi); | ||
65 | } | 52 | } |
66 | 53 | ||
67 | /* | 54 | /* |