History

drm/amdkfd: Add support for user-mode trap handlers

A second-level user mode trap handler can be installed. The CWSR trap handler jumps to the secondary trap handler conditionally for any conditions not handled by it. This can be used e.g. for debugging or catching math exceptions. When CWSR is disabled, the user mode trap handler is installed as first level trap handler.

Felix Kuehling committed 9 years ago

Commit d7b9bd21 parent 373d7084 files · +74 −2Browse files

Showing the changes to include/uapi/linux (1 of 4 files). Show all

Unified · Split

include/uapi/linux/kfd_ioctl.h+11−1
@@ -262,6 +262,13 @@ struct kfd_ioctl_get_tile_config_args { · 261 unmodified lines
262262 */
263263 };
264264
265+struct kfd_ioctl_set_trap_handler_args {
266+ uint64_t tba_addr; /* to KFD */
267+ uint64_t tma_addr; /* to KFD */
268+ uint32_t gpu_id; /* to KFD */
269+ uint32_t pad;
270+};
271+
265272 #define AMDKFD_IOCTL_BASE 'K'
266273 #define AMDKFD_IO(nr) _IO(AMDKFD_IOCTL_BASE, nr)
267274 #define AMDKFD_IOR(nr, type) _IOR(AMDKFD_IOCTL_BASE, nr, type)
@@ -322,7 +329,10 @@ struct kfd_ioctl_get_tile_config_args { · 54 unmodified lines
322329 #define AMDKFD_IOC_GET_TILE_CONFIG \
323330 AMDKFD_IOWR(0x12, struct kfd_ioctl_get_tile_config_args)
324331
332+#define AMDKFD_IOC_SET_TRAP_HANDLER \
333+ AMDKFD_IOW(0x13, struct kfd_ioctl_set_trap_handler_args)
334+
325335 #define AMDKFD_COMMAND_START 0x01
326−#define AMDKFD_COMMAND_END 0x13
336+#define AMDKFD_COMMAND_END 0x14
327337
328338 #endif

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t