aboutsummaryrefslogtreecommitdiff
path: root/include/asm-powerpc/page_64.h
diff options
context:
space:
mode:
authorStephen Rothwell <sfr@canb.auug.org.au>2007-08-15 16:51:18 +1000
committerPaul Mackerras <paulus@samba.org>2007-08-17 11:01:59 +1000
commite8ff0646e5df850ff084be9c97a2e69fff5697b4 (patch)
tree42a5630bb518337e16d016aacdd783b39fce6122 /include/asm-powerpc/page_64.h
parent0b8188a44def37f4f8ef01653da199ca3a3e0a2a (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.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/include/asm-powerpc/page_64.h b/include/asm-powerpc/page_64.h
index 3448a3d4bc6..4ceb1132c48 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,
extern void slice_init_context(struct mm_struct *mm, unsigned int psize);
extern void slice_set_user_psize(struct mm_struct *mm, unsigned int psize);
+#define slice_mm_new_context(mm) ((mm)->context.id == 0)
#define ARCH_HAS_HUGEPAGE_ONLY_RANGE
extern int is_hugepage_only_range(struct mm_struct *m,
@@ -130,6 +131,12 @@ extern int is_hugepage_only_range(struct mm_struct *m,
#endif /* __ASSEMBLY__ */
#else
#define slice_init()
+#define slice_set_user_psize(mm, psize) \
+do { \
+ (mm)->context.user_psize = (psize); \
+ (mm)->context.sllp = SLB_VSID_USER | mmu_psize_defs[(psize)].sllp; \
+} while (0)
+#define slice_mm_new_context(mm) 1
#endif /* CONFIG_PPC_MM_SLICES */
#ifdef CONFIG_HUGETLB_PAGE