Thread (29 messages) flat view 29 messages, 5 authors, 17h ago
HOTtoday

Revision v1 of 2 in this series.

Revisions (2)
  1. rfc [diff vs current]
  2. v1 current

[PATCH 6/9] mm: convert PTE table entry to pte

From: Muhammad Usama Anjum <hidden>
Date: 2026-08-06 08:40:44
Also in: bpf, damon, dri-devel, intel-gfx, linux-arch, linux-fsdevel, linux-mm, linux-perf-users, lkml, xen-devel
Subsystem: hugetlb subsystem, the rest · Maintainers: Muchun Song, Oscar Salvador, Linus Torvalds

The non-MMU stub receives hw_pte_t but returns a logical pte_t
value. Convert the stored entry through __pte_from_hw() before
returning.

Signed-off-by: Muhammad Usama Anjum <redacted>
---
 include/linux/hugetlb.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/include/linux/hugetlb.h b/include/linux/hugetlb.h
index bc0b9c65aa1d0..9e8b391aa4bc9 100644
--- a/include/linux/hugetlb.h
+++ b/include/linux/hugetlb.h
@@ -1283,7 +1283,7 @@ static inline pte_t huge_ptep_clear_flush(struct vm_area_struct *vma,
 #ifdef CONFIG_MMU
 	return ptep_get(ptep);
 #else
-	return *ptep;
+	return __pte_from_hw(*ptep);
 #endif
 }
 
-- 
2.47.3
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help