[PATCH] drm/amdkfd: Align unique_id format to match amdgpu

Kent Russell kent.russell at amd.com
Thu Sep 14 17:09:06 UTC 2023


unique_id is printed as %016llx in amdgpu, but %llu in KFD. Call the
sysfs_show_gen_prop function directly and use the %016llx format, to
align with amdgpu. Don't need to add a new macro since this is a one-off.

Signed-off-by: Kent Russell <kent.russell at amd.com>
---
 drivers/gpu/drm/amd/amdkfd/kfd_topology.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_topology.c b/drivers/gpu/drm/amd/amdkfd/kfd_topology.c
index c8c75ff7cea8..4dac29cdab20 100644
--- a/drivers/gpu/drm/amd/amdkfd/kfd_topology.c
+++ b/drivers/gpu/drm/amd/amdkfd/kfd_topology.c
@@ -538,7 +538,7 @@ static ssize_t node_show(struct kobject *kobj, struct attribute *attr,
 				      dev->node_props.debug_prop);
 		sysfs_show_32bit_prop(buffer, offs, "sdma_fw_version",
 				      dev->gpu->kfd->sdma_fw_version);
-		sysfs_show_64bit_prop(buffer, offs, "unique_id",
+		sysfs_show_gen_prop(buffer, offs, "%s %016llx\n", "unique_id",
 				      dev->gpu->adev->unique_id);
 		sysfs_show_32bit_prop(buffer, offs, "num_xcc",
 				      NUM_XCC(dev->gpu->xcc_mask));
-- 
2.34.1



More information about the amd-gfx mailing list