/linux-6.3-rc2/drivers/gpu/drm/amd/amdkfd/ |
A D | kfd_device.c | 416 kfd = kzalloc(sizeof(*kfd), GFP_KERNEL); in kgd2kfd_probe() 494 kfd->adev->gds.gws_size, &kfd->gws); in kfd_gws_init() 568 kfd->adev, size, &kfd->gtt_mem, in kgd2kfd_device_init() 590 kfd->hive_id = kfd->adev->gmc.xgmi.hive_id; in kgd2kfd_device_init() 592 kfd->noretry = kfd->adev->gmc.noretry; in kgd2kfd_device_init() 599 kfd->dqm = device_queue_manager_init(kfd); in kgd2kfd_device_init() 666 amdgpu_amdkfd_free_gws(kfd->adev, kfd->gws); in kgd2kfd_device_init() 698 kfd->dqm->ops.pre_reset(kfd->dqm); in kgd2kfd_pre_reset() 748 kfd->dqm->ops.stop(kfd->dqm); in kgd2kfd_suspend() 790 err = kfd->dqm->ops.start(kfd->dqm); in kfd_resume() [all …]
|
A D | kfd_doorbell.c | 73 kfd->doorbell_base = in kfd_doorbell_init() 99 if (!kfd->max_doorbell_slices || in kfd_doorbell_init() 103 kfd->doorbell_base = kfd->shared_resources.doorbell_physical_address + in kfd_doorbell_init() 108 kfd->doorbell_kernel_ptr = ioremap(kfd->doorbell_base, in kfd_doorbell_init() 111 if (!kfd->doorbell_kernel_ptr) in kfd_doorbell_init() 116 (uintptr_t)kfd->doorbell_base); in kfd_doorbell_init() 119 kfd->doorbell_base_dw_offset); in kfd_doorbell_init() 125 (uintptr_t)kfd->doorbell_base); in kfd_doorbell_init() 137 if (kfd->doorbell_kernel_ptr) in kfd_doorbell_fini() 190 mutex_lock(&kfd->doorbell_mutex); in kfd_get_kernel_doorbell() [all …]
|
A D | kfd_interrupt.c | 57 r = kfifo_alloc(&kfd->ih_fifo, in kfd_interrupt_init() 66 if (unlikely(!kfd->ih_wq)) { in kfd_interrupt_init() 67 kfifo_free(&kfd->ih_fifo); in kfd_interrupt_init() 71 spin_lock_init(&kfd->interrupt_lock); in kfd_interrupt_init() 75 kfd->interrupts_active = true; in kfd_interrupt_init() 97 kfd->interrupts_active = false; in kfd_interrupt_exit() 105 flush_workqueue(kfd->ih_wq); in kfd_interrupt_exit() 107 kfifo_free(&kfd->ih_fifo); in kfd_interrupt_exit() 118 kfd->device_info.ih_ring_entry_size); in enqueue_ih_ring_entry() 120 dev_dbg_ratelimited(kfd->adev->dev, in enqueue_ih_ring_entry() [all …]
|
A D | kfd_iommu.c | 48 if (!kfd->use_iommu_v2) 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() 279 void kfd_iommu_suspend(struct kfd_dev *kfd) in kfd_iommu_suspend() argument 281 if (!kfd->use_iommu_v2) in kfd_iommu_suspend() 284 kfd_unbind_processes_from_device(kfd); in kfd_iommu_suspend() 288 amd_iommu_free_device(kfd->adev->pdev); in kfd_iommu_suspend() 296 int kfd_iommu_resume(struct kfd_dev *kfd) in kfd_iommu_resume() argument 301 if (!kfd->use_iommu_v2) in kfd_iommu_resume() 315 err = kfd_bind_processes_to_device(kfd); in kfd_iommu_resume() [all …]
|
A 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
|
A 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, 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, 1306 uint64_t kfd_get_number_elems(struct kfd_dev *kfd); 1365 static inline int kfd_devcgroup_check_permission(struct kfd_dev *kfd) in kfd_devcgroup_check_permission() argument [all …]
|
A D | kfd_migrate.c | 209 return (addr + adev->kfd.dev->pgmap.range.start) >> PAGE_SHIFT; in svm_migrate_addr_to_pfn() 239 return (addr - adev->kfd.dev->pgmap.range.start); in svm_migrate_addr() 430 kfd_smi_event_migration_start(adev->kfd.dev, p->lead_thread->pid, in svm_migrate_vma_to_vram() 432 0, adev->kfd.dev->id, prange->prefetch_loc, in svm_migrate_vma_to_vram() 463 kfd_smi_event_migration_end(adev->kfd.dev, p->lead_thread->pid, in svm_migrate_vma_to_vram() 465 0, adev->kfd.dev->id, trigger); in svm_migrate_vma_to_vram() 697 kfd_smi_event_migration_start(adev->kfd.dev, p->lead_thread->pid, in svm_migrate_vma_to_ram() 699 adev->kfd.dev->id, 0, prange->prefetch_loc, in svm_migrate_vma_to_ram() 733 kfd_smi_event_migration_end(adev->kfd.dev, p->lead_thread->pid, in svm_migrate_vma_to_ram() 735 adev->kfd.dev->id, 0, trigger); in svm_migrate_vma_to_ram() [all …]
|
A 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()
|
A 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()
|
A 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()
|
A D | kfd_mqd_manager.h | 71 struct kfd_mem_obj* (*allocate_mqd)(struct kfd_dev *kfd,
|
A 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()
|
A 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()
|
A 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()
|
A 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()
|
A 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.3-rc2/drivers/gpu/drm/amd/amdgpu/ |
A D | amdgpu_amdkfd.h | 362 bool kgd2kfd_device_init(struct kfd_dev *kfd, 364 void kgd2kfd_device_exit(struct kfd_dev *kfd); 365 void kgd2kfd_suspend(struct kfd_dev *kfd, bool run_pm); 366 int kgd2kfd_resume_iommu(struct kfd_dev *kfd); 367 int kgd2kfd_resume(struct kfd_dev *kfd, bool run_pm); 368 int kgd2kfd_pre_reset(struct kfd_dev *kfd); 369 int kgd2kfd_post_reset(struct kfd_dev *kfd); 371 void kgd2kfd_set_sram_ecc_flag(struct kfd_dev *kfd); 390 bool kgd2kfd_device_init(struct kfd_dev *kfd, in kgd2kfd_device_init() argument 414 static inline int kgd2kfd_pre_reset(struct kfd_dev *kfd) in kgd2kfd_pre_reset() argument [all …]
|
A D | amdgpu_amdkfd.c | 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() 208 if (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() 224 if (adev->kfd.dev) in amdgpu_amdkfd_suspend() 232 if (adev->kfd.dev) in amdgpu_amdkfd_resume_iommu() 242 if (adev->kfd.dev) in amdgpu_amdkfd_resume() 252 if (adev->kfd.dev) in amdgpu_amdkfd_pre_reset() 262 if (adev->kfd.dev) in amdgpu_amdkfd_post_reset() [all …]
|
A D | amdgpu_umc.c | 88 kgd2kfd_set_sram_ecc_flag(adev->kfd.dev); in amdgpu_umc_do_page_retirement() 190 kgd2kfd_set_sram_ecc_flag(adev->kfd.dev); in amdgpu_umc_poison_handler()
|
A D | amdgpu_amdkfd_gpuvm.c | 175 (adev && adev->kfd.vram_used + vram_needed > in amdgpu_amdkfd_reserve_mem_limit() 187 adev->kfd.vram_used += vram_needed; in amdgpu_amdkfd_reserve_mem_limit() 188 adev->kfd.vram_used_aligned += ALIGN(vram_needed, VRAM_AVAILABLITY_ALIGN); in amdgpu_amdkfd_reserve_mem_limit() 210 adev->kfd.vram_used -= size; in amdgpu_amdkfd_unreserve_mem_limit() 211 adev->kfd.vram_used_aligned -= ALIGN(size, VRAM_AVAILABLITY_ALIGN); in amdgpu_amdkfd_unreserve_mem_limit() 221 WARN_ONCE(adev && adev->kfd.vram_used < 0, in amdgpu_amdkfd_unreserve_mem_limit() 1582 - adev->kfd.vram_used_aligned in amdgpu_amdkfd_get_available_memory()
|
A D | amdgpu_sdma.c | 127 kgd2kfd_set_sram_ecc_flag(adev->kfd.dev); in amdgpu_sdma_process_ras_data_cb()
|
/linux-6.3-rc2/samples/bpf/ |
A 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.3-rc2/tools/perf/ |
A D | builtin-probe.c | 434 int ret, ret2, ufd = -1, kfd = -1; in perf_del_probe_events() local 448 ret = probe_file__open_both(&kfd, &ufd, PF_FL_RW); in perf_del_probe_events() 459 ret = probe_file__get_events(kfd, filter, klist); in perf_del_probe_events() 464 ret = probe_file__del_strlist(kfd, klist); in perf_del_probe_events() 487 if (kfd >= 0) in perf_del_probe_events() 488 close(kfd); in perf_del_probe_events()
|
/linux-6.3-rc2/tools/perf/util/ |
A 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()
|
A D | probe-file.h | 42 int probe_file__open_both(int *kfd, int *ufd, int flag);
|