riscv: Add sfence.vma after early page table changes
authorGreentime Hu <greentime.hu@sifive.com>
Tue, 4 Aug 2020 03:02:05 +0000 (11:02 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 23 Sep 2020 10:59:58 +0000 (12:59 +0200)
commit4278efd55e0446dc92a9c20f8d8e3a5564667ca5
treeeec1caf6d3e8e3c7a3ad0065e814bb80b0a49203
parenta7e4fef638460a0c6142454c5ccba7a185e9cdb5
riscv: Add sfence.vma after early page table changes

[ Upstream commit 21190b74bcf3a36ebab9a715088c29f59877e1f3 ]

This invalidates local TLB after modifying the page tables during early init as
it's too early to handle suprious faults as we otherwise do.

Fixes: f2c17aabc917 ("RISC-V: Implement compile-time fixed mappings")
Reported-by: Syven Wang <syven.wang@sifive.com>
Signed-off-by: Syven Wang <syven.wang@sifive.com>
Signed-off-by: Greentime Hu <greentime.hu@sifive.com>
Reviewed-by: Anup Patel <anup@brainfault.org>
[Palmer: Cleaned up the commit text]
Signed-off-by: Palmer Dabbelt <palmerdabbelt@google.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
arch/riscv/mm/init.c