提交 b817dbdb 编写于 作者: Y Youling Tang 提交者: Hongchen Zhang

LoongArch: Flush TLB earlier at initialization

LoongArch inclusion
category: feature
bugzilla: https://gitee.com/openeuler/kernel/issues/I736HO

--------------------------------

Move local_flush_tlb_all() earlier (just after setup_ptwalker() and
before page allocation). This can avoid stale TLB entries misguiding
the later page allocation. Without this patch the second kernel of
kexec/kdump fails to boot SMP.
Signed-off-by: NHuacai Chen <chenhuacai@loongson.cn>
Signed-off-by: NYouling Tang <tangyouling@loongson.cn>
Change-Id: I118e0c8aafabfef28bc47a0d06286db850b6e79e
上级 530b3d21
......@@ -258,6 +258,7 @@ extern long exception_handlers[VECSIZE * 128 / sizeof(long)];
void setup_tlb_handler(int cpu)
{
setup_ptwalker();
local_flush_tlb_all();
output_pgtable_bits_defines();
/* The tlb handlers are generated only once */
......@@ -302,5 +303,4 @@ void tlb_init(int cpu)
write_csr_stlbpgsize(PS_DEFAULT_SIZE);
write_csr_tlbrefill_pagesize(PS_DEFAULT_SIZE);
setup_tlb_handler(cpu);
local_flush_tlb_all();
}
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册