linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] ARM: memblock: set allocation limit for MEMBLOCK_ALLOC_ANYWHERE
@ 2010-10-25 10:48 Catalin Marinas
  2010-10-25 15:15 ` Russell King - ARM Linux
  0 siblings, 1 reply; 6+ messages in thread
From: Catalin Marinas @ 2010-10-25 10:48 UTC (permalink / raw)
  To: linux-arm-kernel

From: Will Deacon <will.deacon@arm.com>

Commit e63075a3 removed the explicit MEMBLOCK_REAL_LIMIT #define
and introduced the requirement that arch code calls
memblock_set_current_limit to ensure that the __va macro can
be used on physical addresses returned from memblock_alloc.

This patch ensures that memblock allocates from lowmem on ARM
by setting the allocation limit to lowmem_end_addr.

Signed-off-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
---
 arch/arm/include/asm/memblock.h |    3 ---
 arch/arm/mm/mmu.c               |    1 +
 2 files changed, 1 insertions(+), 3 deletions(-)

diff --git a/arch/arm/include/asm/memblock.h b/arch/arm/include/asm/memblock.h
index fdbc43b..655b4c4 100644
--- a/arch/arm/include/asm/memblock.h
+++ b/arch/arm/include/asm/memblock.h
@@ -3,9 +3,6 @@
 
 #ifdef CONFIG_MMU
 extern phys_addr_t lowmem_end_addr;
-#define MEMBLOCK_REAL_LIMIT	lowmem_end_addr
-#else
-#define MEMBLOCK_REAL_LIMIT	0
 #endif
 
 struct meminfo;
diff --git a/arch/arm/mm/mmu.c b/arch/arm/mm/mmu.c
index 72cc529..fd7bb1e 100644
--- a/arch/arm/mm/mmu.c
+++ b/arch/arm/mm/mmu.c
@@ -753,6 +753,7 @@ static void __init sanity_check_meminfo(void)
 	int i, j, highmem = 0;
 
 	lowmem_end_addr = __pa(vmalloc_min - 1) + 1;
+	memblock_set_current_limit(lowmem_end_addr);
 
 	for (i = 0, j = 0; i < meminfo.nr_banks; i++) {
 		struct membank *bank = &meminfo.bank[j];

^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2010-10-26 19:30 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-10-25 10:48 [PATCH] ARM: memblock: set allocation limit for MEMBLOCK_ALLOC_ANYWHERE Catalin Marinas
2010-10-25 15:15 ` Russell King - ARM Linux
2010-10-25 22:55   ` Will Deacon
2010-10-26 10:56     ` Russell King - ARM Linux
2010-10-26 18:08       ` Will Deacon
2010-10-26 19:30         ` Russell King - ARM Linux

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).