History

Merge tag 'drm-amdkfd-next-2017-09-02' of git://people.freedesktop.org/~gabbayo/linux into drm-fixes

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

Dave Airlie committed 9 years ago

Commit 134dd2e2 parents 2bd6bf0 1fabbf73 files · +87 −88Browse files

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

Unified · Split

include/uapi/linux/kfd_ioctl.h+86−86
@@ -23,15 +23,15 @@ · 22 unmodified lines
2323 #ifndef KFD_IOCTL_H_INCLUDED
2424 #define KFD_IOCTL_H_INCLUDED
2525
26−#include <linux/types.h>
26+#include <drm/drm.h>
2727 #include <linux/ioctl.h>
2828
2929 #define KFD_IOCTL_MAJOR_VERSION 1
3030 #define KFD_IOCTL_MINOR_VERSION 1
3131
3232 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 */
3535 };
3636
3737 /* For kfd_ioctl_create_queue_args.queue_type. */
@@ -43,36 +43,36 @@ struct kfd_ioctl_get_version_args { · 5 unmodified lines
4343 #define KFD_MAX_QUEUE_PRIORITY 15
4444
4545 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 */
6262 };
6363
6464 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;
6767 };
6868
6969 struct kfd_ioctl_update_queue_args {
70− uint64_t ring_base_address; /* to KFD */
70+ __u64 ring_base_address; /* to KFD */
7171
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 */
7676 };
7777
7878 /* 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
8080 #define KFD_IOC_CACHE_POLICY_NONCOHERENT 1
8181
8282 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 */
8585
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;
9090 };
9191
9292 /*
@@ -97,26 +97,26 @@ struct kfd_ioctl_set_memory_policy_args { · 4 unmodified lines
9797 */
9898
9999 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 */
104104
105− uint32_t gpu_id; /* to KFD */
106− uint32_t pad;
105+ __u32 gpu_id; /* to KFD */
106+ __u32 pad;
107107 };
108108
109109 #define NUM_OF_SUPPORTED_GPUS 7
110110
111111 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;
120120 };
121121
122122 struct kfd_ioctl_get_process_apertures_args {
@@ -124,8 +124,8 @@ struct kfd_ioctl_get_process_apertures_args { · 1 unmodified line
124124 process_apertures[NUM_OF_SUPPORTED_GPUS];/* from KFD */
125125
126126 /* 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;
129129 };
130130
131131 #define MAX_ALLOWED_NUM_POINTS 100
@@ -133,25 +133,25 @@ struct kfd_ioctl_get_process_apertures_args { · 1 unmodified line
133133 #define MAX_ALLOWED_WAC_BUFF_SIZE 128
134134
135135 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;
138138 };
139139
140140 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;
143143 };
144144
145145 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 */
149149 };
150150
151151 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 */
155155 };
156156
157157 /* Matching HSA_EVENTTYPE */
@@ -172,44 +172,44 @@ struct kfd_ioctl_dbg_wave_control_args { · 14 unmodified lines
172172 #define KFD_SIGNAL_EVENT_LIMIT 256
173173
174174 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
180180 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 */
183183 };
184184
185185 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;
188188 };
189189
190190 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;
193193 };
194194
195195 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;
198198 };
199199
200200 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;
205205 };
206206
207207 /* memory exception data*/
208208 struct kfd_hsa_memory_exception_data {
209209 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;
213213 };
214214
215215 /* Event data*/
@@ -217,19 +217,19 @@ struct kfd_event_data { · 1 unmodified line
217217 union {
218218 struct kfd_hsa_memory_exception_data memory_exception_data;
219219 }; /* 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
221221 for future exception types */
222− uint32_t event_id; /* to KFD */
223− uint32_t pad;
222+ __u32 event_id; /* to KFD */
223+ __u32 pad;
224224 };
225225
226226 struct kfd_ioctl_wait_events_args {
227− uint64_t events_ptr; /* pointed to struct
227+ __u64 events_ptr; /* pointed to struct
228228 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 */
233233 };
234234
235235 struct kfd_ioctl_set_scratch_backing_va_args {