Lines Matching full:context

3  *  MMU context allocation for 64-bit kernels.
38 WARN(result != id, "mmu: Failed to reserve context id %d (rc %d)\n", id, result); in hash__reserve_context_id()
96 mm->context.hash_context = kmalloc(sizeof(struct hash_mm_context), in hash__init_new_context()
98 if (!mm->context.hash_context) in hash__init_new_context()
107 * explicitly against context.id == 0. This ensures that we properly in hash__init_new_context()
108 * initialize context slice details for newly allocated mm's (which will in hash__init_new_context()
109 * have id == 0) and don't alter context slice inherited via fork (which in hash__init_new_context()
115 if (mm->context.id == 0) { in hash__init_new_context()
116 memset(mm->context.hash_context, 0, sizeof(struct hash_mm_context)); in hash__init_new_context()
120 …memcpy(mm->context.hash_context, current->mm->context.hash_context, sizeof(struct hash_mm_context)… in hash__init_new_context()
123 if (current->mm->context.hash_context->spt) { in hash__init_new_context()
124 mm->context.hash_context->spt = kmalloc(sizeof(struct subpage_prot_table), in hash__init_new_context()
126 if (!mm->context.hash_context->spt) { in hash__init_new_context()
127 kfree(mm->context.hash_context); in hash__init_new_context()
134 index = realloc_context_ids(&mm->context); in hash__init_new_context()
137 kfree(mm->context.hash_context->spt); in hash__init_new_context()
139 kfree(mm->context.hash_context); in hash__init_new_context()
178 mm->context.hash_context = NULL; in radix__init_new_context()
195 mm->context.id = index; in init_new_context()
197 mm->context.pte_frag = NULL; in init_new_context()
198 mm->context.pmd_frag = NULL; in init_new_context()
202 atomic_set(&mm->context.active_cpus, 0); in init_new_context()
203 atomic_set(&mm->context.copros, 0); in init_new_context()
245 frag = mm->context.pte_frag; in destroy_pagetable_cache()
249 frag = mm->context.pmd_frag; in destroy_pagetable_cache()
258 WARN_ON_ONCE(!list_empty(&mm->context.iommu_group_mem_list)); in destroy_context()
274 process_tb[mm->context.id].prtb0 = 0; in destroy_context()
277 destroy_contexts(&mm->context); in destroy_context()
278 mm->context.id = MMU_NO_CONTEXT; in destroy_context()
300 process_tb[mm->context.id].prtb0 = 0; in arch_exit_mmap()
307 mtspr(SPRN_PID, next->context.id); in radix__switch_mmu_context()