Lines Matching +full:ctx +full:- +full:asid
1 // SPDX-License-Identifier: GPL-2.0-or-later
15 * - The global context lock will not scale very well
16 * - The maps should be dynamically allocated to allow for processors
18 * - Implement flush_tlb_mm() by making the context stale and picking
20 * - More aggressively clear stale map bits and maybe find some way to
21 * also clear mm->cpu_vm_mask bits when processes are migrated
52 * not protected, just that the ASID comparison is not performed. -- Dan
57 * shared among all contexts. -- Dan
59 * The IBM 47x core supports 16-bit PIDs, thus 65535 contexts. We should
61 * -- BenH
88 * turn (sort-of pseudo-random replacement :). This would be the
90 * -- paulus
95 * -- benh
102 max = LAST_CONTEXT - FIRST_CONTEXT; in steal_context_smp()
105 while (max--) { in steal_context_smp()
112 if (mm->context.active) { in steal_context_smp()
120 mm->context.id = MMU_NO_CONTEXT; in steal_context_smp()
133 cpu = i - 1; in steal_context_smp()
160 mm->context.id = MMU_NO_CONTEXT; in steal_all_contexts()
172 nr_free_contexts = LAST_CONTEXT - FIRST_CONTEXT; in steal_all_contexts()
194 mm->context.id = MMU_NO_CONTEXT; in steal_context_up()
209 mtspr(SPRN_M_CASID, id - 1); 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()
241 id = next->context.id; in switch_mmu_context()
265 nr_free_contexts--; in switch_mmu_context()
276 next->context.id = id; in switch_mmu_context()
296 abatron_pteptrs[1] = next->pgd; in switch_mmu_context()
297 set_context(id, next->pgd); in switch_mmu_context()
299 tsk->thread.pid = id; in switch_mmu_context()
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()
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()
386 "powerpc/mmu/ctx:prepare", in mmu_context_init()
393 LAST_CONTEXT - FIRST_CONTEXT + 1); in mmu_context_init()
401 context_map[0] = (1 << FIRST_CONTEXT) - 1; in mmu_context_init()
403 nr_free_contexts = LAST_CONTEXT - FIRST_CONTEXT + 1; in mmu_context_init()