drm/amdkfd: fix profiler ioctl command number
PATCH 1/2 drm/amdkfd: fix profiler ioctl command number
Move AMDKFD_IOC_PROFILER from the secondary ioctl range to the primary upstream range at 0x28 and bump AMDKFD_COMMAND_END to 0x29.
--- include/uapi/linux/kfd_ioctl.h | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-)
include/uapi/linux/kfd_ioctl.h +3 -6
@@ -1711,13 +1711,10 @@ struct kfd_ioctl_profiler_args {#define AMDKFD_IOC_CREATE_PROCESS \ AMDKFD_IO(0x27) -#define AMDKFD_COMMAND_START 0x01 -#define AMDKFD_COMMAND_END 0x28 -#define AMDKFD_IOC_PROFILER \ - AMDKFD_IOWR(0x86, struct kfd_ioctl_profiler_args) + AMDKFD_IOWR(0x28, struct kfd_ioctl_profiler_args) -#define AMDKFD_COMMAND_START_2 0x80 -#define AMDKFD_COMMAND_END_2 0x87 +#define AMDKFD_COMMAND_START 0x01 +#define AMDKFD_COMMAND_END 0x29#endif
Signature · 1 line
2.34.1
PATCH 2/2 drm/amdkfd: bump KFD ioctl minor version to 1.23
Bump KFD_IOCTL_MINOR_VERSION from 22 to 23 and document version 1.23 in kfd_ioctl.h so userspace can detect profiler ioctl support.
--- include/uapi/linux/kfd_ioctl.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
include/uapi/linux/kfd_ioctl.h +2 -1
@@ -48,9 +48,10 @@* - 1.20 - Trap handler support for expert scheduling mode available * - 1.21 - Debugger support to subscribe to LDS out-of-address exceptions * - 1.22 - Add queue creation with metadata ring base address +* - 1.23 - Add profiler control ioctl to enable/disable profiler on a process */ #define KFD_IOCTL_MAJOR_VERSION 1 -#define KFD_IOCTL_MINOR_VERSION 22 +#define KFD_IOCTL_MINOR_VERSION 23struct kfd_ioctl_get_version_args {__u32 major_version;/* from KFD */
Signature · 1 line
2.34.1
Re: [PATCH 2/2] drm/amdkfd: bump KFD ioctl minor version to 1.23
Series is:
Quoted 29 lines · Perry Yuan
Bump
KFD_IOCTL_MINOR_VERSIONfrom 22 to 23 and document version 1.23 inkfd_ioctl.hso userspace can detect profiler ioctl support.Signed-off-by Perry Yuan <[email protected]>Suggested-by Alex Deucher <[email protected]>--- include/uapi/linux/kfd_ioctl.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)include/uapi/linux/kfd_ioctl.h +2
-2@@ -48,9 +48,10 @@* - 1.20 - Trap handler support for expert scheduling mode available * - 1.21 - Debugger support to subscribe to LDS out-of-address exceptions * - 1.22 - Add queue creation with metadata ring base address +* - 1.23 - Add profiler control ioctl to enable/disable profiler on a process */ #define KFD_IOCTL_MAJOR_VERSION 1 -#define KFD_IOCTL_MINOR_VERSION 22 +#define KFD_IOCTL_MINOR_VERSION 23struct kfd_ioctl_get_version_args {__u32 major_version;/* from KFD */ --2.34.1
[AMD Official Use Only - AMD Internal Distribution Only]
Not sure if something git got messed up here, but it looks like you're removing
include/uapi/linux/kfd_ioctl.h struct kfd_ioctl_profiler_args { · line 1721
Quoted 2 lines
include/uapi/linux/kfd_ioctl.h +0
-2-#define AMDKFD_COMMAND_START_2 0x80 -#define AMDKFD_COMMAND_END_2 0x87
Kent
Quoted 42 lines
-----Original Message-----
From: amd-gfx <[email protected]> On Behalf Of Perry Yuan
Sent: Thursday, April 16, 2026 12:50 AM
To: Deucher, Alexander <[email protected]>; amd- [email protected]
Subject: [PATCH 1/2] drm/amdkfd: fix profiler ioctl command numberMove
AMDKFD_IOC_PROFILERfrom the secondary ioctl range to the primary upstream range at0x28and bumpAMDKFD_COMMAND_ENDto0x29.Fixes 4abe9fd1e763 ("Add kfd_ioctl_profiler to contain profiler kernel driverchanges")
Signed-off-by Perry Yuan <[email protected]>Suggested-by Alex Deucher <[email protected]>--- include/uapi/linux/kfd_ioctl.h | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-)include/uapi/linux/kfd_ioctl.h +3
-7@@ -1711,13 +1711,10 @@ struct kfd_ioctl_profiler_args {#define AMDKFD_IOC_CREATE_PROCESS \ AMDKFD_IO(0x27) -#define AMDKFD_COMMAND_START 0x01 -#define AMDKFD_COMMAND_END 0x28 -#define AMDKFD_IOC_PROFILER \ - AMDKFD_IOWR(0x86, struct kfd_ioctl_profiler_args) + AMDKFD_IOWR(0x28, struct kfd_ioctl_profiler_args) -#define AMDKFD_COMMAND_START_2 0x80 -#define AMDKFD_COMMAND_END_2 0x87 +#define AMDKFD_COMMAND_START 0x01 +#define AMDKFD_COMMAND_END 0x29#endif --2.34.1
Quoted 6 lines · Kent
[AMD Official Use Only - AMD Internal Distribution Only]
Not sure if something git got messed up here, but it looks like you're removing
include/uapi/linux/kfd_ioctl.h struct kfd_ioctl_profiler_args { · line 1721
Quoted 2 lines
include/uapi/linux/kfd_ioctl.h +0
-2-#define AMDKFD_COMMAND_START_2 0x80 -#define AMDKFD_COMMAND_END_2 0x87
That's on purpose. Those were not supposed to be here to begin with.
Alex
Quoted 46 lines
Kent
Quoted 42 lines
-----Original Message-----
From: amd-gfx <[email protected]> On Behalf Of Perry Yuan
Sent: Thursday, April 16, 2026 12:50 AM
To: Deucher, Alexander <[email protected]>; amd- [email protected]
Subject: [PATCH 1/2] drm/amdkfd: fix profiler ioctl command numberMove
AMDKFD_IOC_PROFILERfrom the secondary ioctl range to the primary upstream range at0x28and bumpAMDKFD_COMMAND_ENDto0x29.Fixes 4abe9fd1e763 ("Add kfd_ioctl_profiler to contain profiler kernel driverchanges")
Signed-off-by Perry Yuan <[email protected]>Suggested-by Alex Deucher <[email protected]>--- include/uapi/linux/kfd_ioctl.h | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-)include/uapi/linux/kfd_ioctl.h +3
-7@@ -1711,13 +1711,10 @@ struct kfd_ioctl_profiler_args {#define AMDKFD_IOC_CREATE_PROCESS \ AMDKFD_IO(0x27) -#define AMDKFD_COMMAND_START 0x01 -#define AMDKFD_COMMAND_END 0x28 -#define AMDKFD_IOC_PROFILER \ - AMDKFD_IOWR(0x86, struct kfd_ioctl_profiler_args) + AMDKFD_IOWR(0x28, struct kfd_ioctl_profiler_args) -#define AMDKFD_COMMAND_START_2 0x80 -#define AMDKFD_COMMAND_END_2 0x87 +#define AMDKFD_COMMAND_START 0x01 +#define AMDKFD_COMMAND_END 0x29#endif --2.34.1
[Public]
Ah perfect, thanks for clarifying. Then yeah we're all good.
Kent
Quoted 67 lines
-----Original Message-----
From: Alex Deucher <[email protected]>
Sent: Thursday, April 16, 2026 9:35 AM
To: Russell, Kent <[email protected]>
Cc: Yuan, Perry <[email protected]>; Deucher, Alexander <[email protected]>; [email protected]
Subject: Re: [PATCH 1/2] drm/amdkfd: fix profiler ioctl command numberQuoted 6 lines · Kent
[AMD Official Use Only - AMD Internal Distribution Only]
Not sure if something git got messed up here, but it looks like you're removing
include/uapi/linux/kfd_ioctl.h struct kfd_ioctl_profiler_args { · line 1721
Quoted 2 lines
include/uapi/linux/kfd_ioctl.h +0
-2-#define AMDKFD_COMMAND_START_2 0x80 -#define AMDKFD_COMMAND_END_2 0x87That's on purpose. Those were not supposed to be here to begin with.
Alex
Quoted 5 lines
Kent
Quoted 2 lines
-----Original Message-----
From: amd-gfx <[email protected]> On Behalf Of PerryYuan
Quoted 41 lines
Quoted 40 lines
Sent: Thursday, April 16, 2026 12:50 AM
To: Deucher, Alexander <[email protected]>; amd- [email protected]
Subject: [PATCH 1/2] drm/amdkfd: fix profiler ioctl command numberMove
AMDKFD_IOC_PROFILERfrom the secondary ioctl range to the primary upstream range at0x28and bumpAMDKFD_COMMAND_ENDto0x29.Fixes 4abe9fd1e763 ("Add kfd_ioctl_profiler to contain profiler kernel driverchanges")
Signed-off-by Perry Yuan <[email protected]>Suggested-by Alex Deucher <[email protected]>--- include/uapi/linux/kfd_ioctl.h | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-)include/uapi/linux/kfd_ioctl.h +3
-7@@ -1711,13 +1711,10 @@ struct kfd_ioctl_profiler_args {#define AMDKFD_IOC_CREATE_PROCESS \ AMDKFD_IO(0x27) -#define AMDKFD_COMMAND_START 0x01 -#define AMDKFD_COMMAND_END 0x28 -#define AMDKFD_IOC_PROFILER \ - AMDKFD_IOWR(0x86, struct kfd_ioctl_profiler_args) + AMDKFD_IOWR(0x28, struct kfd_ioctl_profiler_args) -#define AMDKFD_COMMAND_START_2 0x80 -#define AMDKFD_COMMAND_END_2 0x87 +#define AMDKFD_COMMAND_START 0x01 +#define AMDKFD_COMMAND_END 0x29#endif --2.34.1