Skip to content

Commit 303be4b

Browse files
Hongchen Zhangchenhuacai
authored andcommitted
LoongArch: mm: Add p?d_leaf() definitions
When I do LTP test, LTP test case ksm06 caused panic at break_ksm_pmd_entry -> pmd_leaf (Huge page table but False) -> pte_present (panic) The reason is pmd_leaf() is not defined, So like commit 501b810 ("mips: mm: add p?d_leaf() definitions") add p?d_leaf() definition for LoongArch. Fixes: 09cfefb ("LoongArch: Add memory management") Cc: [email protected] Acked-by: David Hildenbrand <[email protected]> Signed-off-by: Hongchen Zhang <[email protected]> Signed-off-by: Huacai Chen <[email protected]>
1 parent 8ff81bb commit 303be4b

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

arch/loongarch/include/asm/pgtable.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -593,6 +593,9 @@ static inline long pmd_protnone(pmd_t pmd)
593593
}
594594
#endif /* CONFIG_NUMA_BALANCING */
595595

596+
#define pmd_leaf(pmd) ((pmd_val(pmd) & _PAGE_HUGE) != 0)
597+
#define pud_leaf(pud) ((pud_val(pud) & _PAGE_HUGE) != 0)
598+
596599
/*
597600
* We provide our own get_unmapped area to cope with the virtual aliasing
598601
* constraints placed on us by the cache architecture.

0 commit comments

Comments
 (0)