From: Paul Mackerras Date: Thu, 29 Jun 2006 06:16:15 +0000 (+1000) Subject: [POWERPC] Correct the MAX_CONTEXT definition X-Git-Tag: v2.6.18-rc1~358^2~9 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1729dc7833014eaba3520091a673dbdc9242d9f9;p=linux-2.6 [POWERPC] Correct the MAX_CONTEXT definition When we increased the address space per process to 2^44 bytes, the number of contexts that we could actually use reduced, but we forgot to decrease the MAX_CONTEXT definition. (Fortunately this would only cause problems if we actually had more than 512k user processes running.) This patch corrects the definition. Signed-off-by: Paul Mackerras --- diff --git a/include/asm-powerpc/mmu_context.h b/include/asm-powerpc/mmu_context.h index 8c6b1a6d94..083ac917bd 100644 --- a/include/asm-powerpc/mmu_context.h +++ b/include/asm-powerpc/mmu_context.h @@ -25,8 +25,13 @@ static inline void enter_lazy_tlb(struct mm_struct *mm, { } +/* + * The proto-VSID space has 2^35 - 1 segments available for user mappings. + * Each segment contains 2^28 bytes. Each context maps 2^44 bytes, + * so we can support 2^19-1 contexts (19 == 35 + 28 - 44). + */ #define NO_CONTEXT 0 -#define MAX_CONTEXT (0x100000-1) +#define MAX_CONTEXT ((1UL << 19) - 1) extern int init_new_context(struct task_struct *tsk, struct mm_struct *mm); extern void destroy_context(struct mm_struct *mm);