diff options
Diffstat (limited to 'include/asm-s390/pgalloc.h')
-rw-r--r-- | include/asm-s390/pgalloc.h | 32 |
1 files changed, 22 insertions, 10 deletions
diff --git a/include/asm-s390/pgalloc.h b/include/asm-s390/pgalloc.h index 229b0bd59331..709dd1740956 100644 --- a/include/asm-s390/pgalloc.h +++ b/include/asm-s390/pgalloc.h | |||
@@ -56,11 +56,17 @@ static inline unsigned long pgd_entry_type(struct mm_struct *mm) | |||
56 | return _SEGMENT_ENTRY_EMPTY; | 56 | return _SEGMENT_ENTRY_EMPTY; |
57 | } | 57 | } |
58 | 58 | ||
59 | #define pud_alloc_one(mm,address) ({ BUG(); ((pud_t *)2); }) | ||
60 | #define pud_free(x) do { } while (0) | ||
61 | |||
59 | #define pmd_alloc_one(mm,address) ({ BUG(); ((pmd_t *)2); }) | 62 | #define pmd_alloc_one(mm,address) ({ BUG(); ((pmd_t *)2); }) |
60 | #define pmd_free(x) do { } while (0) | 63 | #define pmd_free(x) do { } while (0) |
61 | 64 | ||
62 | #define pgd_populate(mm, pmd, pte) BUG() | 65 | #define pgd_populate(mm, pgd, pud) BUG() |
63 | #define pgd_populate_kernel(mm, pmd, pte) BUG() | 66 | #define pgd_populate_kernel(mm, pgd, pud) BUG() |
67 | |||
68 | #define pud_populate(mm, pud, pmd) BUG() | ||
69 | #define pud_populate_kernel(mm, pud, pmd) BUG() | ||
64 | 70 | ||
65 | #else /* __s390x__ */ | 71 | #else /* __s390x__ */ |
66 | 72 | ||
@@ -69,6 +75,9 @@ static inline unsigned long pgd_entry_type(struct mm_struct *mm) | |||
69 | return _REGION3_ENTRY_EMPTY; | 75 | return _REGION3_ENTRY_EMPTY; |
70 | } | 76 | } |
71 | 77 | ||
78 | #define pud_alloc_one(mm,address) ({ BUG(); ((pud_t *)2); }) | ||
79 | #define pud_free(x) do { } while (0) | ||
80 | |||
72 | static inline pmd_t *pmd_alloc_one(struct mm_struct *mm, unsigned long vmaddr) | 81 | static inline pmd_t *pmd_alloc_one(struct mm_struct *mm, unsigned long vmaddr) |
73 | { | 82 | { |
74 | unsigned long *crst = crst_table_alloc(mm, s390_noexec); | 83 | unsigned long *crst = crst_table_alloc(mm, s390_noexec); |
@@ -78,20 +87,23 @@ static inline pmd_t *pmd_alloc_one(struct mm_struct *mm, unsigned long vmaddr) | |||
78 | } | 87 | } |
79 | #define pmd_free(pmd) crst_table_free((unsigned long *) pmd) | 88 | #define pmd_free(pmd) crst_table_free((unsigned long *) pmd) |
80 | 89 | ||
81 | static inline void pgd_populate_kernel(struct mm_struct *mm, | 90 | #define pgd_populate(mm, pgd, pud) BUG() |
82 | pgd_t *pgd, pmd_t *pmd) | 91 | #define pgd_populate_kernel(mm, pgd, pud) BUG() |
92 | |||
93 | static inline void pud_populate_kernel(struct mm_struct *mm, | ||
94 | pud_t *pud, pmd_t *pmd) | ||
83 | { | 95 | { |
84 | pgd_val(*pgd) = _REGION3_ENTRY | __pa(pmd); | 96 | pud_val(*pud) = _REGION3_ENTRY | __pa(pmd); |
85 | } | 97 | } |
86 | 98 | ||
87 | static inline void pgd_populate(struct mm_struct *mm, pgd_t *pgd, pmd_t *pmd) | 99 | static inline void pud_populate(struct mm_struct *mm, pud_t *pud, pmd_t *pmd) |
88 | { | 100 | { |
89 | pgd_t *shadow_pgd = get_shadow_table(pgd); | 101 | pud_t *shadow_pud = get_shadow_table(pud); |
90 | pmd_t *shadow_pmd = get_shadow_table(pmd); | 102 | pmd_t *shadow_pmd = get_shadow_table(pmd); |
91 | 103 | ||
92 | if (shadow_pgd && shadow_pmd) | 104 | if (shadow_pud && shadow_pmd) |
93 | pgd_populate_kernel(mm, shadow_pgd, shadow_pmd); | 105 | pud_populate_kernel(mm, shadow_pud, shadow_pmd); |
94 | pgd_populate_kernel(mm, pgd, pmd); | 106 | pud_populate_kernel(mm, pud, pmd); |
95 | } | 107 | } |
96 | 108 | ||
97 | #endif /* __s390x__ */ | 109 | #endif /* __s390x__ */ |