diff options
author | Russell King <rmk+kernel@arm.linux.org.uk> | 2010-07-01 12:03:29 +0100 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2010-07-27 08:48:24 +0100 |
commit | e07b9e08601b400aee7e076e7b31799d3dd48c1e (patch) | |
tree | 28a030ef024bb5677546c8a6dad2769176bb0545 /arch/arm | |
parent | eda2e5dcc914b4d70f665443efc9780e89a5e5c1 (diff) | |
download | op-kernel-dev-e07b9e08601b400aee7e076e7b31799d3dd48c1e.zip op-kernel-dev-e07b9e08601b400aee7e076e7b31799d3dd48c1e.tar.gz |
ARM: LMB: convert pfn_valid to use LMB
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'arch/arm')
-rw-r--r-- | arch/arm/mm/init.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/arch/arm/mm/init.c b/arch/arm/mm/init.c index a453982..c357bfb 100644 --- a/arch/arm/mm/init.c +++ b/arch/arm/mm/init.c @@ -239,16 +239,15 @@ static void __init arm_bootmem_free(struct meminfo *mi) #ifndef CONFIG_SPARSEMEM int pfn_valid(unsigned long pfn) { - struct meminfo *mi = &meminfo; - unsigned int left = 0, right = mi->nr_banks; + struct memblock_region *mem = &memblock.memory; + unsigned int left = 0, right = mem->cnt; do { unsigned int mid = (right + left) / 2; - struct membank *bank = &mi->bank[mid]; - if (pfn < bank_pfn_start(bank)) + if (pfn < memblock_start_pfn(mem, mid)) right = mid; - else if (pfn >= bank_pfn_end(bank)) + else if (pfn >= memblock_end_pfn(mem, mid)) left = mid + 1; else return 1; |