Lines Matching refs:acc_queue

451 		gt->usm.acc_queue[i].gt = gt;  in xe_gt_pagefault_init()
452 spin_lock_init(&gt->usm.acc_queue[i].lock); in xe_gt_pagefault_init()
453 INIT_WORK(&gt->usm.acc_queue[i].worker, acc_queue_work_func); in xe_gt_pagefault_init()
488 spin_lock(&gt->usm.acc_queue[i].lock); in xe_gt_pagefault_reset()
489 gt->usm.acc_queue[i].head = 0; in xe_gt_pagefault_reset()
490 gt->usm.acc_queue[i].tail = 0; in xe_gt_pagefault_reset()
491 spin_unlock(&gt->usm.acc_queue[i].lock); in xe_gt_pagefault_reset()
594 static bool get_acc(struct acc_queue *acc_queue, struct acc *acc) in get_acc() argument
599 spin_lock(&acc_queue->lock); in get_acc()
600 if (acc_queue->tail != acc_queue->head) { in get_acc()
602 (acc_queue->data + acc_queue->tail); in get_acc()
615 acc_queue->tail = (acc_queue->tail + ACC_MSG_LEN_DW) % in get_acc()
619 spin_unlock(&acc_queue->lock); in get_acc()
626 struct acc_queue *acc_queue = container_of(w, struct acc_queue, worker); in acc_queue_work_func() local
627 struct xe_gt *gt = acc_queue->gt; in acc_queue_work_func()
634 while (get_acc(acc_queue, &acc)) { in acc_queue_work_func()
642 acc_queue->tail != acc_queue->head) { in acc_queue_work_func()
649 static bool acc_queue_full(struct acc_queue *acc_queue) in acc_queue_full() argument
651 lockdep_assert_held(&acc_queue->lock); in acc_queue_full()
653 return CIRC_SPACE(acc_queue->head, acc_queue->tail, ACC_QUEUE_NUM_DW) <= in acc_queue_full()
660 struct acc_queue *acc_queue; in xe_guc_access_counter_notify_handler() local
673 acc_queue = &gt->usm.acc_queue[asid % NUM_ACC_QUEUE]; in xe_guc_access_counter_notify_handler()
675 spin_lock(&acc_queue->lock); in xe_guc_access_counter_notify_handler()
676 full = acc_queue_full(acc_queue); in xe_guc_access_counter_notify_handler()
678 memcpy(acc_queue->data + acc_queue->head, msg, in xe_guc_access_counter_notify_handler()
680 acc_queue->head = (acc_queue->head + len) % ACC_QUEUE_NUM_DW; in xe_guc_access_counter_notify_handler()
681 queue_work(gt->usm.acc_wq, &acc_queue->worker); in xe_guc_access_counter_notify_handler()
685 spin_unlock(&acc_queue->lock); in xe_guc_access_counter_notify_handler()