Lines Matching refs:mmid
66 u64 mmid; in flush_context() local
76 mmid = xchg_relaxed(&cpu_data[cpu].asid_cache, 0); in flush_context()
85 if (mmid == 0) in flush_context()
86 mmid = per_cpu(reserved_mmids, cpu); in flush_context()
88 __set_bit(mmid & cpu_asid_mask(&cpu_data[cpu]), mmid_map); in flush_context()
89 per_cpu(reserved_mmids, cpu) = mmid; in flush_context()
99 static bool check_update_reserved_mmid(u64 mmid, u64 newmmid) in check_update_reserved_mmid() argument
115 if (per_cpu(reserved_mmids, cpu) == mmid) { in check_update_reserved_mmid()
127 u64 mmid, version, mmid_mask; in get_new_mmid() local
129 mmid = cpu_context(0, mm); in get_new_mmid()
133 if (!asid_versions_eq(0, mmid, 0)) { in get_new_mmid()
134 u64 newmmid = version | (mmid & mmid_mask); in get_new_mmid()
140 if (check_update_reserved_mmid(mmid, newmmid)) { in get_new_mmid()
141 mmid = newmmid; in get_new_mmid()
149 if (!__test_and_set_bit(mmid & mmid_mask, mmid_map)) { in get_new_mmid()
150 mmid = newmmid; in get_new_mmid()
156 mmid = find_next_zero_bit(mmid_map, num_mmids, cur_idx); in get_new_mmid()
157 if (mmid != num_mmids) in get_new_mmid()
168 mmid = find_first_zero_bit(mmid_map, num_mmids); in get_new_mmid()
171 __set_bit(mmid, mmid_map); in get_new_mmid()
172 cur_idx = mmid; in get_new_mmid()
173 mmid |= version; in get_new_mmid()
175 set_cpu_context(0, mm, mmid); in get_new_mmid()
176 return mmid; in get_new_mmid()