linux/drivers/gpu/drm/amd/amdkfd
Felix Kuehling 1e87068570 drm/amdkfd: fix build error with AMD_IOMMU_V2=m
Using 'imply AMD_IOMMU_V2' does not guarantee that the driver can link
against the exported functions. If the GPU driver is built-in but the
IOMMU driver is a loadable module, the kfd_iommu.c file is indeed
built but does not work:

x86_64-linux-ld: drivers/gpu/drm/amd/amdkfd/kfd_iommu.o: in function `kfd_iommu_bind_process_to_device':
kfd_iommu.c:(.text+0x516): undefined reference to `amd_iommu_bind_pasid'
x86_64-linux-ld: drivers/gpu/drm/amd/amdkfd/kfd_iommu.o: in function `kfd_iommu_unbind_process':
kfd_iommu.c:(.text+0x691): undefined reference to `amd_iommu_unbind_pasid'
x86_64-linux-ld: drivers/gpu/drm/amd/amdkfd/kfd_iommu.o: in function `kfd_iommu_suspend':
kfd_iommu.c:(.text+0x966): undefined reference to `amd_iommu_set_invalidate_ctx_cb'
x86_64-linux-ld: kfd_iommu.c:(.text+0x97f): undefined reference to `amd_iommu_set_invalid_ppr_cb'
x86_64-linux-ld: kfd_iommu.c:(.text+0x9a4): undefined reference to `amd_iommu_free_device'
x86_64-linux-ld: drivers/gpu/drm/amd/amdkfd/kfd_iommu.o: in function `kfd_iommu_resume':
kfd_iommu.c:(.text+0xa9a): undefined reference to `amd_iommu_init_device'
x86_64-linux-ld: kfd_iommu.c:(.text+0xadc): undefined reference to `amd_iommu_set_invalidate_ctx_cb'
x86_64-linux-ld: kfd_iommu.c:(.text+0xaff): undefined reference to `amd_iommu_set_invalid_ppr_cb'
x86_64-linux-ld: kfd_iommu.c:(.text+0xc72): undefined reference to `amd_iommu_bind_pasid'
x86_64-linux-ld: kfd_iommu.c:(.text+0xe08): undefined reference to `amd_iommu_set_invalidate_ctx_cb'
x86_64-linux-ld: kfd_iommu.c:(.text+0xe26): undefined reference to `amd_iommu_set_invalid_ppr_cb'
x86_64-linux-ld: kfd_iommu.c:(.text+0xe42): undefined reference to `amd_iommu_free_device'

Use IS_REACHABLE to only build IOMMU-V2 support if the amd_iommu symbols
are reachable by the amdkfd driver. Output a warning if they are not,
because that may not be what the user was expecting.

Fixes: 64d1c3a43a ("drm/amdkfd: Centralize IOMMUv2 code and make it conditional")
Reported-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Felix Kuehling <Felix.Kuehling@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2021-03-23 23:28:11 -04:00
..
cik_event_interrupt.c drm/amdkfd: Add kernel parameter to stop queue eviction on vm fault 2021-03-23 22:59:22 -04:00
cik_int.h
cik_regs.h
cwsr_trap_handler.h drm/amdkfd: Fix saving the ACC vgprs for Aldebaran 2021-03-23 22:56:55 -04:00
cwsr_trap_handler_gfx8.asm drm/amdkfd: Add aldebaran trap handler support 2021-03-10 00:02:24 -05:00
cwsr_trap_handler_gfx9.asm drm/amdkfd: Fix saving the ACC vgprs for Aldebaran 2021-03-23 22:56:55 -04:00
cwsr_trap_handler_gfx10.asm
Kconfig drm/amdkfd: Enable userptr support when KFD is enabled 2021-01-21 09:55:16 -05:00
kfd_chardev.c drm/amdkfd: Move set_trap_handler out of dqm->ops 2021-03-05 15:13:24 -05:00
kfd_crat.c drm/amdkfd: expose host gpu link via sysfs (v2) 2021-03-23 22:52:59 -04:00
kfd_crat.h
kfd_dbgdev.c
kfd_dbgdev.h
kfd_dbgmgr.c
kfd_dbgmgr.h
kfd_debugfs.c
kfd_device.c drm/amdkfd: add aldebaran kfd2kgd callbacks to kfd device (v2) 2021-03-23 22:59:28 -04:00
kfd_device_queue_manager.c drm/amdkfd: Fix UBSAN shift-out-of-bounds warning 2021-03-23 23:00:57 -04:00
kfd_device_queue_manager.h drm/amdkfd: Move set_trap_handler out of dqm->ops 2021-03-05 15:13:24 -05:00
kfd_device_queue_manager_cik.c
kfd_device_queue_manager_v9.c
kfd_device_queue_manager_v10.c drm/amdkfd: Use same SQ prefetch setting as amdgpu 2020-10-21 23:06:07 -04:00
kfd_device_queue_manager_vi.c
kfd_doorbell.c
kfd_events.c
kfd_events.h
kfd_flat_memory.c drm/amdkfd: Add Aldebaran KFD support 2021-03-10 00:02:13 -05:00
kfd_int_process_v9.c drm/amdkfd: Add kernel parameter to stop queue eviction on vm fault 2021-03-23 22:59:22 -04:00
kfd_interrupt.c
kfd_iommu.c drm/amdkfd: fix build error with AMD_IOMMU_V2=m 2021-03-23 23:28:11 -04:00
kfd_iommu.h drm/amdkfd: fix build error with AMD_IOMMU_V2=m 2021-03-23 23:28:11 -04:00
kfd_kernel_queue.c
kfd_kernel_queue.h
kfd_module.c
kfd_mqd_manager.c
kfd_mqd_manager.h drm/amdkfd: Check HIQ's MQD for queue preemption status 2021-03-23 22:59:25 -04:00
kfd_mqd_manager_cik.c drm/amdkfd: Check HIQ's MQD for queue preemption status 2021-03-23 22:59:25 -04:00
kfd_mqd_manager_v9.c drm/amdkfd: Check HIQ's MQD for queue preemption status 2021-03-23 22:59:25 -04:00
kfd_mqd_manager_v10.c drm/amdkfd: Check HIQ's MQD for queue preemption status 2021-03-23 22:59:25 -04:00
kfd_mqd_manager_vi.c drm/amdkfd: Check HIQ's MQD for queue preemption status 2021-03-23 22:59:25 -04:00
kfd_packet_manager.c drm/amdkfd: Add Aldebaran KFD support 2021-03-10 00:02:13 -05:00
kfd_packet_manager_v9.c
kfd_packet_manager_vi.c
kfd_pasid.c
kfd_pm4_headers.h
kfd_pm4_headers_ai.h
kfd_pm4_headers_diq.h
kfd_pm4_headers_vi.h
kfd_pm4_opcodes.h
kfd_priv.h drm/amdkfd: Add kernel parameter to stop queue eviction on vm fault 2021-03-23 22:59:22 -04:00
kfd_process.c drm/amdkfd: Move set_trap_handler out of dqm->ops 2021-03-05 15:13:24 -05:00
kfd_process_queue_manager.c
kfd_queue.c
kfd_smi_events.c
kfd_smi_events.h
kfd_topology.c drm/amdkfd: Add Aldebaran KFD support 2021-03-10 00:02:13 -05:00
kfd_topology.h drm/amdkfd: Use a new capability bit for SRAM ECC 2021-03-05 15:12:48 -05:00
Makefile
soc15_int.h