未验证 提交 21190b74 编写于 作者: G Greentime Hu 提交者: Palmer Dabbelt

riscv: Add sfence.vma after early page table changes

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: f2c17aab ("RISC-V: Implement compile-time fixed mappings")
Reported-by: NSyven Wang <syven.wang@sifive.com>
Signed-off-by: NSyven Wang <syven.wang@sifive.com>
Signed-off-by: NGreentime Hu <greentime.hu@sifive.com>
Reviewed-by: NAnup Patel <anup@brainfault.org>
[Palmer: Cleaned up the commit text]
Signed-off-by: NPalmer Dabbelt <palmerdabbelt@google.com>
上级 66d18dbd
无相关合并请求
......@@ -226,12 +226,11 @@ void __set_fixmap(enum fixed_addresses idx, phys_addr_t phys, pgprot_t prot)
ptep = &fixmap_pte[pte_index(addr)];
if (pgprot_val(prot)) {
if (pgprot_val(prot))
set_pte(ptep, pfn_pte(phys >> PAGE_SHIFT, prot));
} else {
else
pte_clear(&init_mm, addr, ptep);
local_flush_tlb_page(addr);
}
local_flush_tlb_page(addr);
}
static pte_t *__init get_pte_virt(phys_addr_t pa)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册
反馈
建议
客服 返回
顶部