/* * After we have set current->mm to a new value, this activates * the context for the new mm so we see the new mappings.
*/ #define activate_mm activate_mm staticinlinevoid activate_mm(struct mm_struct *active_mm, struct mm_struct *mm)
{
get_mmu_context(mm);
set_context(mm->context, mm->pgd);
}
/* Search for a valid TLB entry, if one is found, don't remap */
mmu_write(MMUAR, mmuar);
mmu_write(MMUOR, MMUOR_STLB | MMUOR_ADR); if (mmu_read(MMUSR) & MMUSR_HIT) goto end;
if (mmuar >= PAGE_OFFSET) {
mm = &init_mm;
} else {
pr_info("load_ksp_mmu: non-kernel mm found: 0x%p\n", task->mm);
mm = task->mm;
}
if (!mm) goto bug;
pgd = pgd_offset(mm, mmuar); if (pgd_none(*pgd)) goto bug;
p4d = p4d_offset(pgd, mmuar); if (p4d_none(*p4d)) goto bug;
pud = pud_offset(p4d, mmuar); if (pud_none(*pud)) goto bug;
pmd = pmd_offset(pud, mmuar); if (pmd_none(*pmd)) goto bug;
/* set the context for a new task to unmapped */ #define init_new_context init_new_context staticinlineint init_new_context(struct task_struct *tsk, struct mm_struct *mm)
{
mm->context = SUN3_INVALID_CONTEXT; return 0;
}
/* find the context given to this process, and if it hasn't already
got one, go get one for it. */ staticinlinevoid get_mmu_context(struct mm_struct *mm)
{ if (mm->context == SUN3_INVALID_CONTEXT)
mm->context = get_free_context(mm);
}
/* flush context if allocated... */ #define destroy_context destroy_context staticinlinevoid destroy_context(struct mm_struct *mm)
{ if (mm->context != SUN3_INVALID_CONTEXT)
clear_context(mm->context);
}
/* Switch the root pointer. For a 030-only kernel, * avoid flushing the whole ATC, we only need to * flush the user entries. The 68851 does this by * itself. Avoid a runtime check here.
*/ asmvolatile ( #ifdef CPU_M68030_ONLY "pmovefd %0,%%crp; " "pflush #0,#4" #else "pmove %0,%%crp" #endif
: : "m" (crp[0]));
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.