[PATCH] arm: get rid of meminfo: fix lowmem_limit calculation

From: Grygorii Strashko
Date: Wed Mar 12 2014 - 12:04:02 EST


Signed-off-by: Grygorii Strashko <x0174654@uglx0174654.(none)>
---
arch/arm/mm/mmu.c | 10 +++++++---
1 file changed, 7 insertions(+), 3 deletions(-)

diff --git a/arch/arm/mm/mmu.c b/arch/arm/mm/mmu.c
index c3ae96c..f8b5175 100644
--- a/arch/arm/mm/mmu.c
+++ b/arch/arm/mm/mmu.c
@@ -1096,8 +1096,12 @@ void __init sanity_check_meminfo(void)
}

if (!highmem) {
- if (block_end > arm_lowmem_limit)
- arm_lowmem_limit = block_end;
+ if (block_end > arm_lowmem_limit) {
+ if (reg->size > size_limit)
+ arm_lowmem_limit = vmalloc_limit;
+ else
+ arm_lowmem_limit = block_end;
+ }


/*
@@ -1117,7 +1121,7 @@ void __init sanity_check_meminfo(void)
if (!IS_ALIGNED(block_start, SECTION_SIZE))
memblock_limit = block_start;
else if (!IS_ALIGNED(block_end, SECTION_SIZE))
- memblock_limit = block_end;
+ memblock_limit = arm_lowmem_limit;
}

}
--
1.7.9.5
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/