some trivial amdkfd cleanups * tag 'drm-amdkfd-next-2017-09-02' of git://people.freedesktop.org/~gabbayo/linux: drm/amdkfd: pass queue's mqd when destroying mqd drm/amdkfd: remove memset before memcpy uapi linux/kfd_ioctl.h: only use __u32 and __u64
Showing the changes to include/uapi/linux (1 of 3 files). Show all
Unified · Split
| @@ -23,15 +23,15 @@ · 22 unmodified lines | ||
| 23 | 23 | #ifndef KFD_IOCTL_H_INCLUDED |
| 24 | 24 | #define KFD_IOCTL_H_INCLUDED |
| 25 | 25 | |
| 26 | −#include <linux/types.h> | |
| 26 | +#include <drm/drm.h> | |
| 27 | 27 | #include <linux/ioctl.h> |
| 28 | 28 | |
| 29 | 29 | #define KFD_IOCTL_MAJOR_VERSION 1 |
| 30 | 30 | #define KFD_IOCTL_MINOR_VERSION 1 |
| 31 | 31 | |
| 32 | 32 | struct kfd_ioctl_get_version_args { |
| 33 | − uint32_t major_version; /* from KFD */ | |
| 34 | − uint32_t minor_version; /* from KFD */ | |
| 33 | + __u32 major_version; /* from KFD */ | |
| 34 | + __u32 minor_version; /* from KFD */ | |
| 35 | 35 | }; |
| 36 | 36 | |
| 37 | 37 | /* For kfd_ioctl_create_queue_args.queue_type. */ |
| @@ -43,36 +43,36 @@ struct kfd_ioctl_get_version_args { · 5 unmodified lines | ||
| 43 | 43 | #define KFD_MAX_QUEUE_PRIORITY 15 |
| 44 | 44 | |
| 45 | 45 | struct kfd_ioctl_create_queue_args { |
| 46 | − uint64_t ring_base_address; /* to KFD */ | |
| 47 | − uint64_t write_pointer_address; /* from KFD */ | |
| 48 | − uint64_t read_pointer_address; /* from KFD */ | |
| 49 | − uint64_t doorbell_offset; /* from KFD */ | |
| 50 | − | |
| 51 | − uint32_t ring_size; /* to KFD */ | |
| 52 | − uint32_t gpu_id; /* to KFD */ | |
| 53 | − uint32_t queue_type; /* to KFD */ | |
| 54 | − uint32_t queue_percentage; /* to KFD */ | |
| 55 | − uint32_t queue_priority; /* to KFD */ | |
| 56 | − uint32_t queue_id; /* from KFD */ | |
| 57 | − | |
| 58 | − uint64_t eop_buffer_address; /* to KFD */ | |
| 59 | − uint64_t eop_buffer_size; /* to KFD */ | |
| 60 | − uint64_t ctx_save_restore_address; /* to KFD */ | |
| 61 | − uint64_t ctx_save_restore_size; /* to KFD */ | |
| 46 | + __u64 ring_base_address; /* to KFD */ | |
| 47 | + __u64 write_pointer_address; /* from KFD */ | |
| 48 | + __u64 read_pointer_address; /* from KFD */ | |
| 49 | + __u64 doorbell_offset; /* from KFD */ | |
| 50 | + | |
| 51 | + __u32 ring_size; /* to KFD */ | |
| 52 | + __u32 gpu_id; /* to KFD */ | |
| 53 | + __u32 queue_type; /* to KFD */ | |
| 54 | + __u32 queue_percentage; /* to KFD */ | |
| 55 | + __u32 queue_priority; /* to KFD */ | |
| 56 | + __u32 queue_id; /* from KFD */ | |
| 57 | + | |
| 58 | + __u64 eop_buffer_address; /* to KFD */ | |
| 59 | + __u64 eop_buffer_size; /* to KFD */ | |
| 60 | + __u64 ctx_save_restore_address; /* to KFD */ | |
| 61 | + __u64 ctx_save_restore_size; /* to KFD */ | |
| 62 | 62 | }; |
| 63 | 63 | |
| 64 | 64 | struct kfd_ioctl_destroy_queue_args { |
| 65 | − uint32_t queue_id; /* to KFD */ | |
| 66 | − uint32_t pad; | |
| 65 | + __u32 queue_id; /* to KFD */ | |
| 66 | + __u32 pad; | |
| 67 | 67 | }; |
| 68 | 68 | |
| 69 | 69 | struct kfd_ioctl_update_queue_args { |
| 70 | − uint64_t ring_base_address; /* to KFD */ | |
| 70 | + __u64 ring_base_address; /* to KFD */ | |
| 71 | 71 | |
| 72 | − uint32_t queue_id; /* to KFD */ | |
| 73 | − uint32_t ring_size; /* to KFD */ | |
| 74 | − uint32_t queue_percentage; /* to KFD */ | |
| 75 | − uint32_t queue_priority; /* to KFD */ | |
| 72 | + __u32 queue_id; /* to KFD */ | |
| 73 | + __u32 ring_size; /* to KFD */ | |
| 74 | + __u32 queue_percentage; /* to KFD */ | |
| 75 | + __u32 queue_priority; /* to KFD */ | |
| 76 | 76 | }; |
| 77 | 77 | |
| 78 | 78 | /* For kfd_ioctl_set_memory_policy_args.default_policy and alternate_policy */ |
| @@ -80,13 +80,13 @@ struct kfd_ioctl_update_queue_args { · 1 unmodified line | ||
| 80 | 80 | #define KFD_IOC_CACHE_POLICY_NONCOHERENT 1 |
| 81 | 81 | |
| 82 | 82 | struct kfd_ioctl_set_memory_policy_args { |
| 83 | − uint64_t alternate_aperture_base; /* to KFD */ | |
| 84 | − uint64_t alternate_aperture_size; /* to KFD */ | |
| 83 | + __u64 alternate_aperture_base; /* to KFD */ | |
| 84 | + __u64 alternate_aperture_size; /* to KFD */ | |
| 85 | 85 | |
| 86 | − uint32_t gpu_id; /* to KFD */ | |
| 87 | − uint32_t default_policy; /* to KFD */ | |
| 88 | − uint32_t alternate_policy; /* to KFD */ | |
| 89 | − uint32_t pad; | |
| 86 | + __u32 gpu_id; /* to KFD */ | |
| 87 | + __u32 default_policy; /* to KFD */ | |
| 88 | + __u32 alternate_policy; /* to KFD */ | |
| 89 | + __u32 pad; | |
| 90 | 90 | }; |
| 91 | 91 | |
| 92 | 92 | /* |
| @@ -97,26 +97,26 @@ struct kfd_ioctl_set_memory_policy_args { · 4 unmodified lines | ||
| 97 | 97 | */ |
| 98 | 98 | |
| 99 | 99 | struct kfd_ioctl_get_clock_counters_args { |
| 100 | − uint64_t gpu_clock_counter; /* from KFD */ | |
| 101 | − uint64_t cpu_clock_counter; /* from KFD */ | |
| 102 | − uint64_t system_clock_counter; /* from KFD */ | |
| 103 | − uint64_t system_clock_freq; /* from KFD */ | |
| 100 | + __u64 gpu_clock_counter; /* from KFD */ | |
| 101 | + __u64 cpu_clock_counter; /* from KFD */ | |
| 102 | + __u64 system_clock_counter; /* from KFD */ | |
| 103 | + __u64 system_clock_freq; /* from KFD */ | |
| 104 | 104 | |
| 105 | − uint32_t gpu_id; /* to KFD */ | |
| 106 | − uint32_t pad; | |
| 105 | + __u32 gpu_id; /* to KFD */ | |
| 106 | + __u32 pad; | |
| 107 | 107 | }; |
| 108 | 108 | |
| 109 | 109 | #define NUM_OF_SUPPORTED_GPUS 7 |
| 110 | 110 | |
| 111 | 111 | struct kfd_process_device_apertures { |
| 112 | − uint64_t lds_base; /* from KFD */ | |
| 113 | − uint64_t lds_limit; /* from KFD */ | |
| 114 | − uint64_t scratch_base; /* from KFD */ | |
| 115 | − uint64_t scratch_limit; /* from KFD */ | |
| 116 | − uint64_t gpuvm_base; /* from KFD */ | |
| 117 | − uint64_t gpuvm_limit; /* from KFD */ | |
| 118 | − uint32_t gpu_id; /* from KFD */ | |
| 119 | − uint32_t pad; | |
| 112 | + __u64 lds_base; /* from KFD */ | |
| 113 | + __u64 lds_limit; /* from KFD */ | |
| 114 | + __u64 scratch_base; /* from KFD */ | |
| 115 | + __u64 scratch_limit; /* from KFD */ | |
| 116 | + __u64 gpuvm_base; /* from KFD */ | |
| 117 | + __u64 gpuvm_limit; /* from KFD */ | |
| 118 | + __u32 gpu_id; /* from KFD */ | |
| 119 | + __u32 pad; | |
| 120 | 120 | }; |
| 121 | 121 | |
| 122 | 122 | struct kfd_ioctl_get_process_apertures_args { |
| @@ -124,8 +124,8 @@ struct kfd_ioctl_get_process_apertures_args { · 1 unmodified line | ||
| 124 | 124 | process_apertures[NUM_OF_SUPPORTED_GPUS];/* from KFD */ |
| 125 | 125 | |
| 126 | 126 | /* from KFD, should be in the range [1 - NUM_OF_SUPPORTED_GPUS] */ |
| 127 | − uint32_t num_of_nodes; | |
| 128 | − uint32_t pad; | |
| 127 | + __u32 num_of_nodes; | |
| 128 | + __u32 pad; | |
| 129 | 129 | }; |
| 130 | 130 | |
| 131 | 131 | #define MAX_ALLOWED_NUM_POINTS 100 |
| @@ -133,25 +133,25 @@ struct kfd_ioctl_get_process_apertures_args { · 1 unmodified line | ||
| 133 | 133 | #define MAX_ALLOWED_WAC_BUFF_SIZE 128 |
| 134 | 134 | |
| 135 | 135 | struct kfd_ioctl_dbg_register_args { |
| 136 | − uint32_t gpu_id; /* to KFD */ | |
| 137 | − uint32_t pad; | |
| 136 | + __u32 gpu_id; /* to KFD */ | |
| 137 | + __u32 pad; | |
| 138 | 138 | }; |
| 139 | 139 | |
| 140 | 140 | struct kfd_ioctl_dbg_unregister_args { |
| 141 | − uint32_t gpu_id; /* to KFD */ | |
| 142 | − uint32_t pad; | |
| 141 | + __u32 gpu_id; /* to KFD */ | |
| 142 | + __u32 pad; | |
| 143 | 143 | }; |
| 144 | 144 | |
| 145 | 145 | struct kfd_ioctl_dbg_address_watch_args { |
| 146 | − uint64_t content_ptr; /* a pointer to the actual content */ | |
| 147 | − uint32_t gpu_id; /* to KFD */ | |
| 148 | − uint32_t buf_size_in_bytes; /*including gpu_id and buf_size */ | |
| 146 | + __u64 content_ptr; /* a pointer to the actual content */ | |
| 147 | + __u32 gpu_id; /* to KFD */ | |
| 148 | + __u32 buf_size_in_bytes; /*including gpu_id and buf_size */ | |
| 149 | 149 | }; |
| 150 | 150 | |
| 151 | 151 | struct kfd_ioctl_dbg_wave_control_args { |
| 152 | − uint64_t content_ptr; /* a pointer to the actual content */ | |
| 153 | − uint32_t gpu_id; /* to KFD */ | |
| 154 | − uint32_t buf_size_in_bytes; /*including gpu_id and buf_size */ | |
| 152 | + __u64 content_ptr; /* a pointer to the actual content */ | |
| 153 | + __u32 gpu_id; /* to KFD */ | |
| 154 | + __u32 buf_size_in_bytes; /*including gpu_id and buf_size */ | |
| 155 | 155 | }; |
| 156 | 156 | |
| 157 | 157 | /* Matching HSA_EVENTTYPE */ |
| @@ -172,44 +172,44 @@ struct kfd_ioctl_dbg_wave_control_args { · 14 unmodified lines | ||
| 172 | 172 | #define KFD_SIGNAL_EVENT_LIMIT 256 |
| 173 | 173 | |
| 174 | 174 | struct kfd_ioctl_create_event_args { |
| 175 | − uint64_t event_page_offset; /* from KFD */ | |
| 176 | − uint32_t event_trigger_data; /* from KFD - signal events only */ | |
| 177 | − uint32_t event_type; /* to KFD */ | |
| 178 | − uint32_t auto_reset; /* to KFD */ | |
| 179 | − uint32_t node_id; /* to KFD - only valid for certain | |
| 175 | + __u64 event_page_offset; /* from KFD */ | |
| 176 | + __u32 event_trigger_data; /* from KFD - signal events only */ | |
| 177 | + __u32 event_type; /* to KFD */ | |
| 178 | + __u32 auto_reset; /* to KFD */ | |
| 179 | + __u32 node_id; /* to KFD - only valid for certain | |
| 180 | 180 | event types */ |
| 181 | − uint32_t event_id; /* from KFD */ | |
| 182 | − uint32_t event_slot_index; /* from KFD */ | |
| 181 | + __u32 event_id; /* from KFD */ | |
| 182 | + __u32 event_slot_index; /* from KFD */ | |
| 183 | 183 | }; |
| 184 | 184 | |
| 185 | 185 | struct kfd_ioctl_destroy_event_args { |
| 186 | − uint32_t event_id; /* to KFD */ | |
| 187 | − uint32_t pad; | |
| 186 | + __u32 event_id; /* to KFD */ | |
| 187 | + __u32 pad; | |
| 188 | 188 | }; |
| 189 | 189 | |
| 190 | 190 | struct kfd_ioctl_set_event_args { |
| 191 | − uint32_t event_id; /* to KFD */ | |
| 192 | − uint32_t pad; | |
| 191 | + __u32 event_id; /* to KFD */ | |
| 192 | + __u32 pad; | |
| 193 | 193 | }; |
| 194 | 194 | |
| 195 | 195 | struct kfd_ioctl_reset_event_args { |
| 196 | − uint32_t event_id; /* to KFD */ | |
| 197 | − uint32_t pad; | |
| 196 | + __u32 event_id; /* to KFD */ | |
| 197 | + __u32 pad; | |
| 198 | 198 | }; |
| 199 | 199 | |
| 200 | 200 | struct kfd_memory_exception_failure { |
| 201 | − uint32_t NotPresent; /* Page not present or supervisor privilege */ | |
| 202 | − uint32_t ReadOnly; /* Write access to a read-only page */ | |
| 203 | − uint32_t NoExecute; /* Execute access to a page marked NX */ | |
| 204 | − uint32_t pad; | |
| 201 | + __u32 NotPresent; /* Page not present or supervisor privilege */ | |
| 202 | + __u32 ReadOnly; /* Write access to a read-only page */ | |
| 203 | + __u32 NoExecute; /* Execute access to a page marked NX */ | |
| 204 | + __u32 pad; | |
| 205 | 205 | }; |
| 206 | 206 | |
| 207 | 207 | /* memory exception data*/ |
| 208 | 208 | struct kfd_hsa_memory_exception_data { |
| 209 | 209 | struct kfd_memory_exception_failure failure; |
| 210 | − uint64_t va; | |
| 211 | − uint32_t gpu_id; | |
| 212 | − uint32_t pad; | |
| 210 | + __u64 va; | |
| 211 | + __u32 gpu_id; | |
| 212 | + __u32 pad; | |
| 213 | 213 | }; |
| 214 | 214 | |
| 215 | 215 | /* Event data*/ |
| @@ -217,19 +217,19 @@ struct kfd_event_data { · 1 unmodified line | ||
| 217 | 217 | union { |
| 218 | 218 | struct kfd_hsa_memory_exception_data memory_exception_data; |
| 219 | 219 | }; /* From KFD */ |
| 220 | − uint64_t kfd_event_data_ext; /* pointer to an extension structure | |
| 220 | + __u64 kfd_event_data_ext; /* pointer to an extension structure | |
| 221 | 221 | for future exception types */ |
| 222 | − uint32_t event_id; /* to KFD */ | |
| 223 | − uint32_t pad; | |
| 222 | + __u32 event_id; /* to KFD */ | |
| 223 | + __u32 pad; | |
| 224 | 224 | }; |
| 225 | 225 | |
| 226 | 226 | struct kfd_ioctl_wait_events_args { |
| 227 | − uint64_t events_ptr; /* pointed to struct | |
| 227 | + __u64 events_ptr; /* pointed to struct | |
| 228 | 228 | kfd_event_data array, to KFD */ |
| 229 | − uint32_t num_events; /* to KFD */ | |
| 230 | − uint32_t wait_for_all; /* to KFD */ | |
| 231 | − uint32_t timeout; /* to KFD */ | |
| 232 | − uint32_t wait_result; /* from KFD */ | |
| 229 | + __u32 num_events; /* to KFD */ | |
| 230 | + __u32 wait_for_all; /* to KFD */ | |
| 231 | + __u32 timeout; /* to KFD */ | |
| 232 | + __u32 wait_result; /* from KFD */ | |
| 233 | 233 | }; |
| 234 | 234 | |
| 235 | 235 | struct kfd_ioctl_set_scratch_backing_va_args { |