hc
2024-05-10 23fa18eaa71266feff7ba8d83022d9e1cc83c65a
kernel/include/asm-generic/pgtable-nopud.h
....@@ -4,9 +4,6 @@
44
55 #ifndef __ASSEMBLY__
66
7
-#ifdef __ARCH_USE_5LEVEL_HACK
8
-#include <asm-generic/pgtable-nop4d-hack.h>
9
-#else
107 #include <asm-generic/pgtable-nop4d.h>
118
129 #define __PAGETABLE_PUD_FOLDED 1
....@@ -35,6 +32,7 @@
3532 #define pud_ERROR(pud) (p4d_ERROR((pud).p4d))
3633
3734 #define p4d_populate(mm, p4d, pud) do { } while (0)
35
+#define p4d_populate_safe(mm, p4d, pud) do { } while (0)
3836 /*
3937 * (puds are folded into p4ds so this doesn't get actually called,
4038 * but the define is needed for a generic inline function.)
....@@ -45,12 +43,13 @@
4543 {
4644 return (pud_t *)p4d;
4745 }
46
+#define pud_offset pud_offset
4847
4948 #define pud_val(x) (p4d_val((x).p4d))
5049 #define __pud(x) ((pud_t) { __p4d(x) })
5150
5251 #define p4d_page(p4d) (pud_page((pud_t){ p4d }))
53
-#define p4d_page_vaddr(p4d) (pud_page_vaddr((pud_t){ p4d }))
52
+#define p4d_pgtable(p4d) ((pud_t *)(pud_pgtable((pud_t){ p4d })))
5453
5554 /*
5655 * allocating and freeing a pud is trivial: the 1-entry pud is
....@@ -58,11 +57,10 @@
5857 */
5958 #define pud_alloc_one(mm, address) NULL
6059 #define pud_free(mm, x) do { } while (0)
61
-#define __pud_free_tlb(tlb, x, a) do { } while (0)
60
+#define pud_free_tlb(tlb, x, a) do { } while (0)
6261
6362 #undef pud_addr_end
6463 #define pud_addr_end(addr, end) (end)
6564
6665 #endif /* __ASSEMBLY__ */
67
-#endif /* !__ARCH_USE_5LEVEL_HACK */
6866 #endif /* _PGTABLE_NOPUD_H */