提交 4e929d2b 编写于 作者: R Russell King

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: NWill Deacon <will.deacon@arm.com>
Signed-off-by: NRussell King <rmk+kernel@arm.linux.org.uk>
上级 88d927e9
#ifndef _ASM_ARM_MEMBLOCK_H #ifndef _ASM_ARM_MEMBLOCK_H
#define _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 meminfo;
struct machine_desc; struct machine_desc;
......
...@@ -745,13 +745,11 @@ static int __init early_vmalloc(char *arg) ...@@ -745,13 +745,11 @@ static int __init early_vmalloc(char *arg)
} }
early_param("vmalloc", early_vmalloc); early_param("vmalloc", early_vmalloc);
phys_addr_t lowmem_end_addr;
static void __init sanity_check_meminfo(void) static void __init sanity_check_meminfo(void)
{ {
int i, j, highmem = 0; 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++) { for (i = 0, j = 0; i < meminfo.nr_banks; i++) {
struct membank *bank = &meminfo.bank[j]; struct membank *bank = &meminfo.bank[j];
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册