ARM: mmu: fix cache flushing when replacing a section with a PTE
When replacing a section with a PTE, we must make sure that the newly
initialized PTE entries are flushed from the cache before changing the
entry in the TTB. Otherwise a L1 TLB miss causes the hardware pagetable
walker to walk into a PTE with undefined content, causing exactly that
behaviour.

Move all the necessary cache flushing to arm_create_pte(), to avoid any
caller getting this wrong in the future.

Fixes: e3e54c644180 (ARM: mmu: Implement on-demand PTE allocation)
Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
1 parent 4996ed5 commit c52b0baf0f69420b9fd1b88cdb2dd321bdd9c4be
@Lucas Stach Lucas Stach authored on 25 Jul 2018
Showing 1 changed file
View
arch/arm/cpu/mmu.c