Lines Matching refs:process
184 mm = get_task_mm(pdd->process->lead_thread); in kfd_sdma_activity_worker()
280 proc = pdd->process; in kfd_get_cu_occupancy()
498 if (!q || !q->process) in kfd_procfs_add_queue()
500 proc = q->process; in kfd_procfs_add_queue()
801 struct kfd_process *process; in kfd_create_process() local
827 process = find_process(thread, false); in kfd_create_process()
828 if (process) { in kfd_create_process()
831 process = create_process(thread); in kfd_create_process()
832 if (IS_ERR(process)) in kfd_create_process()
838 process->kobj = kfd_alloc_struct(process->kobj); in kfd_create_process()
839 if (!process->kobj) { in kfd_create_process()
843 ret = kobject_init_and_add(process->kobj, &procfs_type, in kfd_create_process()
845 (int)process->lead_thread->pid); in kfd_create_process()
848 kobject_put(process->kobj); in kfd_create_process()
852 kfd_sysfs_create_file(process->kobj, &process->attr_pasid, in kfd_create_process()
855 process->kobj_queues = kobject_create_and_add("queues", in kfd_create_process()
856 process->kobj); in kfd_create_process()
857 if (!process->kobj_queues) in kfd_create_process()
860 kfd_procfs_add_sysfs_stats(process); in kfd_create_process()
861 kfd_procfs_add_sysfs_files(process); in kfd_create_process()
862 kfd_procfs_add_sysfs_counters(process); in kfd_create_process()
864 init_waitqueue_head(&process->wait_irq_drain); in kfd_create_process()
867 if (!IS_ERR(process)) in kfd_create_process()
868 kref_get(&process->ref); in kfd_create_process()
872 return process; in kfd_create_process()
877 struct kfd_process *process; in kfd_get_process() local
886 process = find_process(thread, false); in kfd_get_process()
887 if (!process) in kfd_get_process()
890 return process; in kfd_get_process()
895 struct kfd_process *process; in find_process_by_mm() local
897 hash_for_each_possible_rcu(kfd_processes_table, process, in find_process_by_mm()
899 if (process->mm == mm) in find_process_by_mm()
900 return process; in find_process_by_mm()
948 struct kfd_process *p = pdd->process; in kfd_process_device_free_bos()
1349 pdd->process->debug_trap_enabled); in kfd_process_device_init_cwsr_dgpu()
1453 struct kfd_process *process; in create_process() local
1457 process = kzalloc(sizeof(*process), GFP_KERNEL); in create_process()
1458 if (!process) in create_process()
1461 kref_init(&process->ref); in create_process()
1462 mutex_init(&process->mutex); in create_process()
1463 process->mm = thread->mm; in create_process()
1464 process->lead_thread = thread->group_leader; in create_process()
1465 process->n_pdds = 0; in create_process()
1466 process->queues_paused = false; in create_process()
1467 INIT_DELAYED_WORK(&process->eviction_work, evict_process_worker); in create_process()
1468 INIT_DELAYED_WORK(&process->restore_work, restore_process_worker); in create_process()
1469 process->last_restore_timestamp = get_jiffies_64(); in create_process()
1470 err = kfd_event_init_process(process); in create_process()
1473 process->is_32bit_user_mode = in_compat_syscall(); in create_process()
1474 process->debug_trap_enabled = false; in create_process()
1475 process->debugger_process = NULL; in create_process()
1476 process->exception_enable_mask = 0; in create_process()
1477 atomic_set(&process->debugged_process_count, 0); in create_process()
1478 sema_init(&process->runtime_enable_sema, 0); in create_process()
1480 process->pasid = kfd_pasid_alloc(); in create_process()
1481 if (process->pasid == 0) { in create_process()
1486 err = pqm_init(&process->pqm, process); in create_process()
1491 err = kfd_init_apertures(process); in create_process()
1496 process->xnack_enabled = kfd_process_xnack_mode(process, false); in create_process()
1498 err = svm_range_list_init(process); in create_process()
1503 hash_add_rcu(kfd_processes_table, &process->kfd_processes, in create_process()
1504 (uintptr_t)process->mm); in create_process()
1509 kref_get(&process->ref); in create_process()
1516 mn = mmu_notifier_get(&kfd_process_mmu_notifier_ops, process->mm); in create_process()
1521 BUG_ON(mn != &process->mmu_notifier); in create_process()
1523 kfd_unref_process(process); in create_process()
1524 get_task_struct(process->lead_thread); in create_process()
1526 INIT_WORK(&process->debug_event_workarea, debug_event_write_work_handler); in create_process()
1528 return process; in create_process()
1531 hash_del_rcu(&process->kfd_processes); in create_process()
1532 svm_range_list_fini(process); in create_process()
1534 kfd_process_free_outstanding_kfd_bos(process); in create_process()
1535 kfd_process_destroy_pdds(process); in create_process()
1537 pqm_uninit(&process->pqm); in create_process()
1539 kfd_pasid_free(process->pasid); in create_process()
1541 kfd_event_free_process(process); in create_process()
1543 mutex_destroy(&process->mutex); in create_process()
1544 kfree(process); in create_process()
1580 pdd->process = p; in kfd_create_process_device_data()
1654 p = pdd->process; in kfd_process_device_init_vm()
2026 int kfd_reserved_mem_mmap(struct kfd_node *dev, struct kfd_process *process, in kfd_reserved_mem_mmap() argument
2037 pdd = kfd_get_process_device_data(dev, process); in kfd_reserved_mem_mmap()
2083 dev->adev, pdd->process->pasid, type, xcc); in kfd_flush_tlb()
2097 pdd->process->irq_drain_is_open = true; in kfd_process_drain_interrupts()
2102 irq_drain_fence[3] = pdd->process->pasid; in kfd_process_drain_interrupts()
2115 pdd->process->irq_drain_is_open = false; in kfd_process_drain_interrupts()
2119 r = wait_event_interruptible(pdd->process->wait_irq_drain, in kfd_process_drain_interrupts()
2120 !READ_ONCE(pdd->process->irq_drain_is_open)); in kfd_process_drain_interrupts()
2122 pdd->process->irq_drain_is_open = false; in kfd_process_drain_interrupts()