diff options
Diffstat (limited to 'include/asm-powerpc/page_64.h')
-rw-r--r-- | include/asm-powerpc/page_64.h | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/include/asm-powerpc/page_64.h b/include/asm-powerpc/page_64.h index 3448a3d4bc64..4ee82c61e4d7 100644 --- a/include/asm-powerpc/page_64.h +++ b/include/asm-powerpc/page_64.h | |||
@@ -26,12 +26,18 @@ | |||
26 | */ | 26 | */ |
27 | #define PAGE_FACTOR (PAGE_SHIFT - HW_PAGE_SHIFT) | 27 | #define PAGE_FACTOR (PAGE_SHIFT - HW_PAGE_SHIFT) |
28 | 28 | ||
29 | /* Segment size */ | 29 | /* Segment size; normal 256M segments */ |
30 | #define SID_SHIFT 28 | 30 | #define SID_SHIFT 28 |
31 | #define SID_MASK 0xfffffffffUL | 31 | #define SID_MASK ASM_CONST(0xfffffffff) |
32 | #define ESID_MASK 0xfffffffff0000000UL | 32 | #define ESID_MASK 0xfffffffff0000000UL |
33 | #define GET_ESID(x) (((x) >> SID_SHIFT) & SID_MASK) | 33 | #define GET_ESID(x) (((x) >> SID_SHIFT) & SID_MASK) |
34 | 34 | ||
35 | /* 1T segments */ | ||
36 | #define SID_SHIFT_1T 40 | ||
37 | #define SID_MASK_1T 0xffffffUL | ||
38 | #define ESID_MASK_1T 0xffffff0000000000UL | ||
39 | #define GET_ESID_1T(x) (((x) >> SID_SHIFT_1T) & SID_MASK_1T) | ||
40 | |||
35 | #ifndef __ASSEMBLY__ | 41 | #ifndef __ASSEMBLY__ |
36 | #include <asm/cache.h> | 42 | #include <asm/cache.h> |
37 | 43 | ||
@@ -121,6 +127,7 @@ extern unsigned int get_slice_psize(struct mm_struct *mm, | |||
121 | 127 | ||
122 | extern void slice_init_context(struct mm_struct *mm, unsigned int psize); | 128 | extern void slice_init_context(struct mm_struct *mm, unsigned int psize); |
123 | extern void slice_set_user_psize(struct mm_struct *mm, unsigned int psize); | 129 | extern void slice_set_user_psize(struct mm_struct *mm, unsigned int psize); |
130 | #define slice_mm_new_context(mm) ((mm)->context.id == 0) | ||
124 | 131 | ||
125 | #define ARCH_HAS_HUGEPAGE_ONLY_RANGE | 132 | #define ARCH_HAS_HUGEPAGE_ONLY_RANGE |
126 | extern int is_hugepage_only_range(struct mm_struct *m, | 133 | extern int is_hugepage_only_range(struct mm_struct *m, |
@@ -130,6 +137,12 @@ extern int is_hugepage_only_range(struct mm_struct *m, | |||
130 | #endif /* __ASSEMBLY__ */ | 137 | #endif /* __ASSEMBLY__ */ |
131 | #else | 138 | #else |
132 | #define slice_init() | 139 | #define slice_init() |
140 | #define slice_set_user_psize(mm, psize) \ | ||
141 | do { \ | ||
142 | (mm)->context.user_psize = (psize); \ | ||
143 | (mm)->context.sllp = SLB_VSID_USER | mmu_psize_defs[(psize)].sllp; \ | ||
144 | } while (0) | ||
145 | #define slice_mm_new_context(mm) 1 | ||
133 | #endif /* CONFIG_PPC_MM_SLICES */ | 146 | #endif /* CONFIG_PPC_MM_SLICES */ |
134 | 147 | ||
135 | #ifdef CONFIG_HUGETLB_PAGE | 148 | #ifdef CONFIG_HUGETLB_PAGE |