hc
2024-05-10 37f49e37ab4cb5d0bc4c60eb5c6d4dd57db767bb
kernel/arch/m68k/include/asm/page.h
....@@ -21,19 +21,32 @@
2121 /*
2222 * These are used to make use of C type-checking..
2323 */
24
+#if !defined(CONFIG_MMU) || CONFIG_PGTABLE_LEVELS == 3
25
+typedef struct { unsigned long pmd; } pmd_t;
26
+#define pmd_val(x) ((&x)->pmd)
27
+#define __pmd(x) ((pmd_t) { (x) } )
28
+#endif
29
+
2430 typedef struct { unsigned long pte; } pte_t;
25
-typedef struct { unsigned long pmd[16]; } pmd_t;
2631 typedef struct { unsigned long pgd; } pgd_t;
2732 typedef struct { unsigned long pgprot; } pgprot_t;
33
+
34
+#if defined(CONFIG_SUN3)
35
+/*
36
+ * Sun3 still uses the asm-generic/pgalloc.h code and thus needs this
37
+ * definition. It would be possible to unify Sun3 and ColdFire pgalloc and have
38
+ * all of m68k use the same type.
39
+ */
2840 typedef struct page *pgtable_t;
41
+#else
42
+typedef pte_t *pgtable_t;
43
+#endif
2944
3045 #define pte_val(x) ((x).pte)
31
-#define pmd_val(x) ((&x)->pmd[0])
3246 #define pgd_val(x) ((x).pgd)
3347 #define pgprot_val(x) ((x).pgprot)
3448
3549 #define __pte(x) ((pte_t) { (x) } )
36
-#define __pmd(x) ((pmd_t) { { (x) }, })
3750 #define __pgd(x) ((pgd_t) { (x) } )
3851 #define __pgprot(x) ((pgprot_t) { (x) } )
3952
....@@ -51,9 +64,6 @@
5164
5265 #define __phys_to_pfn(paddr) ((unsigned long)((paddr) >> PAGE_SHIFT))
5366 #define __pfn_to_phys(pfn) PFN_PHYS(pfn)
54
-
55
-#define VM_DATA_DEFAULT_FLAGS (VM_READ | VM_WRITE | VM_EXEC | \
56
- VM_MAYREAD | VM_MAYWRITE | VM_MAYEXEC)
5767
5868 #include <asm-generic/getorder.h>
5969