linux/drivers/gpu/drm/amd/amdkfd
Mukul Joshi 306888b124 drm/amdkfd: Fix kernel warning during topology setup
commit cf97eb7e47 upstream.

This patch fixes the following kernel warning seen during
driver load by correctly initializing the p2plink attr before
creating the sysfs file:

[  +0.002865] ------------[ cut here ]------------
[  +0.002327] kobject: '(null)' (0000000056260cfb): is not initialized, yet kobject_put() is being called.
[  +0.004780] WARNING: CPU: 32 PID: 1006 at lib/kobject.c:718 kobject_put+0xaa/0x1c0
[  +0.001361] Call Trace:
[  +0.001234]  <TASK>
[  +0.001067]  kfd_remove_sysfs_node_entry+0x24a/0x2d0 [amdgpu]
[  +0.003147]  kfd_topology_update_sysfs+0x3d/0x750 [amdgpu]
[  +0.002890]  kfd_topology_add_device+0xbd7/0xc70 [amdgpu]
[  +0.002844]  ? lock_release+0x13c/0x2e0
[  +0.001936]  ? smu_cmn_send_smc_msg_with_param+0x1e8/0x2d0 [amdgpu]
[  +0.003313]  ? amdgpu_dpm_get_mclk+0x54/0x60 [amdgpu]
[  +0.002703]  kgd2kfd_device_init.cold+0x39f/0x4ed [amdgpu]
[  +0.002930]  amdgpu_amdkfd_device_init+0x13d/0x1f0 [amdgpu]
[  +0.002944]  amdgpu_device_init.cold+0x1464/0x17b4 [amdgpu]
[  +0.002970]  ? pci_bus_read_config_word+0x43/0x80
[  +0.002380]  amdgpu_driver_load_kms+0x15/0x100 [amdgpu]
[  +0.002744]  amdgpu_pci_probe+0x147/0x370 [amdgpu]
[  +0.002522]  local_pci_probe+0x40/0x80
[  +0.001896]  work_for_cpu_fn+0x10/0x20
[  +0.001892]  process_one_work+0x26e/0x5a0
[  +0.002029]  worker_thread+0x1fd/0x3e0
[  +0.001890]  ? process_one_work+0x5a0/0x5a0
[  +0.002115]  kthread+0xea/0x110
[  +0.001618]  ? kthread_complete_and_exit+0x20/0x20
[  +0.002422]  ret_from_fork+0x1f/0x30
[  +0.001808]  </TASK>
[  +0.001103] irq event stamp: 59837
[  +0.001718] hardirqs last  enabled at (59849): [<ffffffffb30fab12>] __up_console_sem+0x52/0x60
[  +0.004414] hardirqs last disabled at (59860): [<ffffffffb30faaf7>] __up_console_sem+0x37/0x60
[  +0.004414] softirqs last  enabled at (59654): [<ffffffffb307d9c7>] irq_exit_rcu+0xd7/0x130
[  +0.004205] softirqs last disabled at (59649): [<ffffffffb307d9c7>] irq_exit_rcu+0xd7/0x130
[  +0.004203] ---[ end trace 0000000000000000 ]---

