Skip to content

Commit b0d7e15

Browse files
ryanhrobakpm00
authored andcommitted
mm/debug_vm_pgtable: test pmd_leaf() behavior with pmd_mkinvalid()
An invalidated pmd should still cause pmd_leaf() to return true. Let's test for that to ensure all arches remain consistent. Link: https://lkml.kernel.org/r/[email protected] Signed-off-by: Ryan Roberts <[email protected]> Reviewed-by: Anshuman Khandual <[email protected]> Reviewed-by: David Hildenbrand <[email protected]> Cc: Catalin Marinas <[email protected]> Signed-off-by: Andrew Morton <[email protected]>
1 parent a94032b commit b0d7e15

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

mm/debug_vm_pgtable.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -982,6 +982,7 @@ static void __init pmd_thp_tests(struct pgtable_debug_args *args)
982982
#ifndef __HAVE_ARCH_PMDP_INVALIDATE
983983
WARN_ON(!pmd_trans_huge(pmd_mkinvalid(pmd_mkhuge(pmd))));
984984
WARN_ON(!pmd_present(pmd_mkinvalid(pmd_mkhuge(pmd))));
985+
WARN_ON(!pmd_leaf(pmd_mkinvalid(pmd_mkhuge(pmd))));
985986
#endif /* __HAVE_ARCH_PMDP_INVALIDATE */
986987
}
987988

0 commit comments

Comments
 (0)