The non-MMU stub receives hw_pte_t but returns a software PTE value. It has no attached PTE that requires ptep_get(), so convert only the stored entry through __pte_from_hw().
Signed-off-by: Muhammad Usama Anjum <[email protected]> --- Changes since v1: - Explain why the NOMMU stub does not use ptep_get(). - Use software PTE value terminology. --- include/linux/hugetlb.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/include/linux/hugetlb.h b/include/linux/hugetlb.h index 0d2101facaa50..637fc863d3687 100644 --- a/include/linux/hugetlb.h +++ b/include/linux/hugetlb.h @@ -1278,7 +1278,8 @@ static inline pte_t huge_ptep_clear_flush(struct vm_area_struct *vma, #ifdef CONFIG_MMU return ptep_get(ptep); #else - return *ptep; + /* No attached PTE that requires ptep_get(). */ + return __pte_from_hw(*ptep); #endif } -- 2.47.3
