[RFC PATCH] ARM: LPAE: Fix alloc_init_section to flush all the pmd entries.
From: R Sricharan <hidden>
Date: 2012-08-06 10:33:50
flush_pmd_entry flushes one cache line by MVA. This is called by alloc_init_section to flush the mapped pmd entries. But this is called outside the loop and when LPAE is enabled the number of pmd entries to be flushed can be across multiple cache lines. So call this inside the loop so that all the mapped entries are flushed. This is going to result in additional cache line flushes. There might be other better way to handle this. Signed-off-by: R Sricharan <redacted> Cc: Catalin Marinas <catalin.marinas@arm.com> Cc: Santosh Shilimkar <redacted> --- arch/arm/mm/mmu.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/arch/arm/mm/mmu.c b/arch/arm/mm/mmu.c
index 0ed8808..02af3fe 100644
--- a/arch/arm/mm/mmu.c
+++ b/arch/arm/mm/mmu.c@@ -619,7 +619,6 @@ static void __init alloc_init_section(pud_t *pud, unsigned long addr, * up one logical pointer to an L2 table. */ if (type->prot_sect && ((addr | end | phys) & ~SECTION_MASK) == 0) { - pmd_t *p = pmd; #ifndef CONFIG_ARM_LPAE if (addr & SECTION_SIZE)
@@ -629,9 +628,8 @@ static void __init alloc_init_section(pud_t *pud, unsigned long addr, do { *pmd = __pmd(phys | type->prot_sect); phys += SECTION_SIZE; + flush_pmd_entry(pmd); } while (pmd++, addr += SECTION_SIZE, addr != end); - - flush_pmd_entry(p); } else { /* * No need to loop; pte's aren't interested in the
--
1.7.9.5