ARM: fix memblock breakage
authorRussell King <rmk+kernel@arm.linux.org.uk>
Wed, 27 Oct 2010 17:09:59 +0000 (18:09 +0100)
committerRussell King <rmk+kernel@arm.linux.org.uk>
Wed, 27 Oct 2010 20:41:39 +0000 (21:41 +0100)
Will says:
| 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.

Unfortunately, ARM was missed out of this change.  Fix this.

Reported-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
arch/arm/include/asm/memblock.h
arch/arm/mm/mmu.c

index fdbc43b2e6c05ac45a0d7f8d0692eb013e5ed862..b8da2e415e4eb21a870cbb52333b5400a50ad163 100644 (file)
@@ -1,13 +1,6 @@
 #ifndef _ASM_ARM_MEMBLOCK_H
 #define _ASM_ARM_MEMBLOCK_H
 
-#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;
 struct machine_desc;
 
index d184d25e9a5ff622397721337f751752973c4c4e..8e21b4e721e41926dd5c0f62f92a8047b89af53b 100644 (file)
@@ -745,13 +745,11 @@ static int __init early_vmalloc(char *arg)
 }
 early_param("vmalloc", early_vmalloc);
 
-phys_addr_t lowmem_end_addr;
-
 static void __init sanity_check_meminfo(void)
 {
        int i, j, highmem = 0;
 
-       lowmem_end_addr = __pa(vmalloc_min - 1) + 1;
+       memblock_set_current_limit(__pa(vmalloc_min - 1) + 1);
 
        for (i = 0, j = 0; i < meminfo.nr_banks; i++) {
                struct membank *bank = &meminfo.bank[j];