Lines Matching full:context
15 * - The global context lock will not scale very well
18 * - Implement flush_tlb_mm() by making the context stale and picking
82 /* Steal a context from a task that has one at the moment.
87 * This isn't an LRU system, it just frees up each context in
92 * For context stealing, we use a slightly different approach for
112 if (mm->context.active) { in steal_context_smp()
119 /* Mark this mm has having no context anymore */ in steal_context_smp()
120 mm->context.id = MMU_NO_CONTEXT; in steal_context_smp()
159 /* Mark this mm as having no context anymore */ in steal_all_contexts()
160 mm->context.id = MMU_NO_CONTEXT; in steal_all_contexts()
190 /* Flush the TLB for that context */ in steal_context_up()
193 /* Mark this mm has having no context anymore */ in steal_context_up()
194 mm->context.id = MMU_NO_CONTEXT; in steal_context_up()
208 /* Update context */ in set_context()
231 next->context.active++; in switch_mmu_context()
233 WARN_ON(prev->context.active < 1); in switch_mmu_context()
234 prev->context.active--; in switch_mmu_context()
240 /* If we already have a valid assigned context, skip all that */ in switch_mmu_context()
241 id = next->context.id; in switch_mmu_context()
245 /* We really don't have a context, let's try to acquire one */ in switch_mmu_context()
267 /* We know there's at least one free context, try to find it */ in switch_mmu_context()
276 next->context.id = id; in switch_mmu_context()
280 /* If that context got marked stale on this CPU, then flush the in switch_mmu_context()
305 * Set up the context for a new address space.
309 mm->context.id = MMU_NO_CONTEXT; in init_new_context()
310 mm->context.active = 0; in init_new_context()
311 pte_frag_set(&mm->context, NULL); in init_new_context()
316 * We're finished using the context for an address space.
323 if (mm->context.id == MMU_NO_CONTEXT) in destroy_context()
326 WARN_ON(mm->context.active != 0); in destroy_context()
329 id = mm->context.id; in destroy_context()
332 mm->context.id = MMU_NO_CONTEXT; in destroy_context()
367 * Initialize the context management stuff.
375 init_mm.context.active = NR_CPUS; in mmu_context_init()
378 * Allocate the maps used by context management in mmu_context_init()
391 "MMU: Allocated %zu bytes of context maps for %d contexts\n", in mmu_context_init()
397 * init_mm, and require using context 0 for a normal task. in mmu_context_init()
398 * Other processors reserve the use of context zero for the kernel. in mmu_context_init()