Commit d23a6be7 authored by Mao Minkai's avatar Mao Minkai Committed by guzitao
Browse files

sw64: fix set_huge_pte_at for C4

Sunway inclusion
category: bugfix
bugzilla: https://gitee.com/openeuler/kernel/issues/IB73UR



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

Use clear_flush instead of get_and_clear to make sure tlb would be
flushd.

Signed-off-by: default avatarMao Minkai <maominkai@wxiat.com>
Reviewed-by: default avatarHe Sheng <hesheng@wxiat.com>
Signed-off-by: default avatarGu Zitao <guzitao@wxiat.com>
parent eaab417f
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -233,7 +233,7 @@ void set_huge_pte_at(struct mm_struct *mm, unsigned long addr,
	pfn = pte_pfn(pte);
	hugeprot = pte_pgprot(pte);

	get_and_clear(mm, addr, ptep, pgsize, ncontig);
	clear_flush(mm, addr, ptep, pgsize, ncontig);

	for (i = 0; i < ncontig; i++, ptep++, addr += pgsize)
		set_pte_at(mm, addr, ptep, pfn_pte(pfn, hugeprot));