Home
last modified time | relevance | path

Searched refs:context (Results 1 – 25 of 294) sorted by relevance

12345678910>>...12

/arch/riscv/kernel/
A Dsuspend.c18 context->envcfg = csr_read(CSR_ENVCFG); in suspend_save_csrs()
19 context->tvec = csr_read(CSR_TVEC); in suspend_save_csrs()
20 context->ie = csr_read(CSR_IE); in suspend_save_csrs()
40 context->satp = csr_read(CSR_SATP); in suspend_save_csrs()
49 csr_write(CSR_TVEC, context->tvec); in suspend_restore_csrs()
50 csr_write(CSR_IE, context->ie); in suspend_restore_csrs()
60 csr_write(CSR_SATP, context->satp); in suspend_restore_csrs()
67 unsigned long context)) in cpu_suspend() argument
77 suspend_save_csrs(&context); in cpu_suspend()
90 (ulong)&context); in cpu_suspend()
[all …]
/arch/s390/include/asm/
A Dmmu_context.h25 spin_lock_init(&mm->context.lock); in init_new_context()
26 INIT_LIST_HEAD(&mm->context.gmap_list); in init_new_context()
30 mm->context.gmap_asce = 0; in init_new_context()
31 mm->context.flush_mm = 0; in init_new_context()
33 mm->context.has_pgste = 0; in init_new_context()
34 mm->context.uses_skeys = 0; in init_new_context()
35 mm->context.uses_cmm = 0; in init_new_context()
36 mm->context.allow_cow_sharing = 1; in init_new_context()
37 mm->context.allow_gmap_hpage_1m = 0; in init_new_context()
39 switch (mm->context.asce_limit) { in init_new_context()
[all …]
A Dtlbflush.h52 atomic_inc(&mm->context.flush_count); in __tlb_flush_mm()
54 cpumask_copy(mm_cpumask(mm), &mm->context.cpu_attach_mask); in __tlb_flush_mm()
56 gmap_asce = READ_ONCE(mm->context.gmap_asce); in __tlb_flush_mm()
60 __tlb_flush_idte(mm->context.asce); in __tlb_flush_mm()
65 atomic_dec(&mm->context.flush_count); in __tlb_flush_mm()
72 __tlb_flush_idte(init_mm.context.asce); in __tlb_flush_kernel()
79 spin_lock(&mm->context.lock); in __tlb_flush_mm_lazy()
80 if (mm->context.flush_mm) { in __tlb_flush_mm_lazy()
81 mm->context.flush_mm = 0; in __tlb_flush_mm_lazy()
84 spin_unlock(&mm->context.lock); in __tlb_flush_mm_lazy()
/arch/powerpc/mm/book3s64/
A Dmmu_context.c101 if (!mm->context.hash_context) in hash__init_new_context()
118 if (mm->context.id == 0) { in hash__init_new_context()
142 kfree(mm->context.hash_context); in hash__init_new_context()
189 mm->context.hash_context = NULL; in radix__init_new_context()
207 mm->context.id = index; in init_new_context()
209 mm->context.pte_frag = NULL; in init_new_context()
210 mm->context.pmd_frag = NULL; in init_new_context()
265 frag = mm->context.pte_frag; in destroy_pagetable_cache()
269 frag = mm->context.pmd_frag; in destroy_pagetable_cache()
297 destroy_contexts(&mm->context); in destroy_context()
[all …]
A Dslice.c207 lpsizes = mm_ctx_low_slices(&mm->context); in slice_convert()
226 hpsizes = mm_ctx_high_slices(&mm->context); in slice_convert()
246 (unsigned long)mm_ctx_low_slices(&mm->context), in slice_convert()
468 BUG_ON(mm_ctx_slb_addr_limit(&mm->context) == 0); in slice_get_unmapped_area()
488 maskp = slice_mask_for_size(&mm->context, psize); in slice_get_unmapped_area()
700 psizes = mm_ctx_low_slices(&mm->context); in get_slice_psize()
703 psizes = mm_ctx_high_slices(&mm->context); in get_slice_psize()
725 mm_ctx_set_user_psize(&mm->context, psize); in slice_init_new_context_exec()
730 lpsizes = mm_ctx_low_slices(&mm->context); in slice_init_new_context_exec()
733 hpsizes = mm_ctx_high_slices(&mm->context); in slice_init_new_context_exec()
[all …]
/arch/sparc/mm/
A Dtsb.c545 spin_lock_init(&mm->context.lock); in init_new_context()
547 mm->context.sparc64_ctx_val = 0UL; in init_new_context()
549 mm->context.tag_store = NULL; in init_new_context()
559 mm->context.hugetlb_pte_count = 0; in init_new_context()
560 mm->context.thp_pte_count = 0; in init_new_context()
570 mm->context.tsb_block[i].tsb = NULL; in init_new_context()
611 if (CTX_VALID(mm->context)) { in destroy_context()
619 if (mm->context.tag_store) { in destroy_context()
624 tag_desc = mm->context.tag_store; in destroy_context()
632 kfree(mm->context.tag_store); in destroy_context()
[all …]
/arch/x86/include/asm/
A Dmmu_context.h57 mm->context.ldt = NULL; in init_new_context_ldt()
58 init_rwsem(&mm->context.ldt_usr_sem); in init_new_context_ldt()
102 mm->context.lam_cr3_mask = oldmm->context.lam_cr3_mask; in dup_lam()
103 mm->context.untag_mask = oldmm->context.untag_mask; in dup_lam()
109 return mm->context.untag_mask; in mm_untag_mask()
114 mm->context.untag_mask = -1UL; in mm_reset_untag_mask()
155 mutex_init(&mm->context.lock); in init_new_context()
158 atomic64_set(&mm->context.tlb_gen, 0); in init_new_context()
166 mm->context.execute_only_pkey = -1; in init_new_context()
218 mm->context.pkey_allocation_map = oldmm->context.pkey_allocation_map; in arch_dup_pkeys()
[all …]
/arch/parisc/include/asm/
A Dmmu_context.h23 mm->context.space_id = alloc_sid(); in init_new_context()
31 free_sid(mm->context.space_id); in destroy_context()
32 mm->context.space_id = 0; in destroy_context()
38 return context.space_id << 1; in __space_to_prot()
40 return context.space_id >> (SPACEID_SHIFT - 1); in __space_to_prot()
44 static inline void load_context(mm_context_t context) in load_context() argument
46 mtsp(context.space_id, SR_USER); in load_context()
47 mtctl(__space_to_prot(context), 8); in load_context()
61 load_context(next->context); in switch_mm_irqs_off()
92 if (next->context.space_id == 0) in activate_mm()
[all …]
A Dtlbflush.h20 __flush_tlb_range((vma)->vm_mm->context.space_id, start, end)
55 if (mm->context != 0) in flush_tlb_mm()
56 free_sid(mm->context); in flush_tlb_mm()
57 mm->context = alloc_sid(); in flush_tlb_mm()
59 load_context(mm->context); in flush_tlb_mm()
/arch/m68k/include/asm/
A Dmmu_context.h32 if (mm->context != NO_CONTEXT) in get_mmu_context()
45 mm->context = ctx; in get_mmu_context()
60 if (mm->context != NO_CONTEXT) { in destroy_context()
61 clear_bit(mm->context, context_map); in destroy_context()
62 mm->context = NO_CONTEXT; in destroy_context()
88 set_context(mm->context, mm->pgd); in activate_mm()
146 asid = mm->context & 0xff; in load_ksp_mmu()
181 mm->context = SUN3_INVALID_CONTEXT; in init_new_context()
190 mm->context = get_free_context(mm); in get_mmu_context()
198 clear_context(mm->context); in destroy_context()
[all …]
/arch/powerpc/mm/book3s32/
A Dmmu_context.c71 mm->context.id = __init_new_context(); in init_new_context()
72 mm->context.sr0 = CTX_TO_VSID(mm->context.id, 0); in init_new_context()
75 mm->context.sr0 |= SR_NX; in init_new_context()
77 mm->context.sr0 |= SR_KS; in init_new_context()
97 if (mm->context.id != NO_CONTEXT) { in destroy_context()
98 __destroy_context(mm->context.id); in destroy_context()
99 mm->context.id = NO_CONTEXT; in destroy_context()
116 long id = next->context.id; in switch_mmu_context()
123 update_user_segments(next->context.sr0); in switch_mmu_context()
/arch/nios2/mm/
A Dmmu_context.c53 static void set_context(mm_context_t context) in set_context() argument
55 set_mmu_pid(CTX_PID(context)); in set_context()
89 if (unlikely(CTX_VERSION(next->context) != in switch_mm()
91 next->context = get_new_context(); in switch_mm()
97 set_context(next->context); in switch_mm()
108 next->context = get_new_context(); in activate_mm()
109 set_context(next->context); in activate_mm()
113 unsigned long get_pid_from_context(mm_context_t *context) in get_pid_from_context() argument
115 return CTX_PID((*context)); in get_pid_from_context()
/arch/microblaze/include/asm/
A Dmmu_context_mm.h50 extern void set_context(mm_context_t context, pgd_t *pgd);
81 if (mm->context != NO_CONTEXT) in get_mmu_context()
92 mm->context = ctx; in get_mmu_context()
99 # define init_new_context(tsk, mm) (((mm)->context = NO_CONTEXT), 0)
107 if (mm->context != NO_CONTEXT) { in destroy_context()
108 clear_bit(mm->context, context_map); in destroy_context()
109 mm->context = NO_CONTEXT; in destroy_context()
119 set_context(next->context, next->pgd); in switch_mm()
132 set_context(mm->context, mm->pgd); in activate_mm()
/arch/sparc/include/asm/
A Dmmu_context_64.h41 &mm->context.tsb_block[MM_TSB_BASE], in tsb_context_switch_ctx()
43 (mm->context.tsb_block[MM_TSB_HUGE].tsb ? in tsb_context_switch_ctx()
44 &mm->context.tsb_block[MM_TSB_HUGE] : in tsb_context_switch_ctx()
49 , __pa(&mm->context.tsb_descr[MM_TSB_BASE]), in tsb_context_switch_ctx()
74 : "r" (CTX_HWBITS((__mm)->context)), \
89 spin_lock_irqsave(&mm->context.lock, flags); in switch_mm()
90 ctx_valid = CTX_VALID(mm->context); in switch_mm()
124 tsb_context_switch_ctx(mm, CTX_HWBITS(mm->context)); in switch_mm()
132 __flush_tlb_mm(CTX_HWBITS(mm->context), in switch_mm()
135 spin_unlock_irqrestore(&mm->context.lock, flags); in switch_mm()
[all …]
/arch/powerpc/mm/nohash/
A Dmmu_context.c112 if (mm->context.active) { in steal_context_smp()
120 mm->context.id = MMU_NO_CONTEXT; in steal_context_smp()
160 mm->context.id = MMU_NO_CONTEXT; in steal_all_contexts()
194 mm->context.id = MMU_NO_CONTEXT; in steal_context_up()
239 next->context.active++; in switch_mmu_context()
242 prev->context.active--; in switch_mmu_context()
249 id = next->context.id; in switch_mmu_context()
284 next->context.id = id; in switch_mmu_context()
317 mm->context.id = MMU_NO_CONTEXT; in init_new_context()
318 mm->context.active = 0; in init_new_context()
[all …]
/arch/m68k/sun3/
A Dmmu_emu.c214 if (context) { in clear_context()
215 if (!ctx_alloc[context]) in clear_context()
218 ctx_alloc[context]->context = SUN3_INVALID_CONTEXT; in clear_context()
225 sun3_put_context(context); in clear_context()
298 curr_pmeg, context, vaddr); in mmu_emu_map_pmeg()
305 sun3_put_context(context); in mmu_emu_map_pmeg()
318 sun3_put_context(context); in mmu_emu_map_pmeg()
325 pmeg_ctx[curr_pmeg] = context; in mmu_emu_map_pmeg()
358 unsigned char context; in mmu_emu_handle_fault() local
364 context = 0; in mmu_emu_handle_fault()
[all …]
/arch/hexagon/mm/
A Dvm_tlb.c31 if (mm->context.ptbase == current->active_mm->context.ptbase) in flush_tlb_range()
60 if (current->active_mm->context.ptbase == mm->context.ptbase) in flush_tlb_mm()
71 if (mm->context.ptbase == current->active_mm->context.ptbase) in flush_tlb_page()
/arch/xtensa/include/asm/
A Dmmu_context.h82 mm->context.asid[cpu] = asid; in get_new_mmu_context()
83 mm->context.cpu = cpu; in get_new_mmu_context()
93 unsigned long asid = mm->context.asid[cpu]; in get_mmu_context()
104 set_rasid_register(ASID_INSERT(mm->context.asid[cpu])); in activate_context()
120 mm->context.asid[cpu] = NO_CONTEXT; in init_new_context()
122 mm->context.cpu = -1; in init_new_context()
130 int migrated = next->context.cpu != cpu; in switch_mm()
134 next->context.cpu = cpu; in switch_mm()
/arch/riscv/include/asm/
A Dkvm_vcpu_vector.h19 static __always_inline void __kvm_riscv_vector_save(struct kvm_cpu_context *context) in __kvm_riscv_vector_save() argument
21 __riscv_v_vstate_save(&context->vector, context->vector.datap); in __kvm_riscv_vector_save()
24 static __always_inline void __kvm_riscv_vector_restore(struct kvm_cpu_context *context) in __kvm_riscv_vector_restore() argument
26 __riscv_v_vstate_restore(&context->vector, context->vector.datap); in __kvm_riscv_vector_restore()
A Dsuspend.h34 int __cpu_suspend_enter(struct suspend_context *context);
40 unsigned long context));
43 int __cpu_resume_enter(unsigned long hartid, unsigned long context);
46 void suspend_save_csrs(struct suspend_context *context);
47 void suspend_restore_csrs(struct suspend_context *context);
/arch/x86/kernel/
A Dldt.c47 ldt = READ_ONCE(mm->context.ldt); in load_mm_ldt()
193 if (mm->context.ldt) { in do_sanity_check()
423 mutex_lock(&mm->context.lock); in install_ldt()
431 mutex_unlock(&mm->context.lock); in install_ldt()
459 mutex_lock(&old_mm->context.lock); in ldt_dup_context()
460 if (!old_mm->context.ldt) in ldt_dup_context()
479 mm->context.ldt = new_ldt; in ldt_dup_context()
493 free_ldt_struct(mm->context.ldt); in destroy_context_ldt()
494 mm->context.ldt = NULL; in destroy_context_ldt()
510 if (!mm->context.ldt) { in read_ldt()
[all …]
/arch/hexagon/include/asm/
A Dmmu_context.h38 if (next->context.generation < prev->context.generation) { in switch_mm()
42 next->context.generation = prev->context.generation; in switch_mm()
45 __vmnewmap((void *)next->context.ptbase); in switch_mm()
/arch/arm/include/asm/
A Dmmu_context.h30 unlikely(atomic_read(&mm->context.vmalloc_seq) != in check_vmalloc_seq()
31 atomic_read(&init_mm.context.vmalloc_seq))) in check_vmalloc_seq()
44 atomic64_set(&mm->context.id, 0); in init_new_context()
75 mm->context.switch_pending = 1; in check_and_switch_context()
87 if (mm && mm->context.switch_pending) { in finish_arch_post_lock_switch()
95 if (mm->context.switch_pending) { in finish_arch_post_lock_switch()
96 mm->context.switch_pending = 0; in finish_arch_post_lock_switch()
/arch/sparc/kernel/
A Dadi_64.c135 if (mm->context.tag_store) { in find_tag_store()
136 tag_desc = mm->context.tag_store; in find_tag_store()
137 spin_lock_irqsave(&mm->context.tag_lock, flags); in find_tag_store()
174 spin_lock_irqsave(&mm->context.tag_lock, flags); in alloc_tag_store()
175 if (mm->context.tag_store) { in alloc_tag_store()
176 tag_desc = mm->context.tag_store; in alloc_tag_store()
206 if (mm->context.tag_store == NULL) { in alloc_tag_store()
210 tag_desc = mm->context.tag_store; in alloc_tag_store()
213 open_desc = mm->context.tag_store; in alloc_tag_store()
304 spin_lock_irqsave(&mm->context.tag_lock, flags); in del_tag_store()
[all …]
/arch/arm/kernel/
A Dsignal.c142 struct sigcontext context; in restore_sigframe() local
151 err |= __copy_from_user(&context, &sf->uc.uc_mcontext, sizeof(context)); in restore_sigframe()
153 regs->ARM_r0 = context.arm_r0; in restore_sigframe()
154 regs->ARM_r1 = context.arm_r1; in restore_sigframe()
155 regs->ARM_r2 = context.arm_r2; in restore_sigframe()
156 regs->ARM_r3 = context.arm_r3; in restore_sigframe()
157 regs->ARM_r4 = context.arm_r4; in restore_sigframe()
158 regs->ARM_r5 = context.arm_r5; in restore_sigframe()
159 regs->ARM_r6 = context.arm_r6; in restore_sigframe()
254 struct sigcontext context; in setup_sigframe() local
[all …]

Completed in 43 milliseconds

12345678910>>...12