Lines Matching refs:cntx
35 static bool check_update_reserved_context(unsigned long cntx, in check_update_reserved_context() argument
51 if (per_cpu(reserved_context, cpu) == cntx) { in check_update_reserved_context()
63 unsigned long cntx; in __flush_context() local
73 cntx = atomic_long_xchg_relaxed(&per_cpu(active_context, i), 0); in __flush_context()
80 if (cntx == 0) in __flush_context()
81 cntx = per_cpu(reserved_context, i); in __flush_context()
83 __set_bit(cntx2asid(cntx), context_asid_map); in __flush_context()
84 per_cpu(reserved_context, i) = cntx; in __flush_context()
97 unsigned long cntx = atomic_long_read(&mm->context.id); in __new_context() local
103 if (cntx != 0) { in __new_context()
104 unsigned long newcntx = ver | cntx2asid(cntx); in __new_context()
110 if (check_update_reserved_context(cntx, newcntx)) in __new_context()
117 if (!__test_and_set_bit(cntx2asid(cntx), context_asid_map)) in __new_context()
148 unsigned long cntx, old_active_cntx; in set_mm_asid() local
150 cntx = atomic_long_read(&mm->context.id); in set_mm_asid()
170 (cntx2version(cntx) == atomic_long_read(¤t_version)) && in set_mm_asid()
172 old_active_cntx, cntx)) in set_mm_asid()
178 cntx = atomic_long_read(&mm->context.id); in set_mm_asid()
179 if (cntx2version(cntx) != atomic_long_read(¤t_version)) { in set_mm_asid()
180 cntx = __new_context(mm); in set_mm_asid()
181 atomic_long_set(&mm->context.id, cntx); in set_mm_asid()
187 atomic_long_set(&per_cpu(active_context, cpu), cntx); in set_mm_asid()
193 (cntx2asid(cntx) << SATP_ASID_SHIFT) | in set_mm_asid()