OSDN Git Service

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)
committerAlex Deucher <alexander.deucher@amd.com>
Fri, 4 Nov 2022 20:05:53 +0000 (16:05 -0400)
commitc0cc999f3c32e65a7c88fb323893ddf897b24488
tree5f492204010dd8722c25e0a852b2774a72c7f436
parentcfa61b8f9e9e5e14e7a79f3e9454feb8e4690f99
drm/amdkfd: Fix the warning of array-index-out-of-bounds

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>
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