Skip to content

Commit 9ab2601

Browse files
Zhenhua Huangwilldeacon
authored andcommitted
arm64: mm: Test for pmd_sect() in vmemmap_check_pmd()
Commit 2045a3b ("mm/sparse-vmemmap: generalise vmemmap_populate_hugepages()") introduces the vmemmap_check_pmd() while does not verify if the entry is a section mapping, as is already done for Loongarch & X86. The update includes a check for pmd_sect(). Only if pmd_sect() returns true, further vmemmap population for the addr is skipped. Signed-off-by: Zhenhua Huang <quic_zhenhuah@quicinc.com> Reviewed-by: Anshuman Khandual <anshuman.khandual@arm.com> Link: https://lore.kernel.org/r/20250102074047.674156-1-quic_zhenhuah@quicinc.com Signed-off-by: Will Deacon <will@kernel.org>
1 parent fe2169f commit 9ab2601

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

arch/arm64/mm/mmu.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1169,7 +1169,8 @@ int __meminit vmemmap_check_pmd(pmd_t *pmdp, int node,
11691169
unsigned long addr, unsigned long next)
11701170
{
11711171
vmemmap_verify((pte_t *)pmdp, node, addr, next);
1172-
return 1;
1172+
1173+
return pmd_sect(READ_ONCE(*pmdp));
11731174
}
11741175

11751176
int __meminit vmemmap_populate(unsigned long start, unsigned long end, int node,

0 commit comments

Comments
 (0)