diff options
| author | David Woodhouse <David.Woodhouse@intel.com> | 2008-10-13 12:13:56 -0400 |
|---|---|---|
| committer | David Woodhouse <David.Woodhouse@intel.com> | 2008-10-13 12:13:56 -0400 |
| commit | e758936e02700ff88a0b08b722a3847b95283ef2 (patch) | |
| tree | 50c919bef1b459a778b85159d5929de95b6c4a01 /arch/arm/mm/nommu.c | |
| parent | 239cfbde1f5843c4a24199f117d5f67f637d72d5 (diff) | |
| parent | 4480f15b3306f43bbb0310d461142b4e897ca45b (diff) | |
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6
Conflicts:
include/asm-x86/statfs.h
Diffstat (limited to 'arch/arm/mm/nommu.c')
| -rw-r--r-- | arch/arm/mm/nommu.c | 18 |
1 files changed, 15 insertions, 3 deletions
diff --git a/arch/arm/mm/nommu.c b/arch/arm/mm/nommu.c index 63c62fdea521..07b62b238979 100644 --- a/arch/arm/mm/nommu.c +++ b/arch/arm/mm/nommu.c | |||
| @@ -7,16 +7,14 @@ | |||
| 7 | #include <linux/mm.h> | 7 | #include <linux/mm.h> |
| 8 | #include <linux/pagemap.h> | 8 | #include <linux/pagemap.h> |
| 9 | #include <linux/bootmem.h> | 9 | #include <linux/bootmem.h> |
| 10 | #include <linux/io.h> | ||
| 10 | 11 | ||
| 11 | #include <asm/cacheflush.h> | 12 | #include <asm/cacheflush.h> |
| 12 | #include <asm/io.h> | ||
| 13 | #include <asm/page.h> | 13 | #include <asm/page.h> |
| 14 | #include <asm/mach/arch.h> | 14 | #include <asm/mach/arch.h> |
| 15 | 15 | ||
| 16 | #include "mm.h" | 16 | #include "mm.h" |
| 17 | 17 | ||
| 18 | extern void _stext, __data_start, _end; | ||
| 19 | |||
| 20 | /* | 18 | /* |
| 21 | * Reserve the various regions of node 0 | 19 | * Reserve the various regions of node 0 |
| 22 | */ | 20 | */ |
| @@ -43,12 +41,26 @@ void __init reserve_node_zero(pg_data_t *pgdat) | |||
| 43 | BOOTMEM_DEFAULT); | 41 | BOOTMEM_DEFAULT); |
| 44 | } | 42 | } |
| 45 | 43 | ||
| 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 | |||
| 46 | /* | 57 | /* |
| 47 | * paging_init() sets up the page tables, initialises the zone memory | 58 | * paging_init() sets up the page tables, initialises the zone memory |
| 48 | * maps, and sets up the zero page, bad page and bad page tables. | 59 | * maps, and sets up the zero page, bad page and bad page tables. |
| 49 | */ | 60 | */ |
| 50 | void __init paging_init(struct meminfo *mi, struct machine_desc *mdesc) | 61 | void __init paging_init(struct meminfo *mi, struct machine_desc *mdesc) |
| 51 | { | 62 | { |
| 63 | sanity_check_meminfo(mi); | ||
| 52 | bootmem_init(mi); | 64 | bootmem_init(mi); |
| 53 | } | 65 | } |
| 54 | 66 | ||
