From: "Ma, Jun" <majun@amd.com>
To: Felix Kuehling <felix.kuehling@amd.com>, Ma Jun <Jun.Ma2@amd.com>,
amd-gfx@lists.freedesktop.org, alexander.deucher@amd.com
Cc: guchun.chen@amd.com
Subject: Re: [PATCH v4] drm/amdkfd: Fix the warning of array-index-out-of-bounds
Date: Wed, 2 Nov 2022 11:16:30 +0800 [thread overview]
Message-ID: <17af9fcd-8b3c-8e86-9640-69b39bd2b707@amd.com> (raw)
In-Reply-To: <99d64803-565a-e85a-c4a2-5b6ce0f197ed@amd.com>
Hi Felix,
On 11/2/2022 3:38 AM, Felix Kuehling wrote:
>
> On 2022-11-01 04:52, Ma Jun wrote:
>> 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.
>>
>> v4:
>> - Fix the bug when get cache info
>> v3:
>> - Drop processor id calc function
>> v2:
>> - Remove unnecessary sys interface "cache_ext"
>>
>> Signed-off-by: Ma Jun <Jun.Ma2@amd.com>
>
> One more small comment inline. With that fixed, the patch is
>
> Reviewed-by: Felix Kuehling <Felix.Kuehling@amd.com>
>
Thanks for review. I will fix it when push.
Regards,
Ma Jun
>> ---
>> drivers/gpu/drm/amd/amdkfd/kfd_crat.c | 312 +++-------------------
>> drivers/gpu/drm/amd/amdkfd/kfd_crat.h | 12 +
>> drivers/gpu/drm/amd/amdkfd/kfd_topology.c | 245 ++++++++++++++++-
>> drivers/gpu/drm/amd/amdkfd/kfd_topology.h | 5 +-
>> 4 files changed, 282 insertions(+), 292 deletions(-)
>>
>> diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_crat.c b/drivers/gpu/drm/amd/amdkfd/kfd_crat.c
>> index 3c7f0d49da59..f4a9d0e49072 100644
>> --- a/drivers/gpu/drm/amd/amdkfd/kfd_crat.c
>> +++ b/drivers/gpu/drm/amd/amdkfd/kfd_crat.c
> [snip]
>>
>> -/* kfd_fill_gpu_cache_info - Fill GPU cache info using kfd_gpu_cache_info
>> - * tables
>> - *
>> - * @kdev - [IN] GPU device
>> - * @gpu_processor_id - [IN] GPU processor ID to which these caches
>> - * associate
>> - * @available_size - [IN] Amount of memory available in pcache
>> - * @cu_info - [IN] Compute Unit info obtained from KGD
>> - * @pcache - [OUT] memory into which cache data is to be filled in.
>> - * @size_filled - [OUT] amount of data used up in pcache.
>> - * @num_of_entries - [OUT] number of caches added
>> - */
>> -static int kfd_fill_gpu_cache_info(struct kfd_dev *kdev,
>> - int gpu_processor_id,
>> - int available_size,
>> - struct kfd_cu_info *cu_info,
>> - struct crat_subtype_cache *pcache,
>> - int *size_filled,
>> - int *num_of_entries)
>> +int get_gpu_cache_info(struct kfd_dev *kdev, struct kfd_gpu_cache_info **pcache_info)
>
> This function name should have a kfd_ prefix.
>
> Regards,
> Felix
>
>
prev parent reply other threads:[~2022-11-02 3:16 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-11-01 8:52 [PATCH v4] drm/amdkfd: Fix the warning of array-index-out-of-bounds Ma Jun
2022-11-01 19:38 ` Felix Kuehling
2022-11-02 3:16 ` Ma, Jun [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=17af9fcd-8b3c-8e86-9640-69b39bd2b707@amd.com \
--to=majun@amd.com \
--cc=Jun.Ma2@amd.com \
--cc=alexander.deucher@amd.com \
--cc=amd-gfx@lists.freedesktop.org \
--cc=felix.kuehling@amd.com \
--cc=guchun.chen@amd.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox