/linux-6.1.9/drivers/gpu/drm/amd/amdkfd/ |
D | kfd_device.c | 58 static int kfd_gtt_sa_init(struct kfd_dev *kfd, unsigned int buf_size, 60 static void kfd_gtt_sa_fini(struct kfd_dev *kfd); 62 static int kfd_resume(struct kfd_dev *kfd); 64 static void kfd_device_info_set_sdma_info(struct kfd_dev *kfd) in kfd_device_info_set_sdma_info() argument 66 uint32_t sdma_version = kfd->adev->ip_versions[SDMA0_HWIP][0]; in kfd_device_info_set_sdma_info() 78 kfd->device_info.num_sdma_queues_per_engine = 2; in kfd_device_info_set_sdma_info() 95 kfd->device_info.num_sdma_queues_per_engine = 8; in kfd_device_info_set_sdma_info() 101 kfd->device_info.num_sdma_queues_per_engine = 8; in kfd_device_info_set_sdma_info() 109 kfd->device_info.num_reserved_sdma_queues_per_engine = 2; in kfd_device_info_set_sdma_info() 111 kfd->device_info.reserved_sdma_queues_bitmap = 0xFULL; in kfd_device_info_set_sdma_info() [all …]
|
D | kfd_doorbell.c | 50 size_t kfd_doorbell_process_slice(struct kfd_dev *kfd) in kfd_doorbell_process_slice() argument 52 if (!kfd->shared_resources.enable_mes) in kfd_doorbell_process_slice() 53 return roundup(kfd->device_info.doorbell_size * in kfd_doorbell_process_slice() 58 (struct amdgpu_device *)kfd->adev); in kfd_doorbell_process_slice() 62 int kfd_doorbell_init(struct kfd_dev *kfd) in kfd_doorbell_init() argument 72 if (kfd->shared_resources.enable_mes) { in kfd_doorbell_init() 73 kfd->doorbell_base = in kfd_doorbell_init() 74 kfd->shared_resources.doorbell_physical_address; in kfd_doorbell_init() 85 roundup(kfd->shared_resources.doorbell_start_offset, in kfd_doorbell_init() 86 kfd_doorbell_process_slice(kfd)); in kfd_doorbell_init() [all …]
|
D | kfd_interrupt.c | 53 int kfd_interrupt_init(struct kfd_dev *kfd) in kfd_interrupt_init() argument 57 r = kfifo_alloc(&kfd->ih_fifo, in kfd_interrupt_init() 58 KFD_IH_NUM_ENTRIES * kfd->device_info.ih_ring_entry_size, in kfd_interrupt_init() 61 dev_err(kfd->adev->dev, "Failed to allocate IH fifo\n"); in kfd_interrupt_init() 65 kfd->ih_wq = alloc_workqueue("KFD IH", WQ_HIGHPRI, 1); in kfd_interrupt_init() 66 if (unlikely(!kfd->ih_wq)) { in kfd_interrupt_init() 67 kfifo_free(&kfd->ih_fifo); in kfd_interrupt_init() 68 dev_err(kfd->adev->dev, "Failed to allocate KFD IH workqueue\n"); in kfd_interrupt_init() 71 spin_lock_init(&kfd->interrupt_lock); in kfd_interrupt_init() 73 INIT_WORK(&kfd->interrupt_work, interrupt_wq); in kfd_interrupt_init() [all …]
|
D | kfd_iommu.c | 43 int kfd_iommu_check_device(struct kfd_dev *kfd) in kfd_iommu_check_device() argument 48 if (!kfd->use_iommu_v2) in kfd_iommu_check_device() 52 err = amd_iommu_device_info(kfd->pdev, &iommu_info); in kfd_iommu_check_device() 64 int kfd_iommu_device_init(struct kfd_dev *kfd) in kfd_iommu_device_init() argument 70 if (!kfd->use_iommu_v2) in kfd_iommu_device_init() 74 err = amd_iommu_device_info(kfd->pdev, &iommu_info); in kfd_iommu_device_init() 92 (unsigned int)(1 << kfd->device_info.max_pasid_bits), in kfd_iommu_device_init() 207 static int kfd_bind_processes_to_device(struct kfd_dev *kfd) in kfd_bind_processes_to_device() argument 218 pdd = kfd_get_process_device_data(kfd, p); in kfd_bind_processes_to_device() 225 err = amd_iommu_bind_pasid(kfd->pdev, p->pasid, in kfd_bind_processes_to_device() [all …]
|
D | kfd_iommu.h | 33 int kfd_iommu_check_device(struct kfd_dev *kfd); 34 int kfd_iommu_device_init(struct kfd_dev *kfd); 39 void kfd_iommu_suspend(struct kfd_dev *kfd); 40 int kfd_iommu_resume(struct kfd_dev *kfd); 46 static inline int kfd_iommu_check_device(struct kfd_dev *kfd) in kfd_iommu_check_device() argument 50 static inline int kfd_iommu_device_init(struct kfd_dev *kfd) in kfd_iommu_device_init() argument 68 static inline void kfd_iommu_suspend(struct kfd_dev *kfd) in kfd_iommu_suspend() argument 72 static inline int kfd_iommu_resume(struct kfd_dev *kfd) in kfd_iommu_resume() argument
|
D | kfd_priv.h | 992 size_t kfd_doorbell_process_slice(struct kfd_dev *kfd); 993 int kfd_doorbell_init(struct kfd_dev *kfd); 994 void kfd_doorbell_fini(struct kfd_dev *kfd); 997 void __iomem *kfd_get_kernel_doorbell(struct kfd_dev *kfd, 999 void kfd_release_kernel_doorbell(struct kfd_dev *kfd, u32 __iomem *db_addr); 1003 unsigned int kfd_get_doorbell_dw_offset_in_bar(struct kfd_dev *kfd, 1007 int kfd_alloc_process_doorbells(struct kfd_dev *kfd, 1009 void kfd_free_process_doorbells(struct kfd_dev *kfd, 1013 int kfd_gtt_sa_allocate(struct kfd_dev *kfd, unsigned int size, 1016 int kfd_gtt_sa_free(struct kfd_dev *kfd, struct kfd_mem_obj *mem_obj); [all …]
|
D | kfd_migrate.c | 215 return (addr + adev->kfd.dev->pgmap.range.start) >> PAGE_SHIFT; in svm_migrate_addr_to_pfn() 245 return (addr - adev->kfd.dev->pgmap.range.start); in svm_migrate_addr() 436 kfd_smi_event_migration_start(adev->kfd.dev, p->lead_thread->pid, in svm_migrate_vma_to_vram() 438 0, adev->kfd.dev->id, prange->prefetch_loc, in svm_migrate_vma_to_vram() 469 kfd_smi_event_migration_end(adev->kfd.dev, p->lead_thread->pid, in svm_migrate_vma_to_vram() 471 0, adev->kfd.dev->id, trigger); in svm_migrate_vma_to_vram() 703 kfd_smi_event_migration_start(adev->kfd.dev, p->lead_thread->pid, in svm_migrate_vma_to_ram() 705 adev->kfd.dev->id, 0, prange->prefetch_loc, in svm_migrate_vma_to_ram() 739 kfd_smi_event_migration_end(adev->kfd.dev, p->lead_thread->pid, in svm_migrate_vma_to_ram() 741 adev->kfd.dev->id, 0, trigger); in svm_migrate_vma_to_ram() [all …]
|
D | kfd_mqd_manager_v9.c | 86 static struct kfd_mem_obj *allocate_mqd(struct kfd_dev *kfd, in allocate_mqd() argument 108 if (kfd->cwsr_enabled && (q->type == KFD_QUEUE_TYPE_COMPUTE)) { in allocate_mqd() 112 retval = amdgpu_amdkfd_alloc_gtt_mem(kfd->adev, in allocate_mqd() 119 retval = kfd_gtt_sa_allocate(kfd, sizeof(struct v9_mqd), in allocate_mqd()
|
D | kfd_mqd_manager_v11.c | 84 static struct kfd_mem_obj *allocate_mqd(struct kfd_dev *kfd, in allocate_mqd() argument 94 if (kfd->shared_resources.enable_mes) in allocate_mqd() 99 if (kfd_gtt_sa_allocate(kfd, size, &mqd_mem_obj)) in allocate_mqd()
|
D | kfd_packet_manager_vi.c | 80 struct kfd_dev *kfd = pm->dqm->dev; in pm_runlist_vi() local 95 kfd->max_proc_per_quantum); in pm_runlist_vi()
|
D | kfd_mqd_manager.h | 71 struct kfd_mem_obj* (*allocate_mqd)(struct kfd_dev *kfd,
|
D | kfd_packet_manager_v9.c | 122 struct kfd_dev *kfd = pm->dqm->dev; in pm_runlist_v9() local 134 kfd->max_proc_per_quantum); in pm_runlist_v9()
|
D | kfd_mqd_manager_cik.c | 77 static struct kfd_mem_obj *allocate_mqd(struct kfd_dev *kfd, in allocate_mqd() argument 82 if (kfd_gtt_sa_allocate(kfd, sizeof(struct cik_mqd), in allocate_mqd()
|
D | kfd_mqd_manager_v10.c | 77 static struct kfd_mem_obj *allocate_mqd(struct kfd_dev *kfd, in allocate_mqd() argument 82 if (kfd_gtt_sa_allocate(kfd, sizeof(struct v10_compute_mqd), in allocate_mqd()
|
D | kfd_mqd_manager_vi.c | 80 static struct kfd_mem_obj *allocate_mqd(struct kfd_dev *kfd, in allocate_mqd() argument 85 if (kfd_gtt_sa_allocate(kfd, sizeof(struct vi_mqd), in allocate_mqd()
|
D | kfd_events.c | 351 struct kfd_dev *kfd; in kfd_kmap_event_page() local 367 kfd = pdd->dev; in kfd_kmap_event_page() 369 pdd = kfd_bind_process_to_device(kfd, p); in kfd_kmap_event_page()
|
/linux-6.1.9/drivers/gpu/drm/amd/amdgpu/ |
D | amdgpu_amdkfd.h | 357 bool kgd2kfd_device_init(struct kfd_dev *kfd, 360 void kgd2kfd_device_exit(struct kfd_dev *kfd); 361 void kgd2kfd_suspend(struct kfd_dev *kfd, bool run_pm); 362 int kgd2kfd_resume_iommu(struct kfd_dev *kfd); 363 int kgd2kfd_resume(struct kfd_dev *kfd, bool run_pm); 364 int kgd2kfd_pre_reset(struct kfd_dev *kfd); 365 int kgd2kfd_post_reset(struct kfd_dev *kfd); 366 void kgd2kfd_interrupt(struct kfd_dev *kfd, const void *ih_ring_entry); 367 void kgd2kfd_set_sram_ecc_flag(struct kfd_dev *kfd); 368 void kgd2kfd_smi_event_throttle(struct kfd_dev *kfd, uint64_t throttle_bitmask); [all …]
|
D | amdgpu_amdkfd.c | 77 adev->kfd.dev = kgd2kfd_probe(adev, vf); in amdgpu_amdkfd_device_probe() 128 kfd.reset_work); in amdgpu_amdkfd_reset_work() 146 if (adev->kfd.dev) { in amdgpu_amdkfd_device_init() 197 adev->kfd.init_complete = kgd2kfd_device_init(adev->kfd.dev, in amdgpu_amdkfd_device_init() 202 INIT_WORK(&adev->kfd.reset_work, amdgpu_amdkfd_reset_work); in amdgpu_amdkfd_device_init() 208 if (adev->kfd.dev) { in amdgpu_amdkfd_device_fini_sw() 209 kgd2kfd_device_exit(adev->kfd.dev); in amdgpu_amdkfd_device_fini_sw() 210 adev->kfd.dev = NULL; in amdgpu_amdkfd_device_fini_sw() 218 if (adev->kfd.dev) in amdgpu_amdkfd_interrupt() 219 kgd2kfd_interrupt(adev->kfd.dev, ih_ring_entry); in amdgpu_amdkfd_interrupt() [all …]
|
D | amdgpu_umc.c | 35 kgd2kfd_set_sram_ecc_flag(adev->kfd.dev); in amdgpu_umc_do_page_retirement()
|
D | amdgpu_amdkfd_gpuvm.c | 173 (adev && adev->kfd.vram_used + vram_needed > in amdgpu_amdkfd_reserve_mem_limit() 185 adev->kfd.vram_used += vram_needed; in amdgpu_amdkfd_reserve_mem_limit() 186 adev->kfd.vram_used_aligned += ALIGN(vram_needed, VRAM_AVAILABLITY_ALIGN); in amdgpu_amdkfd_reserve_mem_limit() 208 adev->kfd.vram_used -= size; in amdgpu_amdkfd_unreserve_mem_limit() 209 adev->kfd.vram_used_aligned -= ALIGN(size, VRAM_AVAILABLITY_ALIGN); in amdgpu_amdkfd_unreserve_mem_limit() 219 WARN_ONCE(adev && adev->kfd.vram_used < 0, in amdgpu_amdkfd_unreserve_mem_limit() 1636 - adev->kfd.vram_used_aligned in amdgpu_amdkfd_get_available_memory()
|
D | amdgpu_sdma.c | 127 kgd2kfd_set_sram_ecc_flag(adev->kfd.dev); in amdgpu_sdma_process_ras_data_cb()
|
/linux-6.1.9/samples/bpf/ |
D | task_fd_query_user.c | 234 int err = -1, res, kfd, efd; in test_debug_fs_uprobe() local 240 kfd = open(buf, O_WRONLY | O_TRUNC, 0); in test_debug_fs_uprobe() 241 CHECK_PERROR_RET(kfd < 0); in test_debug_fs_uprobe() 250 CHECK_PERROR_RET(write(kfd, buf, strlen(buf)) < 0); in test_debug_fs_uprobe() 252 close(kfd); in test_debug_fs_uprobe() 253 kfd = -1; in test_debug_fs_uprobe() 270 kfd = sys_perf_event_open(&attr, -1, 0, -1, PERF_FLAG_FD_CLOEXEC); in test_debug_fs_uprobe() 271 link = bpf_program__attach_perf_event(progs[0], kfd); in test_debug_fs_uprobe() 275 close(kfd); in test_debug_fs_uprobe() 280 err = bpf_task_fd_query(getpid(), kfd, 0, buf, &len, in test_debug_fs_uprobe()
|
/linux-6.1.9/tools/perf/ |
D | builtin-probe.c | 425 int ret, ret2, ufd = -1, kfd = -1; in perf_del_probe_events() local 439 ret = probe_file__open_both(&kfd, &ufd, PF_FL_RW); in perf_del_probe_events() 450 ret = probe_file__get_events(kfd, filter, klist); in perf_del_probe_events() 455 ret = probe_file__del_strlist(kfd, klist); in perf_del_probe_events() 478 if (kfd >= 0) in perf_del_probe_events() 479 close(kfd); in perf_del_probe_events()
|
/linux-6.1.9/tools/perf/util/ |
D | probe-file.c | 152 int probe_file__open_both(int *kfd, int *ufd, int flag) in probe_file__open_both() argument 154 if (!kfd || !ufd) in probe_file__open_both() 157 *kfd = open_kprobe_events(flag & PF_FL_RW); in probe_file__open_both() 159 if (*kfd < 0 && *ufd < 0) { in probe_file__open_both() 160 print_both_open_warning(*kfd, *ufd, flag & PF_FL_RW); in probe_file__open_both() 161 return *kfd; in probe_file__open_both()
|
D | probe-file.h | 42 int probe_file__open_both(int *kfd, int *ufd, int flag);
|