hc
2024-02-19 1c055e55a242a33e574e48be530e06770a210dcd
kernel/arch/sh/include/asm/pgtable-3level.h
....@@ -2,7 +2,6 @@
22 #ifndef __ASM_SH_PGTABLE_3LEVEL_H
33 #define __ASM_SH_PGTABLE_3LEVEL_H
44
5
-#define __ARCH_USE_5LEVEL_HACK
65 #include <asm-generic/pgtable-nopud.h>
76
87 /*
....@@ -33,17 +32,13 @@
3332 #define pmd_val(x) ((x).pmd)
3433 #define __pmd(x) ((pmd_t) { (x) } )
3534
36
-static inline unsigned long pud_page_vaddr(pud_t pud)
35
+static inline pmd_t *pud_pgtable(pud_t pud)
3736 {
38
- return pud_val(pud);
37
+ return (pmd_t *)(unsigned long)pud_val(pud);
3938 }
4039
41
-#define pmd_index(address) (((address) >> PMD_SHIFT) & (PTRS_PER_PMD-1))
42
-static inline pmd_t *pmd_offset(pud_t *pud, unsigned long address)
43
-{
44
- return (pmd_t *)pud_page_vaddr(*pud) + pmd_index(address);
45
-}
46
-
40
+/* only used by the stubbed out hugetlb gup code, should never be called */
41
+#define pud_page(pud) NULL
4742 #define pud_none(x) (!pud_val(x))
4843 #define pud_present(x) (pud_val(x))
4944 #define pud_clear(xp) do { set_pud(xp, __pud(0)); } while (0)