Skip to content

Commit

Permalink
[POWERPC] Correct the MAX_CONTEXT definition
Browse files Browse the repository at this point in the history
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 <paulus@samba.org>
  • Loading branch information
Paul Mackerras committed Jun 29, 2006
1 parent 4892444 commit 1729dc7
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion include/asm-powerpc/mmu_context.h
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 1729dc7

Please sign in to comment.