diff options
author | Stephen Rothwell <sfr@canb.auug.org.au> | 2007-08-15 02:51:18 -0400 |
---|---|---|
committer | Paul Mackerras <paulus@samba.org> | 2007-08-16 21:01:59 -0400 |
commit | e8ff0646e5df850ff084be9c97a2e69fff5697b4 (patch) | |
tree | 42a5630bb518337e16d016aacdd783b39fce6122 /include/asm-powerpc/page_64.h | |
parent | 0b8188a44def37f4f8ef01653da199ca3a3e0a2a (diff) |
[POWERPC] Tidy up CONFIG_PPC_MM_SLICES code
This removes some of the #ifdefs from .c files.
Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Paul Mackerras <paulus@samba.org>
Diffstat (limited to 'include/asm-powerpc/page_64.h')
-rw-r--r-- | include/asm-powerpc/page_64.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/include/asm-powerpc/page_64.h b/include/asm-powerpc/page_64.h index 3448a3d4bc64..4ceb1132c480 100644 --- a/include/asm-powerpc/page_64.h +++ b/include/asm-powerpc/page_64.h | |||
@@ -121,6 +121,7 @@ extern unsigned int get_slice_psize(struct mm_struct *mm, | |||
121 | 121 | ||
122 | extern void slice_init_context(struct mm_struct *mm, unsigned int psize); | 122 | 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); | 123 | extern void slice_set_user_psize(struct mm_struct *mm, unsigned int psize); |
124 | #define slice_mm_new_context(mm) ((mm)->context.id == 0) | ||
124 | 125 | ||
125 | #define ARCH_HAS_HUGEPAGE_ONLY_RANGE | 126 | #define ARCH_HAS_HUGEPAGE_ONLY_RANGE |
126 | extern int is_hugepage_only_range(struct mm_struct *m, | 127 | extern int is_hugepage_only_range(struct mm_struct *m, |
@@ -130,6 +131,12 @@ extern int is_hugepage_only_range(struct mm_struct *m, | |||
130 | #endif /* __ASSEMBLY__ */ | 131 | #endif /* __ASSEMBLY__ */ |
131 | #else | 132 | #else |
132 | #define slice_init() | 133 | #define slice_init() |
134 | #define slice_set_user_psize(mm, psize) \ | ||
135 | do { \ | ||
136 | (mm)->context.user_psize = (psize); \ | ||
137 | (mm)->context.sllp = SLB_VSID_USER | mmu_psize_defs[(psize)].sllp; \ | ||
138 | } while (0) | ||
139 | #define slice_mm_new_context(mm) 1 | ||
133 | #endif /* CONFIG_PPC_MM_SLICES */ | 140 | #endif /* CONFIG_PPC_MM_SLICES */ |
134 | 141 | ||
135 | #ifdef CONFIG_HUGETLB_PAGE | 142 | #ifdef CONFIG_HUGETLB_PAGE |