diff options
author | Ingo Molnar <mingo@elte.hu> | 2008-10-12 15:17:14 +0200 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2008-10-12 15:17:14 +0200 |
commit | 620f2efcdc5c7a2db68da41bc3df3cf9a718024e (patch) | |
tree | b1a0411e2588953777d0b10245b12044c33cef54 /arch/arm/mm/nommu.c | |
parent | 04944b793e18ece23f63c0252646b310c1845940 (diff) | |
parent | fd048088306656824958e7783ffcee27e241b361 (diff) | |
download | op-kernel-dev-620f2efcdc5c7a2db68da41bc3df3cf9a718024e.zip op-kernel-dev-620f2efcdc5c7a2db68da41bc3df3cf9a718024e.tar.gz |
Merge branch 'linus' into x86/xsave
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 63c62fd..07b62b2 100644 --- a/arch/arm/mm/nommu.c +++ b/arch/arm/mm/nommu.c @@ -7,16 +7,14 @@ #include <linux/mm.h> #include <linux/pagemap.h> #include <linux/bootmem.h> +#include <linux/io.h> #include <asm/cacheflush.h> -#include <asm/io.h> #include <asm/page.h> #include <asm/mach/arch.h> #include "mm.h" -extern void _stext, __data_start, _end; - /* * Reserve the various regions of node 0 */ @@ -43,12 +41,26 @@ void __init reserve_node_zero(pg_data_t *pgdat) BOOTMEM_DEFAULT); } +static void __init sanity_check_meminfo(struct meminfo *mi) +{ + int i, j; + + for (i = 0, j = 0; i < mi->nr_banks; i++) { + struct membank *mb = &mi->bank[i]; + + if (mb->size != 0 && mb->node < MAX_NUMNODES) + mi->bank[j++] = mi->bank[i]; + } + mi->nr_banks = j; +} + /* * paging_init() sets up the page tables, initialises the zone memory * maps, and sets up the zero page, bad page and bad page tables. */ void __init paging_init(struct meminfo *mi, struct machine_desc *mdesc) { + sanity_check_meminfo(mi); bootmem_init(mi); } |