Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

+1 -10
-7
arch/arm/include/asm/memblock.h
··· 1 1 #ifndef _ASM_ARM_MEMBLOCK_H 2 2 #define _ASM_ARM_MEMBLOCK_H 3 3 4 - #ifdef CONFIG_MMU 5 - extern 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 - 11 4 struct meminfo; 12 5 struct machine_desc; 13 6
+1 -3
arch/arm/mm/mmu.c
··· 745 745 } 746 746 early_param("vmalloc", early_vmalloc); 747 747 748 - phys_addr_t lowmem_end_addr; 749 - 750 748 static void __init sanity_check_meminfo(void) 751 749 { 752 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 754 for (i = 0, j = 0; i < meminfo.nr_banks; i++) { 757 755 struct membank *bank = &meminfo.bank[j];