提交 37468b30 编写于 作者: P Po-Yu Chuang 提交者: Russell King

ARM: 7753/1: map_init_section flushes incorrect pmd

This bug was introduced in commit e651eab0.
Some v4/v5 platforms failed to boot due to this.
Signed-off-by: NPo-Yu Chuang <ratbert.chuang@gmail.com>
Signed-off-by: NRussell King <rmk+kernel@arm.linux.org.uk>
上级 69155794
...@@ -616,10 +616,12 @@ static void __init alloc_init_pte(pmd_t *pmd, unsigned long addr, ...@@ -616,10 +616,12 @@ static void __init alloc_init_pte(pmd_t *pmd, unsigned long addr,
} while (pte++, addr += PAGE_SIZE, addr != end); } while (pte++, addr += PAGE_SIZE, addr != end);
} }
static void __init map_init_section(pmd_t *pmd, unsigned long addr, static void __init __map_init_section(pmd_t *pmd, unsigned long addr,
unsigned long end, phys_addr_t phys, unsigned long end, phys_addr_t phys,
const struct mem_type *type) const struct mem_type *type)
{ {
pmd_t *p = pmd;
#ifndef CONFIG_ARM_LPAE #ifndef CONFIG_ARM_LPAE
/* /*
* In classic MMU format, puds and pmds are folded in to * In classic MMU format, puds and pmds are folded in to
...@@ -638,7 +640,7 @@ static void __init map_init_section(pmd_t *pmd, unsigned long addr, ...@@ -638,7 +640,7 @@ static void __init map_init_section(pmd_t *pmd, unsigned long addr,
phys += SECTION_SIZE; phys += SECTION_SIZE;
} while (pmd++, addr += SECTION_SIZE, addr != end); } while (pmd++, addr += SECTION_SIZE, addr != end);
flush_pmd_entry(pmd); flush_pmd_entry(p);
} }
static void __init alloc_init_pmd(pud_t *pud, unsigned long addr, static void __init alloc_init_pmd(pud_t *pud, unsigned long addr,
...@@ -661,7 +663,7 @@ static void __init alloc_init_pmd(pud_t *pud, unsigned long addr, ...@@ -661,7 +663,7 @@ static void __init alloc_init_pmd(pud_t *pud, unsigned long addr,
*/ */
if (type->prot_sect && if (type->prot_sect &&
((addr | next | phys) & ~SECTION_MASK) == 0) { ((addr | next | phys) & ~SECTION_MASK) == 0) {
map_init_section(pmd, addr, next, phys, type); __map_init_section(pmd, addr, next, phys, type);
} else { } else {
alloc_init_pte(pmd, addr, next, alloc_init_pte(pmd, addr, next,
__phys_to_pfn(phys), type); __phys_to_pfn(phys), type);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册