ARM: mmu: Make sure that address is 1M aligned in arm_create_pte()
If address passed arm_create_pte() is not 1M (PGDIR_SIZE) aligned,
page table that is created will end up having unexpected mapping
offset, breaking "1:1 mapping" assumption and leading to bugs that are
not immediately obvious in their nature.

To prevent this and because all of the callers already do said
alignement in-place, move the alignment code to be a part of
arm_create_pte().

Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
1 parent fe1d2a3 commit 6419c463d28ff4a48a1a9244c57644497f59ddb6
@Andrey Smirnov Andrey Smirnov authored on 21 May 2018
Sascha Hauer committed on 22 May 2018
Showing 1 changed file
View
arch/arm/cpu/mmu.c