aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorRussell King <rmk+kernel@arm.linux.org.uk>2014-07-29 04:24:47 -0400
committerRussell King <rmk+kernel@arm.linux.org.uk>2014-07-29 06:41:54 -0400
commit823a19cd3b91b0729d7417f1848413846be61712 (patch)
tree77b6727f3f87ecf204f8c36a4bd2d43728637477 /arch
parent91942d17667a7e7976d3e8bc2f18a34c12bed9fc (diff)
ARM: fix alignment of keystone page table fixup
If init_mm.brk is not section aligned, the LPAE fixup code will miss updating the final PMD. Fix this by aligning map_end. Fixes: a77e0c7b2774 ("ARM: mm: Recreate kernel mappings in early_paging_init()") Cc: <stable@vger.kernel.org> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'arch')
-rw-r--r--arch/arm/mm/mmu.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/arch/arm/mm/mmu.c b/arch/arm/mm/mmu.c
index ab14b79b03f0..6e3ba8d112a2 100644
--- a/arch/arm/mm/mmu.c
+++ b/arch/arm/mm/mmu.c
@@ -1406,8 +1406,8 @@ void __init early_paging_init(const struct machine_desc *mdesc,
1406 return; 1406 return;
1407 1407
1408 /* remap kernel code and data */ 1408 /* remap kernel code and data */
1409 map_start = init_mm.start_code; 1409 map_start = init_mm.start_code & PMD_MASK;
1410 map_end = init_mm.brk; 1410 map_end = ALIGN(init_mm.brk, PMD_SIZE);
1411 1411
1412 /* get a handle on things... */ 1412 /* get a handle on things... */
1413 pgd0 = pgd_offset_k(0); 1413 pgd0 = pgd_offset_k(0);
@@ -1442,7 +1442,7 @@ void __init early_paging_init(const struct machine_desc *mdesc,
1442 } 1442 }
1443 1443
1444 /* remap pmds for kernel mapping */ 1444 /* remap pmds for kernel mapping */
1445 phys = __pa(map_start) & PMD_MASK; 1445 phys = __pa(map_start);
1446 do { 1446 do {
1447 *pmdk++ = __pmd(phys | pmdprot); 1447 *pmdk++ = __pmd(phys | pmdprot);
1448 phys += PMD_SIZE; 1448 phys += PMD_SIZE;