From: "Kuehling, Felix" <felix.kuehling@amd.com>
To: Zhu Lingshan <lingshan.zhu@amd.com>, alexander.deucher@amd.com
Cc: ray.huang@amd.com, amd-gfx@lists.freedesktop.org
Subject: Re: [PATCH] amdkfd: remove pasid under kfd sysfs folders
Date: Fri, 31 Oct 2025 16:56:37 -0400 [thread overview]
Message-ID: <c227267c-9daa-4587-834e-b44747d1331f@amd.com> (raw)
In-Reply-To: <20251031033228.2230-1-lingshan.zhu@amd.com>
On 2025-10-30 23:32, Zhu Lingshan wrote:
> This commit removes pasid under kfd sysfs folders
> because pasid should only be used in kernel internally,
> should not be exposed to user space, and current
> pasid under kfd sysfs is buggy hard-coded 0.
NAK. We left this file with a dummy value deliberately, to prevent
breaking existing ROCm SMI versions. We can never remove this as long as
such versions of ROCm SMI may be in circulation.
Regards,
Felix
>
> Signed-off-by: Zhu Lingshan <lingshan.zhu@amd.com>
> ---
> drivers/gpu/drm/amd/amdkfd/kfd_priv.h | 7 -------
> drivers/gpu/drm/amd/amdkfd/kfd_process.c | 8 +-------
> 2 files changed, 1 insertion(+), 14 deletions(-)
>
> diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_priv.h b/drivers/gpu/drm/amd/amdkfd/kfd_priv.h
> index 70ef051511bb..d69079cab1e6 100644
> --- a/drivers/gpu/drm/amd/amdkfd/kfd_priv.h
> +++ b/drivers/gpu/drm/amd/amdkfd/kfd_priv.h
> @@ -983,7 +983,6 @@ struct kfd_process {
> /* Kobj for our procfs */
> struct kobject *kobj;
> struct kobject *kobj_queues;
> - struct attribute attr_pasid;
>
> /* Keep track cwsr init */
> bool has_cwsr;
> @@ -1100,12 +1099,6 @@ void kfd_process_device_remove_obj_handle(struct kfd_process_device *pdd,
> int handle);
> struct kfd_process *kfd_lookup_process_by_pid(struct pid *pid);
>
> -/* PASIDs */
> -int kfd_pasid_init(void);
> -void kfd_pasid_exit(void);
> -u32 kfd_pasid_alloc(void);
> -void kfd_pasid_free(u32 pasid);
> -
> /* Doorbells */
> size_t kfd_doorbell_process_slice(struct kfd_dev *kfd);
> int kfd_doorbell_init(struct kfd_dev *kfd);
> diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_process.c b/drivers/gpu/drm/amd/amdkfd/kfd_process.c
> index ddfe30c13e9d..f45780502f06 100644
> --- a/drivers/gpu/drm/amd/amdkfd/kfd_process.c
> +++ b/drivers/gpu/drm/amd/amdkfd/kfd_process.c
> @@ -328,9 +328,7 @@ static int kfd_get_cu_occupancy(struct attribute *attr, char *buffer)
> static ssize_t kfd_procfs_show(struct kobject *kobj, struct attribute *attr,
> char *buffer)
> {
> - if (strcmp(attr->name, "pasid") == 0)
> - return snprintf(buffer, PAGE_SIZE, "%d\n", 0);
> - else if (strncmp(attr->name, "vram_", 5) == 0) {
> + if (strncmp(attr->name, "vram_", 5) == 0) {
> struct kfd_process_device *pdd = container_of(attr, struct kfd_process_device,
> attr_vram);
> return snprintf(buffer, PAGE_SIZE, "%llu\n", atomic64_read(&pdd->vram_usage));
> @@ -888,9 +886,6 @@ struct kfd_process *kfd_create_process(struct task_struct *thread)
> goto out;
> }
>
> - kfd_sysfs_create_file(process->kobj, &process->attr_pasid,
> - "pasid");
> -
> process->kobj_queues = kobject_create_and_add("queues",
> process->kobj);
> if (!process->kobj_queues)
> @@ -1104,7 +1099,6 @@ static void kfd_process_remove_sysfs(struct kfd_process *p)
> if (!p->kobj)
> return;
>
> - sysfs_remove_file(p->kobj, &p->attr_pasid);
> kobject_del(p->kobj_queues);
> kobject_put(p->kobj_queues);
> p->kobj_queues = NULL;
next prev parent reply other threads:[~2025-10-31 20:56 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-10-31 3:32 [PATCH] amdkfd: remove pasid under kfd sysfs folders Zhu Lingshan
2025-10-31 20:56 ` Kuehling, Felix [this message]
2025-11-03 3:04 ` Zhu, Lingshan
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=c227267c-9daa-4587-834e-b44747d1331f@amd.com \
--to=felix.kuehling@amd.com \
--cc=alexander.deucher@amd.com \
--cc=amd-gfx@lists.freedesktop.org \
--cc=lingshan.zhu@amd.com \
--cc=ray.huang@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