|
@@ -331,6 +331,20 @@ int init_new_context(struct task_struct *t, struct mm_struct *mm)
|
|
{
|
|
{
|
|
pr_hard("initing context for mm @%p\n", mm);
|
|
pr_hard("initing context for mm @%p\n", mm);
|
|
|
|
|
|
|
|
+#ifdef CONFIG_PPC_MM_SLICES
|
|
|
|
+ if (!mm->context.slb_addr_limit)
|
|
|
|
+ mm->context.slb_addr_limit = DEFAULT_MAP_WINDOW;
|
|
|
|
+
|
|
|
|
+ /*
|
|
|
|
+ * We have MMU_NO_CONTEXT set to be ~0. Hence check
|
|
|
|
+ * explicitly against context.id == 0. This ensures that we properly
|
|
|
|
+ * initialize context slice details for newly allocated mm's (which will
|
|
|
|
+ * have id == 0) and don't alter context slice inherited via fork (which
|
|
|
|
+ * will have id != 0).
|
|
|
|
+ */
|
|
|
|
+ if (mm->context.id == 0)
|
|
|
|
+ slice_set_user_psize(mm, mmu_virtual_psize);
|
|
|
|
+#endif
|
|
mm->context.id = MMU_NO_CONTEXT;
|
|
mm->context.id = MMU_NO_CONTEXT;
|
|
mm->context.active = 0;
|
|
mm->context.active = 0;
|
|
return 0;
|
|
return 0;
|
|
@@ -428,8 +442,8 @@ void __init mmu_context_init(void)
|
|
* -- BenH
|
|
* -- BenH
|
|
*/
|
|
*/
|
|
if (mmu_has_feature(MMU_FTR_TYPE_8xx)) {
|
|
if (mmu_has_feature(MMU_FTR_TYPE_8xx)) {
|
|
- first_context = 0;
|
|
|
|
- last_context = 15;
|
|
|
|
|
|
+ first_context = 1;
|
|
|
|
+ last_context = 16;
|
|
no_selective_tlbil = true;
|
|
no_selective_tlbil = true;
|
|
} else if (mmu_has_feature(MMU_FTR_TYPE_47x)) {
|
|
} else if (mmu_has_feature(MMU_FTR_TYPE_47x)) {
|
|
first_context = 1;
|
|
first_context = 1;
|