aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRussell King <rmk+kernel@arm.linux.org.uk>2010-10-27 13:09:59 -0400
committerRussell King <rmk+kernel@arm.linux.org.uk>2010-10-27 16:41:39 -0400
commit4e929d2bcf13eeaa9636448c55690b383a910391 (patch)
treec50dbc31dc4d2c6fee40c17fec06ef90c84a5ee6
parent88d927e94805ebeec11ec7687df7789b954e334e (diff)
ARM: fix memblock breakage
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>
-rw-r--r--arch/arm/include/asm/memblock.h7
-rw-r--r--arch/arm/mm/mmu.c4
2 files changed, 1 insertions, 10 deletions
diff --git a/arch/arm/include/asm/memblock.h b/arch/arm/include/asm/memblock.h
index fdbc43b2e6c0..b8da2e415e4e 100644
--- a/arch/arm/include/asm/memblock.h
+++ b/arch/arm/include/asm/memblock.h
@@ -1,13 +1,6 @@
1#ifndef _ASM_ARM_MEMBLOCK_H 1#ifndef _ASM_ARM_MEMBLOCK_H
2#define _ASM_ARM_MEMBLOCK_H 2#define _ASM_ARM_MEMBLOCK_H
3 3
4#ifdef CONFIG_MMU
5extern phys_addr_t lowmem_end_addr;
6#define MEMBLOCK_REAL_LIMIT lowmem_end_addr
7#else
8#define MEMBLOCK_REAL_LIMIT 0
9#endif
10
11struct meminfo; 4struct meminfo;
12struct machine_desc; 5struct machine_desc;
13 6
diff --git a/arch/arm/mm/mmu.c b/arch/arm/mm/mmu.c
index d184d25e9a5f..8e21b4e721e4 100644
--- a/arch/arm/mm/mmu.c
+++ b/arch/arm/mm/mmu.c
@@ -745,13 +745,11 @@ static int __init early_vmalloc(char *arg)
745} 745}
746early_param("vmalloc", early_vmalloc); 746early_param("vmalloc", early_vmalloc);
747 747
748phys_addr_t lowmem_end_addr;
749
750static void __init sanity_check_meminfo(void) 748static void __init sanity_check_meminfo(void)
751{ 749{
752 int i, j, highmem = 0; 750 int i, j, highmem = 0;
753 751
754 lowmem_end_addr = __pa(vmalloc_min - 1) + 1; 752 memblock_set_current_limit(__pa(vmalloc_min - 1) + 1);
755 753
756 for (i = 0, j = 0; i < meminfo.nr_banks; i++) { 754 for (i = 0, j = 0; i < meminfo.nr_banks; i++) {
757 struct membank *bank = &meminfo.bank[j]; 755 struct membank *bank = &meminfo.bank[j];