]> git.hungrycats.org Git - linux/commit
drm/amdkfd: expose pasid of secondary contexts by debugfs
authorZhu Lingshan <lingshan.zhu@amd.com>
Wed, 1 Jul 2026 03:03:09 +0000 (11:03 +0800)
committerAlex Deucher <alexander.deucher@amd.com>
Wed, 8 Jul 2026 18:27:08 +0000 (14:27 -0400)
commit325de6bf3328efd5acf5072337fc196928753de8
tree182462a2346e28251e1ce8142febc389fc69edbf
parentc936b8126b444401318fcbeb1828488cc5312dee
drm/amdkfd: expose pasid of secondary contexts by debugfs

Current kfd debugfs interfaces only expose pasid
of the primary process, this commit exposes
pasid of secondary contexts by debugfs

Just like entries under sysfs,
the secondary contexts are named as
context_<id> under its primary kfd process.

The layout:
/sys/kernel/debug/kfd/proc# tree
.
└── 5802
    ├── context_0
    │   ├── pasid_1025
    │   └── pasid_63266
    ├── context_1
    │   ├── pasid_1025
    │   └── pasid_63266
    ├── pasid_1025
    └── pasid_63266

Another fix is, kfd_debugfs_add_process may fail,
this commit change it to return a meaningful
value other than void

Signed-off-by: Zhu Lingshan <lingshan.zhu@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_chardev.c
drivers/gpu/drm/amd/amdkfd/kfd_debugfs.c
drivers/gpu/drm/amd/amdkfd/kfd_priv.h
drivers/gpu/drm/amd/amdkfd/kfd_process.c