Lines Matching refs:gms
145 void gru_flush_tlb_range(struct gru_mm_struct *gms, unsigned long start, in gru_flush_tlb_range() argument
161 gru_dbg(grudev, "gms %p, start 0x%lx, len 0x%lx, asidmap 0x%lx\n", gms, in gru_flush_tlb_range()
162 start, len, gms->ms_asidmap[0]); in gru_flush_tlb_range()
164 spin_lock(&gms->ms_asid_lock); in gru_flush_tlb_range()
165 for_each_gru_in_bitmap(gid, gms->ms_asidmap) { in gru_flush_tlb_range()
168 asids = gms->ms_asids + gid; in gru_flush_tlb_range()
183 __clear_bit(gru->gs_gid, gms->ms_asidmap); in gru_flush_tlb_range()
187 gms->ms_asidmap[0]); in gru_flush_tlb_range()
190 spin_unlock(&gms->ms_asid_lock); in gru_flush_tlb_range()
212 struct gru_mm_struct *gms = container_of(mn, struct gru_mm_struct, in gru_invalidate_range_start() local
216 atomic_inc(&gms->ms_range_active); in gru_invalidate_range_start()
217 gru_dbg(grudev, "gms %p, start 0x%lx, end 0x%lx, act %d\n", gms, in gru_invalidate_range_start()
218 range->start, range->end, atomic_read(&gms->ms_range_active)); in gru_invalidate_range_start()
219 gru_flush_tlb_range(gms, range->start, range->end - range->start); in gru_invalidate_range_start()
227 struct gru_mm_struct *gms = container_of(mn, struct gru_mm_struct, in gru_invalidate_range_end() local
231 (void)atomic_dec_and_test(&gms->ms_range_active); in gru_invalidate_range_end()
233 wake_up_all(&gms->ms_wait_queue); in gru_invalidate_range_end()
235 gms, range->start, range->end); in gru_invalidate_range_end()
240 struct gru_mm_struct *gms; in gru_alloc_notifier() local
242 gms = kzalloc(sizeof(*gms), GFP_KERNEL); in gru_alloc_notifier()
243 if (!gms) in gru_alloc_notifier()
246 spin_lock_init(&gms->ms_asid_lock); in gru_alloc_notifier()
247 init_waitqueue_head(&gms->ms_wait_queue); in gru_alloc_notifier()
249 return &gms->ms_notifier; in gru_alloc_notifier()
276 void gru_drop_mmu_notifier(struct gru_mm_struct *gms) in gru_drop_mmu_notifier() argument
278 mmu_notifier_put(&gms->ms_notifier); in gru_drop_mmu_notifier()