Fixes: 0f28cca87e ("drm/amdkfd: Extend KFD device topology to surface peer-to-peer links")
Signed-off-by: Mukul Joshi <mukul.joshi@amd.com>
Reviewed-by: Felix Kuehling <Felix.Kuehling@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Cc: stable@vger.kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-01-12 12:02:52 +01:00
..
cik_event_interrupt.c
cik_int.h
cik_regs.h
cwsr_trap_handler_gfx8.asm
cwsr_trap_handler_gfx9.asm
cwsr_trap_handler_gfx10.asm drm/amdkfd: update GFX11 CWSR trap handler 2022-11-02 17:16:25 -04:00
cwsr_trap_handler.h drm/amdkfd: update GFX11 CWSR trap handler 2022-11-02 17:16:25 -04:00
Kconfig drm/amdkfd: Define config HSA_AMD_P2P to support peer-to-peer 2022-06-08 11:40:12 -04:00
kfd_chardev.c drm/amdkfd: Fix error handling in criu_checkpoint 2022-11-09 17:57:48 -05:00
kfd_crat.c drm/amdkfd: correct the cache info for gfx1036 2022-10-24 14:44:03 -04:00
kfd_crat.h
kfd_debugfs.c drm/amdgpu: add debugfs for kfd system and ttm mem used 2022-07-28 16:05:16 -04:00
kfd_device_queue_manager_cik.c
kfd_device_queue_manager_v9.c
kfd_device_queue_manager_v10.c
kfd_device_queue_manager_v11.c
kfd_device_queue_manager_vi.c
kfd_device_queue_manager.c drm/amdkfd: Fix UBSAN shift-out-of-bounds warning 2022-09-30 11:21:25 -04:00
kfd_device_queue_manager.h
kfd_device.c drm/amdkfd: Added GFX 11.0.3 Support 2022-08-30 16:37:11 -04:00
kfd_doorbell.c drm/amdkfd: Fix CRIU restore op due to doorbell offset 2022-09-13 12:54:23 -04:00
kfd_events.c drm/amdkfd: Fix error handling in kfd_criu_restore_events 2022-11-09 17:57:16 -05:00
kfd_events.h
kfd_flat_memory.c
kfd_int_process_v9.c
kfd_int_process_v11.c drm/amdkfd: fix dropped interrupt in kfd_int_process_v11 2022-09-29 09:41:44 -04:00
kfd_interrupt.c drm/amdkfd: use time_is_before_jiffies(a + b) to replace "jiffies - a > b" 2022-07-29 15:17:31 -04:00
kfd_iommu.c
kfd_iommu.h
kfd_kernel_queue.c
kfd_kernel_queue.h
kfd_migrate.c drm/amdkfd: Fix NULL pointer dereference in svm_migrate_to_ram() 2022-11-02 16:58:36 -04:00
kfd_migrate.h mm/memory.c: fix race when faulting a device private page 2022-10-12 18:51:49 -07:00
kfd_module.c
kfd_mqd_manager_cik.c
kfd_mqd_manager_v9.c
kfd_mqd_manager_v10.c
kfd_mqd_manager_v11.c drm/amdgpu: Enable F32_WPTR_POLL_ENABLE in mqd 2022-10-06 12:05:44 -04:00
kfd_mqd_manager_vi.c
kfd_mqd_manager.c drm/amdkfd: fix cu mask for asics with wgps 2022-06-30 15:28:03 -04:00
kfd_mqd_manager.h
kfd_packet_manager_v9.c
kfd_packet_manager_vi.c
kfd_packet_manager.c
kfd_pasid.c
kfd_pm4_headers_ai.h
kfd_pm4_headers_aldebaran.h
kfd_pm4_headers_diq.h
kfd_pm4_headers_vi.h
kfd_pm4_headers.h
kfd_pm4_opcodes.h
kfd_priv.h drm/amdkfd: Handle restart of kfd_ioctl_wait_events 2022-08-10 15:41:23 -04:00
kfd_process_queue_manager.c drm/amdkfd: Fix CRIU restore op due to doorbell offset 2022-09-13 12:54:23 -04:00
kfd_process.c drm/amdkfd: Fix double release compute pasid 2023-01-12 12:02:38 +01:00
kfd_queue.c
kfd_smi_events.c drm/amdkfd: Asynchronously free smi_client 2022-06-30 15:31:30 -04:00
kfd_smi_events.h drm/amdkfd: Add unmap from GPU SMI event 2022-06-30 15:31:21 -04:00
kfd_svm.c - Alistair Popple has a series which addresses a race which causes page 2022-10-14 12:28:43 -07:00
kfd_svm.h drm/amdkfd: Track unified memory when switching xnack mode 2022-09-30 11:21:14 -04:00
kfd_topology.c drm/amdkfd: Fix kernel warning during topology setup 2023-01-12 12:02:52 +01:00
kfd_topology.h drm/amdkfd: Remove field io_link_count from struct kfd_topology_device 2022-06-10 15:24:26 -04:00
Makefile
soc15_int.h