mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-06 02:50:49 +09:00
LoongArch: mm: Add p?d_leaf() definitions
commit303be4b335upstream. 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 commit501b810467("mips: mm: add p?d_leaf() definitions") add p?d_leaf() definition for LoongArch. Fixes:09cfefb7fa("LoongArch: Add memory management") Cc: stable@vger.kernel.org Acked-by: David Hildenbrand <david@redhat.com> Signed-off-by: Hongchen Zhang <zhanghongchen@loongson.cn> Signed-off-by: Huacai Chen <chenhuacai@loongson.cn> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
5a8b2c1665
commit
cc9bf2d62f
@@ -560,6 +560,9 @@ static inline long pmd_protnone(pmd_t pmd)
|
|||||||
}
|
}
|
||||||
#endif /* CONFIG_NUMA_BALANCING */
|
#endif /* CONFIG_NUMA_BALANCING */
|
||||||
|
|
||||||
|
#define pmd_leaf(pmd) ((pmd_val(pmd) & _PAGE_HUGE) != 0)
|
||||||
|
#define pud_leaf(pud) ((pud_val(pud) & _PAGE_HUGE) != 0)
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* We provide our own get_unmapped area to cope with the virtual aliasing
|
* We provide our own get_unmapped area to cope with the virtual aliasing
|
||||||
* constraints placed on us by the cache architecture.
|
* constraints placed on us by the cache architecture.
|
||||||
|
|||||||
Reference in New Issue
Block a user