Commit d9cf600e authored by Kunwu Chan's avatar Kunwu Chan Committed by Michael Ellerman
Browse files

powerpc/mm: Code cleanup for __hash_page_thp



This part was commented from commit 6d492ecc
("powerpc/THP: Add code to handle HPTE faults for hugepages")
in about 11 years before.

If there are no plans to enable this part code in the future,
we can remove this dead code and replace with a comment
explaining what the dead code was trying to say.

Signed-off-by: default avatarKunwu Chan <chentao@kylinos.cn>
Suggested-by: default avatarMichael Ellerman <mpe@ellerman.id.au>
Suggested-by: default avatar"Aneesh Kumar K.V" <aneesh.kumar@kernel.org>
Signed-off-by: default avatarMichael Ellerman <mpe@ellerman.id.au>
Link: https://msgid.link/20240301085834.1512921-1-chentao@kylinos.cn
parent ad86d7ee
Loading
Loading
Loading
Loading
+6 −9
Original line number Diff line number Diff line
@@ -59,16 +59,13 @@ int __hash_page_thp(unsigned long ea, unsigned long access, unsigned long vsid,

	rflags = htab_convert_pte_flags(new_pmd, flags);

#if 0
	if (!cpu_has_feature(CPU_FTR_COHERENT_ICACHE)) {

	/*
		 * No CPU has hugepages but lacks no execute, so we
		 * don't need to worry about that case
	 * THPs are only supported on platforms that can do mixed page size
	 * segments (MPSS) and all such platforms have coherent icache. Hence we
	 * don't need to do lazy icache flush (hash_page_do_lazy_icache()) on
	 * noexecute fault.
	 */
		rflags = hash_page_do_lazy_icache(rflags, __pte(old_pte), trap);
	}
#endif

	/*
	 * Find the slot index details for this ea, using base page size.
	 */