Lines Matching refs:acc_queue

456 		gt->usm.acc_queue[i].gt = gt;  in xe_gt_pagefault_init()
457 spin_lock_init(&gt->usm.acc_queue[i].lock); in xe_gt_pagefault_init()
458 INIT_WORK(&gt->usm.acc_queue[i].worker, acc_queue_work_func); in xe_gt_pagefault_init()
493 spin_lock(&gt->usm.acc_queue[i].lock); in xe_gt_pagefault_reset()
494 gt->usm.acc_queue[i].head = 0; in xe_gt_pagefault_reset()
495 gt->usm.acc_queue[i].tail = 0; in xe_gt_pagefault_reset()
496 spin_unlock(&gt->usm.acc_queue[i].lock); in xe_gt_pagefault_reset()
599 static bool get_acc(struct acc_queue *acc_queue, struct acc *acc) in get_acc() argument
604 spin_lock(&acc_queue->lock); in get_acc()
605 if (acc_queue->tail != acc_queue->head) { in get_acc()
607 (acc_queue->data + acc_queue->tail); in get_acc()
620 acc_queue->tail = (acc_queue->tail + ACC_MSG_LEN_DW) % in get_acc()
624 spin_unlock(&acc_queue->lock); in get_acc()
631 struct acc_queue *acc_queue = container_of(w, struct acc_queue, worker); in acc_queue_work_func() local
632 struct xe_gt *gt = acc_queue->gt; in acc_queue_work_func()
640 while (get_acc(acc_queue, &acc)) { in acc_queue_work_func()
648 acc_queue->tail != acc_queue->head) { in acc_queue_work_func()
655 static bool acc_queue_full(struct acc_queue *acc_queue) in acc_queue_full() argument
657 lockdep_assert_held(&acc_queue->lock); in acc_queue_full()
659 return CIRC_SPACE(acc_queue->head, acc_queue->tail, ACC_QUEUE_NUM_DW) <= in acc_queue_full()
666 struct acc_queue *acc_queue; in xe_guc_access_counter_notify_handler() local
679 acc_queue = &gt->usm.acc_queue[asid % NUM_ACC_QUEUE]; in xe_guc_access_counter_notify_handler()
681 spin_lock(&acc_queue->lock); in xe_guc_access_counter_notify_handler()
682 full = acc_queue_full(acc_queue); in xe_guc_access_counter_notify_handler()
684 memcpy(acc_queue->data + acc_queue->head, msg, in xe_guc_access_counter_notify_handler()
686 acc_queue->head = (acc_queue->head + len) % ACC_QUEUE_NUM_DW; in xe_guc_access_counter_notify_handler()
687 queue_work(gt->usm.acc_wq, &acc_queue->worker); in xe_guc_access_counter_notify_handler()
691 spin_unlock(&acc_queue->lock); in xe_guc_access_counter_notify_handler()