hc
2024-02-20 102a0743326a03cd1a1202ceda21e175b7d3575c
kernel/arch/powerpc/include/asm/pgtable-types.h
....@@ -3,7 +3,11 @@
33 #define _ASM_POWERPC_PGTABLE_TYPES_H
44
55 /* PTE level */
6
+#if defined(CONFIG_PPC_8xx) && defined(CONFIG_PPC_16K_PAGES)
7
+typedef struct { pte_basic_t pte, pte1, pte2, pte3; } pte_t;
8
+#else
69 typedef struct { pte_basic_t pte; } pte_t;
10
+#endif
711 #define __pte(x) ((pte_t) { (x) })
812 static inline pte_basic_t pte_val(pte_t x)
913 {
....@@ -19,18 +23,13 @@
1923 return x.pmd;
2024 }
2125
22
-/*
23
- * 64 bit hash always use 4 level table. Everybody else use 4 level
24
- * only for 4K page size.
25
- */
26
-#if defined(CONFIG_PPC_BOOK3S_64) || !defined(CONFIG_PPC_64K_PAGES)
26
+/* 64 bit always use 4 level table. */
2727 typedef struct { unsigned long pud; } pud_t;
2828 #define __pud(x) ((pud_t) { (x) })
2929 static inline unsigned long pud_val(pud_t x)
3030 {
3131 return x.pud;
3232 }
33
-#endif /* CONFIG_PPC_BOOK3S_64 || !CONFIG_PPC_64K_PAGES */
3433 #endif /* CONFIG_PPC64 */
3534
3635 /* PGD level */
....@@ -50,7 +49,7 @@
5049 * With hash config 64k pages additionally define a bigger "real PTE" type that
5150 * gathers the "second half" part of the PTE for pseudo 64k pages
5251 */
53
-#if defined(CONFIG_PPC_64K_PAGES) && defined(CONFIG_PPC_BOOK3S_64)
52
+#ifdef CONFIG_PPC_64K_PAGES
5453 typedef struct { pte_t pte; unsigned long hidx; } real_pte_t;
5554 #else
5655 typedef struct { pte_t pte; } real_pte_t;