diff options
author | Russell King <rmk+kernel@arm.linux.org.uk> | 2014-07-29 09:24:47 +0100 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2014-08-07 14:52:36 -0700 |
commit | a406f3b4cd123c2d0dbc985237b8b903b774dccd (patch) | |
tree | 5cb77f3a6b984950c6025ec0902e82b0e61d0134 /arch/arm | |
parent | 8702256f25b7a6955fcb94c4f2901b7410f080ee (diff) | |
download | lwn-a406f3b4cd123c2d0dbc985237b8b903b774dccd.tar.gz lwn-a406f3b4cd123c2d0dbc985237b8b903b774dccd.zip |
ARM: fix alignment of keystone page table fixup
commit 823a19cd3b91b0729d7417f1848413846be61712 upstream.
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()")
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'arch/arm')
-rw-r--r-- | arch/arm/mm/mmu.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/arch/arm/mm/mmu.c b/arch/arm/mm/mmu.c index b68c6b22e1c8..f15c22e8bcd5 100644 --- a/arch/arm/mm/mmu.c +++ b/arch/arm/mm/mmu.c @@ -1436,8 +1436,8 @@ void __init early_paging_init(const struct machine_desc *mdesc, return; /* remap kernel code and data */ - map_start = init_mm.start_code; - map_end = init_mm.brk; + map_start = init_mm.start_code & PMD_MASK; + map_end = ALIGN(init_mm.brk, PMD_SIZE); /* get a handle on things... */ pgd0 = pgd_offset_k(0); @@ -1472,7 +1472,7 @@ void __init early_paging_init(const struct machine_desc *mdesc, } /* remap pmds for kernel mapping */ - phys = __pa(map_start) & PMD_MASK; + phys = __pa(map_start); do { *pmdk++ = __pmd(phys | pmdprot); phys += PMD_SIZE; |