From: Felix Kuehling <felix.kuehling@amd.com>
To: Harish Kasiviswanathan <Harish.Kasiviswanathan@amd.com>,
amd-gfx@lists.freedesktop.org
Subject: Re: [PATCH 1/2] drm/amdkfd: Use dev_error intead of pr_error
Date: Wed, 1 May 2024 23:51:06 -0400 [thread overview]
Message-ID: <15d0dc2d-94f3-48f7-8162-f37b44001754@amd.com> (raw)
In-Reply-To: <20240502010804.125461-1-Harish.Kasiviswanathan@amd.com>
On 2024-05-01 21:08, Harish Kasiviswanathan wrote:
> No functional change. This will help in moving gpu_id creation to next
> step while still being able to identify the correct GPU
>
> Signed-off-by: Harish Kasiviswanathan <Harish.Kasiviswanathan@amd.com>
Reviewed-by: Felix Kuehling <felix.kuehling@amd.com>
> ---
> drivers/gpu/drm/amd/amdkfd/kfd_topology.c | 19 ++++++++-----------
> 1 file changed, 8 insertions(+), 11 deletions(-)
>
> diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_topology.c b/drivers/gpu/drm/amd/amdkfd/kfd_topology.c
> index ba326b43bec5..b93913934b03 100644
> --- a/drivers/gpu/drm/amd/amdkfd/kfd_topology.c
> +++ b/drivers/gpu/drm/amd/amdkfd/kfd_topology.c
> @@ -1773,7 +1773,7 @@ static void kfd_fill_cache_non_crat_info(struct kfd_topology_device *dev, struct
> pr_debug("Added [%d] GPU cache entries\n", num_of_entries);
> }
>
> -static int kfd_topology_add_device_locked(struct kfd_node *gpu, uint32_t gpu_id,
> +static int kfd_topology_add_device_locked(struct kfd_node *gpu,
> struct kfd_topology_device **dev)
> {
> int proximity_domain = ++topology_crat_proximity_domain;
> @@ -1786,8 +1786,7 @@ static int kfd_topology_add_device_locked(struct kfd_node *gpu, uint32_t gpu_id,
> COMPUTE_UNIT_GPU, gpu,
> proximity_domain);
> if (res) {
> - pr_err("Error creating VCRAT for GPU (ID: 0x%x)\n",
> - gpu_id);
> + dev_err(gpu->adev->dev, "Error creating VCRAT\n");
> topology_crat_proximity_domain--;
> goto err;
> }
> @@ -1798,8 +1797,7 @@ static int kfd_topology_add_device_locked(struct kfd_node *gpu, uint32_t gpu_id,
> &temp_topology_device_list,
> proximity_domain);
> if (res) {
> - pr_err("Error parsing VCRAT for GPU (ID: 0x%x)\n",
> - gpu_id);
> + dev_err(gpu->adev->dev, "Error parsing VCRAT\n");
> topology_crat_proximity_domain--;
> goto err;
> }
> @@ -1825,8 +1823,8 @@ static int kfd_topology_add_device_locked(struct kfd_node *gpu, uint32_t gpu_id,
> if (!res)
> sys_props.generation_count++;
> else
> - pr_err("Failed to update GPU (ID: 0x%x) to sysfs topology. res=%d\n",
> - gpu_id, res);
> + dev_err(gpu->adev->dev, "Failed to update GPU to sysfs topology. res=%d\n",
> + res);
>
> err:
> kfd_destroy_crat_image(crat_image);
> @@ -1951,11 +1949,10 @@ int kfd_topology_add_device(struct kfd_node *gpu)
> gpu_id = kfd_generate_gpu_id(gpu);
> if (gpu->xcp && !gpu->xcp->ddev) {
> dev_warn(gpu->adev->dev,
> - "Won't add GPU (ID: 0x%x) to topology since it has no drm node assigned.",
> - gpu_id);
> + "Won't add GPU to topology since it has no drm node assigned.");
> return 0;
> } else {
> - pr_debug("Adding new GPU (ID: 0x%x) to topology\n", gpu_id);
> + dev_dbg(gpu->adev->dev, "Adding new GPU to topology\n");
> }
>
> /* Check to see if this gpu device exists in the topology_device_list.
> @@ -1967,7 +1964,7 @@ int kfd_topology_add_device(struct kfd_node *gpu)
> down_write(&topology_lock);
> dev = kfd_assign_gpu(gpu);
> if (!dev)
> - res = kfd_topology_add_device_locked(gpu, gpu_id, &dev);
> + res = kfd_topology_add_device_locked(gpu, &dev);
> up_write(&topology_lock);
> if (res)
> return res;
prev parent reply other threads:[~2024-05-02 3:51 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-05-02 1:08 [PATCH 1/2] drm/amdkfd: Use dev_error intead of pr_error Harish Kasiviswanathan
2024-05-02 1:08 ` [PATCH 2/2] drm/amdkfd: Improve chances of unique gpu_id Harish Kasiviswanathan
2024-05-02 3:47 ` Felix Kuehling
2024-05-02 3:51 ` Felix Kuehling [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=15d0dc2d-94f3-48f7-8162-f37b44001754@amd.com \
--to=felix.kuehling@amd.com \
--cc=Harish.Kasiviswanathan@amd.com \
--cc=amd-gfx@lists.freedesktop.org \
/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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).