powerpc/mm: Split mmu_context handling
[pandora-kernel.git] / arch / powerpc / mm / mmu_context_hash64.c
similarity index 86%
rename from arch/powerpc/mm/mmu_context_64.c
rename to arch/powerpc/mm/mmu_context_hash64.c
index 1db38ba..dbeb86a 100644 (file)
 static DEFINE_SPINLOCK(mmu_context_lock);
 static DEFINE_IDR(mmu_context_idr);
 
+/*
+ * 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    ((1UL << 19) - 1)
+
 int init_new_context(struct task_struct *tsk, struct mm_struct *mm)
 {
        int index;