]> www.infradead.org Git - users/jedix/linux-maple.git/commit
drm/amdkfd: Fix the warning of array-index-out-of-bounds
authorMa Jun <Jun.Ma2@amd.com>
Wed, 2 Nov 2022 07:53:26 +0000 (15:53 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 30 Mar 2023 10:49:31 +0000 (12:49 +0200)
commit0ac954ec7f6c6dd6b7e94340599ba4b788d056d5
treeff29e0bc358db2a102e17ebbc4656d7e93345f00
parenta5528973c676dad09a1af25cd49e4312238d1428
drm/amdkfd: Fix the warning of array-index-out-of-bounds

commit c0cc999f3c32e65a7c88fb323893ddf897b24488 upstream.

For some GPUs with more CUs, the original sibling_map[32]
in struct crat_subtype_cache is not enough
to save the cache information when create the VCRAT table,
so skip filling the struct crat_subtype_cache info instead
fill struct kfd_cache_properties directly to fix this problem.

Signed-off-by: Ma Jun <Jun.Ma2@amd.com>
Reviewed-by: Felix Kuehling <Felix.Kuehling@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Cc: "Limonciello, Mario" <Mario.Limonciello@amd.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/gpu/drm/amd/amdkfd/kfd_crat.c
drivers/gpu/drm/amd/amdkfd/kfd_crat.h
drivers/gpu/drm/amd/amdkfd/kfd_topology.c
drivers/gpu/drm/amd/amdkfd/kfd_topology.h