diff options
Diffstat (limited to 'include/asm-ppc64/page.h')
-rw-r--r-- | include/asm-ppc64/page.h | 26 |
1 files changed, 15 insertions, 11 deletions
diff --git a/include/asm-ppc64/page.h b/include/asm-ppc64/page.h index a5893a305a09..7e7b18ea986e 100644 --- a/include/asm-ppc64/page.h +++ b/include/asm-ppc64/page.h | |||
@@ -46,6 +46,7 @@ | |||
46 | 46 | ||
47 | #define ARCH_HAS_HUGEPAGE_ONLY_RANGE | 47 | #define ARCH_HAS_HUGEPAGE_ONLY_RANGE |
48 | #define ARCH_HAS_PREPARE_HUGEPAGE_RANGE | 48 | #define ARCH_HAS_PREPARE_HUGEPAGE_RANGE |
49 | #define ARCH_HAS_SETCLEAR_HUGE_PTE | ||
49 | 50 | ||
50 | #define touches_hugepage_low_range(mm, addr, len) \ | 51 | #define touches_hugepage_low_range(mm, addr, len) \ |
51 | (LOW_ESID_MASK((addr), (len)) & mm->context.htlb_segs) | 52 | (LOW_ESID_MASK((addr), (len)) & mm->context.htlb_segs) |
@@ -125,36 +126,42 @@ extern void copy_user_page(void *to, void *from, unsigned long vaddr, struct pag | |||
125 | * Entries in the pte table are 64b, while entries in the pgd & pmd are 32b. | 126 | * Entries in the pte table are 64b, while entries in the pgd & pmd are 32b. |
126 | */ | 127 | */ |
127 | typedef struct { unsigned long pte; } pte_t; | 128 | typedef struct { unsigned long pte; } pte_t; |
128 | typedef struct { unsigned int pmd; } pmd_t; | 129 | typedef struct { unsigned long pmd; } pmd_t; |
129 | typedef struct { unsigned int pgd; } pgd_t; | 130 | typedef struct { unsigned long pud; } pud_t; |
131 | typedef struct { unsigned long pgd; } pgd_t; | ||
130 | typedef struct { unsigned long pgprot; } pgprot_t; | 132 | typedef struct { unsigned long pgprot; } pgprot_t; |
131 | 133 | ||
132 | #define pte_val(x) ((x).pte) | 134 | #define pte_val(x) ((x).pte) |
133 | #define pmd_val(x) ((x).pmd) | 135 | #define pmd_val(x) ((x).pmd) |
136 | #define pud_val(x) ((x).pud) | ||
134 | #define pgd_val(x) ((x).pgd) | 137 | #define pgd_val(x) ((x).pgd) |
135 | #define pgprot_val(x) ((x).pgprot) | 138 | #define pgprot_val(x) ((x).pgprot) |
136 | 139 | ||
137 | #define __pte(x) ((pte_t) { (x) } ) | 140 | #define __pte(x) ((pte_t) { (x) }) |
138 | #define __pmd(x) ((pmd_t) { (x) } ) | 141 | #define __pmd(x) ((pmd_t) { (x) }) |
139 | #define __pgd(x) ((pgd_t) { (x) } ) | 142 | #define __pud(x) ((pud_t) { (x) }) |
140 | #define __pgprot(x) ((pgprot_t) { (x) } ) | 143 | #define __pgd(x) ((pgd_t) { (x) }) |
144 | #define __pgprot(x) ((pgprot_t) { (x) }) | ||
141 | 145 | ||
142 | #else | 146 | #else |
143 | /* | 147 | /* |
144 | * .. while these make it easier on the compiler | 148 | * .. while these make it easier on the compiler |
145 | */ | 149 | */ |
146 | typedef unsigned long pte_t; | 150 | typedef unsigned long pte_t; |
147 | typedef unsigned int pmd_t; | 151 | typedef unsigned long pmd_t; |
148 | typedef unsigned int pgd_t; | 152 | typedef unsigned long pud_t; |
153 | typedef unsigned long pgd_t; | ||
149 | typedef unsigned long pgprot_t; | 154 | typedef unsigned long pgprot_t; |
150 | 155 | ||
151 | #define pte_val(x) (x) | 156 | #define pte_val(x) (x) |
152 | #define pmd_val(x) (x) | 157 | #define pmd_val(x) (x) |
158 | #define pud_val(x) (x) | ||
153 | #define pgd_val(x) (x) | 159 | #define pgd_val(x) (x) |
154 | #define pgprot_val(x) (x) | 160 | #define pgprot_val(x) (x) |
155 | 161 | ||
156 | #define __pte(x) (x) | 162 | #define __pte(x) (x) |
157 | #define __pmd(x) (x) | 163 | #define __pmd(x) (x) |
164 | #define __pud(x) (x) | ||
158 | #define __pgd(x) (x) | 165 | #define __pgd(x) (x) |
159 | #define __pgprot(x) (x) | 166 | #define __pgprot(x) (x) |
160 | 167 | ||
@@ -208,9 +215,6 @@ extern u64 ppc64_pft_size; /* Log 2 of page table size */ | |||
208 | #define USER_REGION_ID (0UL) | 215 | #define USER_REGION_ID (0UL) |
209 | #define REGION_ID(ea) (((unsigned long)(ea)) >> REGION_SHIFT) | 216 | #define REGION_ID(ea) (((unsigned long)(ea)) >> REGION_SHIFT) |
210 | 217 | ||
211 | #define __bpn_to_ba(x) ((((unsigned long)(x)) << PAGE_SHIFT) + KERNELBASE) | ||
212 | #define __ba_to_bpn(x) ((((unsigned long)(x)) & ~REGION_MASK) >> PAGE_SHIFT) | ||
213 | |||
214 | #define __va(x) ((void *)((unsigned long)(x) + KERNELBASE)) | 218 | #define __va(x) ((void *)((unsigned long)(x) + KERNELBASE)) |
215 | 219 | ||
216 | #ifdef CONFIG_DISCONTIGMEM | 220 | #ifdef CONFIG_DISCONTIGMEM |