riscv supports soft-dirty and PUD-sized transparent huge pages, but only provides pmd_soft_dirty() and not pud_soft_dirty(). Add it, so generic code can check the soft-dirty bit of a huge PUD. Signed-off-by: Carlos López --- arch/riscv/include/asm/pgtable.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/arch/riscv/include/asm/pgtable.h b/arch/riscv/include/asm/pgtable.h index 2ebd5fa5adc5..40890f51dec6 100644 --- a/arch/riscv/include/asm/pgtable.h +++ b/arch/riscv/include/asm/pgtable.h @@ -949,6 +949,11 @@ static inline pmd_t pmd_clear_soft_dirty(pmd_t pmd) return pte_pmd(pte_clear_soft_dirty(pmd_pte(pmd))); } +static inline bool pud_soft_dirty(pud_t pud) +{ + return pte_soft_dirty(pud_pte(pud)); +} + #ifdef CONFIG_ARCH_HAS_PMD_SOFTLEAVES static inline bool pmd_swp_soft_dirty(pmd_t pmd) { -- 2.51.0