Lines Matching refs:cntx

36 static bool check_update_reserved_context(unsigned long cntx,  in check_update_reserved_context()  argument
52 if (per_cpu(reserved_context, cpu) == cntx) { in check_update_reserved_context()
64 unsigned long cntx; in __flush_context() local
74 cntx = atomic_long_xchg_relaxed(&per_cpu(active_context, i), 0); in __flush_context()
81 if (cntx == 0) in __flush_context()
82 cntx = per_cpu(reserved_context, i); in __flush_context()
84 __set_bit(cntx & asid_mask, context_asid_map); in __flush_context()
85 per_cpu(reserved_context, i) = cntx; in __flush_context()
98 unsigned long cntx = atomic_long_read(&mm->context.id); in __new_context() local
104 if (cntx != 0) { in __new_context()
105 unsigned long newcntx = ver | (cntx & asid_mask); in __new_context()
111 if (check_update_reserved_context(cntx, newcntx)) in __new_context()
118 if (!__test_and_set_bit(cntx & asid_mask, context_asid_map)) in __new_context()
149 unsigned long cntx, old_active_cntx; in set_mm_asid() local
151 cntx = atomic_long_read(&mm->context.id); in set_mm_asid()
171 ((cntx & ~asid_mask) == atomic_long_read(&current_version)) && in set_mm_asid()
173 old_active_cntx, cntx)) in set_mm_asid()
179 cntx = atomic_long_read(&mm->context.id); in set_mm_asid()
180 if ((cntx & ~asid_mask) != atomic_long_read(&current_version)) { in set_mm_asid()
181 cntx = __new_context(mm); in set_mm_asid()
182 atomic_long_set(&mm->context.id, cntx); in set_mm_asid()
188 atomic_long_set(&per_cpu(active_context, cpu), cntx); in set_mm_asid()
194 ((cntx & asid_mask) << SATP_ASID_SHIFT) | in set_mm_asid()