Lines Matching refs:args
161 struct kfd_ioctl_get_version_args *args = data; in kfd_ioctl_get_version() local
163 args->major_version = KFD_IOCTL_MAJOR_VERSION; in kfd_ioctl_get_version()
164 args->minor_version = KFD_IOCTL_MINOR_VERSION; in kfd_ioctl_get_version()
170 struct kfd_ioctl_create_queue_args *args) in set_queue_properties_from_user() argument
172 if (args->queue_percentage > KFD_MAX_QUEUE_PERCENTAGE) { in set_queue_properties_from_user()
177 if (args->queue_priority > KFD_MAX_QUEUE_PRIORITY) { in set_queue_properties_from_user()
182 if ((args->ring_base_address) && in set_queue_properties_from_user()
183 (!access_ok((const void __user *) args->ring_base_address, in set_queue_properties_from_user()
189 if (!is_power_of_2(args->ring_size) && (args->ring_size != 0)) { in set_queue_properties_from_user()
194 if (!access_ok((const void __user *) args->read_pointer_address, in set_queue_properties_from_user()
200 if (!access_ok((const void __user *) args->write_pointer_address, in set_queue_properties_from_user()
206 if (args->eop_buffer_address && in set_queue_properties_from_user()
207 !access_ok((const void __user *) args->eop_buffer_address, in set_queue_properties_from_user()
213 if (args->ctx_save_restore_address && in set_queue_properties_from_user()
214 !access_ok((const void __user *) args->ctx_save_restore_address, in set_queue_properties_from_user()
222 q_properties->queue_percent = args->queue_percentage; in set_queue_properties_from_user()
223 q_properties->priority = args->queue_priority; in set_queue_properties_from_user()
224 q_properties->queue_address = args->ring_base_address; in set_queue_properties_from_user()
225 q_properties->queue_size = args->ring_size; in set_queue_properties_from_user()
226 q_properties->read_ptr = (uint32_t *) args->read_pointer_address; in set_queue_properties_from_user()
227 q_properties->write_ptr = (uint32_t *) args->write_pointer_address; in set_queue_properties_from_user()
228 q_properties->eop_ring_buffer_address = args->eop_buffer_address; in set_queue_properties_from_user()
229 q_properties->eop_ring_buffer_size = args->eop_buffer_size; in set_queue_properties_from_user()
231 args->ctx_save_restore_address; in set_queue_properties_from_user()
232 q_properties->ctx_save_restore_area_size = args->ctx_save_restore_size; in set_queue_properties_from_user()
233 q_properties->ctl_stack_size = args->ctl_stack_size; in set_queue_properties_from_user()
234 if (args->queue_type == KFD_IOC_QUEUE_TYPE_COMPUTE || in set_queue_properties_from_user()
235 args->queue_type == KFD_IOC_QUEUE_TYPE_COMPUTE_AQL) in set_queue_properties_from_user()
237 else if (args->queue_type == KFD_IOC_QUEUE_TYPE_SDMA) in set_queue_properties_from_user()
239 else if (args->queue_type == KFD_IOC_QUEUE_TYPE_SDMA_XGMI) in set_queue_properties_from_user()
244 if (args->queue_type == KFD_IOC_QUEUE_TYPE_COMPUTE_AQL) in set_queue_properties_from_user()
250 q_properties->queue_percent, args->queue_percentage); in set_queue_properties_from_user()
253 q_properties->priority, args->queue_priority); in set_queue_properties_from_user()
256 q_properties->queue_address, args->ring_base_address); in set_queue_properties_from_user()
259 q_properties->queue_size, args->ring_size); in set_queue_properties_from_user()
278 struct kfd_ioctl_create_queue_args *args = data; in kfd_ioctl_create_queue() local
290 err = set_queue_properties_from_user(&q_properties, args); in kfd_ioctl_create_queue()
294 pr_debug("Looking for gpu id 0x%x\n", args->gpu_id); in kfd_ioctl_create_queue()
295 dev = kfd_device_by_id(args->gpu_id); in kfd_ioctl_create_queue()
297 pr_debug("Could not find gpu id 0x%x\n", args->gpu_id); in kfd_ioctl_create_queue()
318 args->queue_id = queue_id; in kfd_ioctl_create_queue()
322 args->doorbell_offset = KFD_MMAP_TYPE_DOORBELL; in kfd_ioctl_create_queue()
323 args->doorbell_offset |= KFD_MMAP_GPU_ID(args->gpu_id); in kfd_ioctl_create_queue()
328 args->doorbell_offset |= doorbell_offset_in_process; in kfd_ioctl_create_queue()
332 pr_debug("Queue id %d was created successfully\n", args->queue_id); in kfd_ioctl_create_queue()
335 args->ring_base_address); in kfd_ioctl_create_queue()
338 args->read_pointer_address); in kfd_ioctl_create_queue()
341 args->write_pointer_address); in kfd_ioctl_create_queue()
355 struct kfd_ioctl_destroy_queue_args *args = data; in kfd_ioctl_destroy_queue() local
358 args->queue_id, in kfd_ioctl_destroy_queue()
363 retval = pqm_destroy_queue(&p->pqm, args->queue_id); in kfd_ioctl_destroy_queue()
373 struct kfd_ioctl_update_queue_args *args = data; in kfd_ioctl_update_queue() local
376 if (args->queue_percentage > KFD_MAX_QUEUE_PERCENTAGE) { in kfd_ioctl_update_queue()
381 if (args->queue_priority > KFD_MAX_QUEUE_PRIORITY) { in kfd_ioctl_update_queue()
386 if ((args->ring_base_address) && in kfd_ioctl_update_queue()
387 (!access_ok((const void __user *) args->ring_base_address, in kfd_ioctl_update_queue()
393 if (!is_power_of_2(args->ring_size) && (args->ring_size != 0)) { in kfd_ioctl_update_queue()
398 properties.queue_address = args->ring_base_address; in kfd_ioctl_update_queue()
399 properties.queue_size = args->ring_size; in kfd_ioctl_update_queue()
400 properties.queue_percent = args->queue_percentage; in kfd_ioctl_update_queue()
401 properties.priority = args->queue_priority; in kfd_ioctl_update_queue()
404 args->queue_id, p->pasid); in kfd_ioctl_update_queue()
408 retval = pqm_update_queue(&p->pqm, args->queue_id, &properties); in kfd_ioctl_update_queue()
420 struct kfd_ioctl_set_cu_mask_args *args = data; in kfd_ioctl_set_cu_mask() local
422 uint32_t __user *cu_mask_ptr = (uint32_t __user *)args->cu_mask_ptr; in kfd_ioctl_set_cu_mask()
423 size_t cu_mask_size = sizeof(uint32_t) * (args->num_cu_mask / 32); in kfd_ioctl_set_cu_mask()
425 if ((args->num_cu_mask % 32) != 0) { in kfd_ioctl_set_cu_mask()
427 args->num_cu_mask); in kfd_ioctl_set_cu_mask()
431 properties.cu_mask_count = args->num_cu_mask; in kfd_ioctl_set_cu_mask()
460 retval = pqm_set_cu_mask(&p->pqm, args->queue_id, &properties); in kfd_ioctl_set_cu_mask()
473 struct kfd_ioctl_get_queue_wave_state_args *args = data; in kfd_ioctl_get_queue_wave_state() local
478 r = pqm_get_wave_state(&p->pqm, args->queue_id, in kfd_ioctl_get_queue_wave_state()
479 (void __user *)args->ctl_stack_address, in kfd_ioctl_get_queue_wave_state()
480 &args->ctl_stack_used_size, in kfd_ioctl_get_queue_wave_state()
481 &args->save_area_used_size); in kfd_ioctl_get_queue_wave_state()
491 struct kfd_ioctl_set_memory_policy_args *args = data; in kfd_ioctl_set_memory_policy() local
497 if (args->default_policy != KFD_IOC_CACHE_POLICY_COHERENT in kfd_ioctl_set_memory_policy()
498 && args->default_policy != KFD_IOC_CACHE_POLICY_NONCOHERENT) { in kfd_ioctl_set_memory_policy()
502 if (args->alternate_policy != KFD_IOC_CACHE_POLICY_COHERENT in kfd_ioctl_set_memory_policy()
503 && args->alternate_policy != KFD_IOC_CACHE_POLICY_NONCOHERENT) { in kfd_ioctl_set_memory_policy()
507 dev = kfd_device_by_id(args->gpu_id); in kfd_ioctl_set_memory_policy()
519 default_policy = (args->default_policy == KFD_IOC_CACHE_POLICY_COHERENT) in kfd_ioctl_set_memory_policy()
523 (args->alternate_policy == KFD_IOC_CACHE_POLICY_COHERENT) in kfd_ioctl_set_memory_policy()
530 (void __user *)args->alternate_aperture_base, in kfd_ioctl_set_memory_policy()
531 args->alternate_aperture_size)) in kfd_ioctl_set_memory_policy()
543 struct kfd_ioctl_set_trap_handler_args *args = data; in kfd_ioctl_set_trap_handler() local
548 dev = kfd_device_by_id(args->gpu_id); in kfd_ioctl_set_trap_handler()
560 kfd_process_set_trap_handler(&pdd->qpd, args->tba_addr, args->tma_addr); in kfd_ioctl_set_trap_handler()
571 struct kfd_ioctl_dbg_register_args *args = data; in kfd_ioctl_dbg_register() local
578 dev = kfd_device_by_id(args->gpu_id); in kfd_ioctl_dbg_register()
625 struct kfd_ioctl_dbg_unregister_args *args = data; in kfd_ioctl_dbg_unregister() local
629 dev = kfd_device_by_id(args->gpu_id); in kfd_ioctl_dbg_unregister()
663 struct kfd_ioctl_dbg_address_watch_args *args = data; in kfd_ioctl_dbg_address_watch() local
674 dev = kfd_device_by_id(args->gpu_id); in kfd_ioctl_dbg_address_watch()
683 cmd_from_user = (void __user *) args->content_ptr; in kfd_ioctl_dbg_address_watch()
687 if ((args->buf_size_in_bytes > MAX_ALLOWED_AW_BUFF_SIZE) || in kfd_ioctl_dbg_address_watch()
688 (args->buf_size_in_bytes <= sizeof(*args) + sizeof(int) * 2) || in kfd_ioctl_dbg_address_watch()
694 args->buf_size_in_bytes - sizeof(*args)); in kfd_ioctl_dbg_address_watch()
715 if (args_idx >= args->buf_size_in_bytes - sizeof(*args)) { in kfd_ioctl_dbg_address_watch()
739 if (args_idx >= args->buf_size_in_bytes - sizeof(args)) { in kfd_ioctl_dbg_address_watch()
763 struct kfd_ioctl_dbg_wave_control_args *args = data; in kfd_ioctl_dbg_wave_control() local
775 computed_buff_size = sizeof(*args) + in kfd_ioctl_dbg_wave_control()
782 dev = kfd_device_by_id(args->gpu_id); in kfd_ioctl_dbg_wave_control()
792 if (args->buf_size_in_bytes != computed_buff_size) { in kfd_ioctl_dbg_wave_control()
794 args->buf_size_in_bytes, computed_buff_size); in kfd_ioctl_dbg_wave_control()
798 cmd_from_user = (void __user *) args->content_ptr; in kfd_ioctl_dbg_wave_control()
806 args->buf_size_in_bytes - sizeof(*args)); in kfd_ioctl_dbg_wave_control()
847 struct kfd_ioctl_get_clock_counters_args *args = data; in kfd_ioctl_get_clock_counters() local
850 dev = kfd_device_by_id(args->gpu_id); in kfd_ioctl_get_clock_counters()
853 args->gpu_clock_counter = amdgpu_amdkfd_get_gpu_clock_counter(dev->kgd); in kfd_ioctl_get_clock_counters()
856 args->gpu_clock_counter = 0; in kfd_ioctl_get_clock_counters()
859 args->cpu_clock_counter = ktime_get_raw_ns(); in kfd_ioctl_get_clock_counters()
860 args->system_clock_counter = ktime_get_boottime_ns(); in kfd_ioctl_get_clock_counters()
863 args->system_clock_freq = 1000000000; in kfd_ioctl_get_clock_counters()
872 struct kfd_ioctl_get_process_apertures_args *args = data; in kfd_ioctl_get_process_apertures() local
878 args->num_of_nodes = 0; in kfd_ioctl_get_process_apertures()
886 &args->process_apertures[args->num_of_nodes]; in kfd_ioctl_get_process_apertures()
896 "node id %u\n", args->num_of_nodes); in kfd_ioctl_get_process_apertures()
912 if (++args->num_of_nodes >= NUM_OF_SUPPORTED_GPUS) in kfd_ioctl_get_process_apertures()
923 struct kfd_ioctl_get_process_apertures_new_args *args = data; in kfd_ioctl_get_process_apertures_new() local
930 if (args->num_of_nodes == 0) { in kfd_ioctl_get_process_apertures_new()
935 args->num_of_nodes = p->n_pdds; in kfd_ioctl_get_process_apertures_new()
944 args->num_of_nodes), GFP_KERNEL); in kfd_ioctl_get_process_apertures_new()
951 args->num_of_nodes = 0; in kfd_ioctl_get_process_apertures_new()
957 for (i = 0; i < min(p->n_pdds, args->num_of_nodes); i++) { in kfd_ioctl_get_process_apertures_new()
985 args->num_of_nodes = i; in kfd_ioctl_get_process_apertures_new()
987 (void __user *)args->kfd_process_device_apertures_ptr, in kfd_ioctl_get_process_apertures_new()
1001 struct kfd_ioctl_create_event_args *args = data; in kfd_ioctl_create_event() local
1008 if (args->event_page_offset) { in kfd_ioctl_create_event()
1019 kfd = kfd_device_by_id(GET_GPU_ID(args->event_page_offset)); in kfd_ioctl_create_event()
1033 GET_IDR_HANDLE(args->event_page_offset)); in kfd_ioctl_create_event()
1036 args->event_page_offset); in kfd_ioctl_create_event()
1056 err = kfd_event_create(filp, p, args->event_type, in kfd_ioctl_create_event()
1057 args->auto_reset != 0, args->node_id, in kfd_ioctl_create_event()
1058 &args->event_id, &args->event_trigger_data, in kfd_ioctl_create_event()
1059 &args->event_page_offset, in kfd_ioctl_create_event()
1060 &args->event_slot_index); in kfd_ioctl_create_event()
1072 struct kfd_ioctl_destroy_event_args *args = data; in kfd_ioctl_destroy_event() local
1074 return kfd_event_destroy(p, args->event_id); in kfd_ioctl_destroy_event()
1080 struct kfd_ioctl_set_event_args *args = data; in kfd_ioctl_set_event() local
1082 return kfd_set_event(p, args->event_id); in kfd_ioctl_set_event()
1088 struct kfd_ioctl_reset_event_args *args = data; in kfd_ioctl_reset_event() local
1090 return kfd_reset_event(p, args->event_id); in kfd_ioctl_reset_event()
1096 struct kfd_ioctl_wait_events_args *args = data; in kfd_ioctl_wait_events() local
1099 err = kfd_wait_on_events(p, args->num_events, in kfd_ioctl_wait_events()
1100 (void __user *)args->events_ptr, in kfd_ioctl_wait_events()
1101 (args->wait_for_all != 0), in kfd_ioctl_wait_events()
1102 args->timeout, &args->wait_result); in kfd_ioctl_wait_events()
1109 struct kfd_ioctl_set_scratch_backing_va_args *args = data; in kfd_ioctl_set_scratch_backing_va() local
1114 dev = kfd_device_by_id(args->gpu_id); in kfd_ioctl_set_scratch_backing_va()
1126 pdd->qpd.sh_hidden_private_base = args->va_addr; in kfd_ioctl_set_scratch_backing_va()
1133 dev->kgd, args->va_addr, pdd->qpd.vmid); in kfd_ioctl_set_scratch_backing_va()
1145 struct kfd_ioctl_get_tile_config_args *args = data; in kfd_ioctl_get_tile_config() local
1150 dev = kfd_device_by_id(args->gpu_id); in kfd_ioctl_get_tile_config()
1156 args->gb_addr_config = config.gb_addr_config; in kfd_ioctl_get_tile_config()
1157 args->num_banks = config.num_banks; in kfd_ioctl_get_tile_config()
1158 args->num_ranks = config.num_ranks; in kfd_ioctl_get_tile_config()
1160 if (args->num_tile_configs > config.num_tile_configs) in kfd_ioctl_get_tile_config()
1161 args->num_tile_configs = config.num_tile_configs; in kfd_ioctl_get_tile_config()
1162 err = copy_to_user((void __user *)args->tile_config_ptr, in kfd_ioctl_get_tile_config()
1164 args->num_tile_configs * sizeof(uint32_t)); in kfd_ioctl_get_tile_config()
1166 args->num_tile_configs = 0; in kfd_ioctl_get_tile_config()
1170 if (args->num_macro_tile_configs > config.num_macro_tile_configs) in kfd_ioctl_get_tile_config()
1171 args->num_macro_tile_configs = in kfd_ioctl_get_tile_config()
1173 err = copy_to_user((void __user *)args->macro_tile_config_ptr, in kfd_ioctl_get_tile_config()
1175 args->num_macro_tile_configs * sizeof(uint32_t)); in kfd_ioctl_get_tile_config()
1177 args->num_macro_tile_configs = 0; in kfd_ioctl_get_tile_config()
1187 struct kfd_ioctl_acquire_vm_args *args = data; in kfd_ioctl_acquire_vm() local
1193 dev = kfd_device_by_id(args->gpu_id); in kfd_ioctl_acquire_vm()
1197 drm_file = fget(args->drm_fd); in kfd_ioctl_acquire_vm()
1250 struct kfd_ioctl_alloc_memory_of_gpu_args *args = data; in kfd_ioctl_alloc_memory_of_gpu() local
1256 uint64_t offset = args->mmap_offset; in kfd_ioctl_alloc_memory_of_gpu()
1257 uint32_t flags = args->flags; in kfd_ioctl_alloc_memory_of_gpu()
1259 if (args->size == 0) in kfd_ioctl_alloc_memory_of_gpu()
1262 dev = kfd_device_by_id(args->gpu_id); in kfd_ioctl_alloc_memory_of_gpu()
1282 if (args->size != kfd_doorbell_process_slice(dev)) { in kfd_ioctl_alloc_memory_of_gpu()
1288 if (args->size != PAGE_SIZE) { in kfd_ioctl_alloc_memory_of_gpu()
1300 dev->kgd, args->va_addr, args->size, in kfd_ioctl_alloc_memory_of_gpu()
1315 WRITE_ONCE(pdd->vram_usage, pdd->vram_usage + args->size); in kfd_ioctl_alloc_memory_of_gpu()
1319 args->handle = MAKE_HANDLE(args->gpu_id, idr_handle); in kfd_ioctl_alloc_memory_of_gpu()
1320 args->mmap_offset = offset; in kfd_ioctl_alloc_memory_of_gpu()
1326 args->mmap_offset = KFD_MMAP_TYPE_MMIO in kfd_ioctl_alloc_memory_of_gpu()
1327 | KFD_MMAP_GPU_ID(args->gpu_id); in kfd_ioctl_alloc_memory_of_gpu()
1342 struct kfd_ioctl_free_memory_of_gpu_args *args = data; in kfd_ioctl_free_memory_of_gpu() local
1349 dev = kfd_device_by_id(GET_GPU_ID(args->handle)); in kfd_ioctl_free_memory_of_gpu()
1363 pdd, GET_IDR_HANDLE(args->handle)); in kfd_ioctl_free_memory_of_gpu()
1377 pdd, GET_IDR_HANDLE(args->handle)); in kfd_ioctl_free_memory_of_gpu()
1389 struct kfd_ioctl_map_memory_to_gpu_args *args = data; in kfd_ioctl_map_memory_to_gpu() local
1398 dev = kfd_device_by_id(GET_GPU_ID(args->handle)); in kfd_ioctl_map_memory_to_gpu()
1402 if (!args->n_devices) { in kfd_ioctl_map_memory_to_gpu()
1406 if (args->n_success > args->n_devices) { in kfd_ioctl_map_memory_to_gpu()
1411 devices_arr = kmalloc_array(args->n_devices, sizeof(*devices_arr), in kfd_ioctl_map_memory_to_gpu()
1417 (void __user *)args->device_ids_array_ptr, in kfd_ioctl_map_memory_to_gpu()
1418 args->n_devices * sizeof(*devices_arr)); in kfd_ioctl_map_memory_to_gpu()
1433 GET_IDR_HANDLE(args->handle)); in kfd_ioctl_map_memory_to_gpu()
1439 for (i = args->n_success; i < args->n_devices; i++) { in kfd_ioctl_map_memory_to_gpu()
1458 i, args->n_devices); in kfd_ioctl_map_memory_to_gpu()
1461 args->n_success = i+1; in kfd_ioctl_map_memory_to_gpu()
1474 for (i = 0; i < args->n_devices; i++) { in kfd_ioctl_map_memory_to_gpu()
1502 struct kfd_ioctl_unmap_memory_from_gpu_args *args = data; in kfd_ioctl_unmap_memory_from_gpu() local
1509 dev = kfd_device_by_id(GET_GPU_ID(args->handle)); in kfd_ioctl_unmap_memory_from_gpu()
1513 if (!args->n_devices) { in kfd_ioctl_unmap_memory_from_gpu()
1517 if (args->n_success > args->n_devices) { in kfd_ioctl_unmap_memory_from_gpu()
1522 devices_arr = kmalloc_array(args->n_devices, sizeof(*devices_arr), in kfd_ioctl_unmap_memory_from_gpu()
1528 (void __user *)args->device_ids_array_ptr, in kfd_ioctl_unmap_memory_from_gpu()
1529 args->n_devices * sizeof(*devices_arr)); in kfd_ioctl_unmap_memory_from_gpu()
1544 GET_IDR_HANDLE(args->handle)); in kfd_ioctl_unmap_memory_from_gpu()
1550 for (i = args->n_success; i < args->n_devices; i++) { in kfd_ioctl_unmap_memory_from_gpu()
1566 i, args->n_devices); in kfd_ioctl_unmap_memory_from_gpu()
1569 args->n_success = i+1; in kfd_ioctl_unmap_memory_from_gpu()
1582 for (i = 0; i < args->n_devices; i++) { in kfd_ioctl_unmap_memory_from_gpu()
1610 struct kfd_ioctl_alloc_queue_gws_args *args = data; in kfd_ioctl_alloc_queue_gws() local
1615 q = pqm_get_user_queue(&p->pqm, args->queue_id); in kfd_ioctl_alloc_queue_gws()
1634 retval = pqm_set_gws(&p->pqm, args->queue_id, args->num_gws ? dev->gws : NULL); in kfd_ioctl_alloc_queue_gws()
1637 args->first_gws = 0; in kfd_ioctl_alloc_queue_gws()
1648 struct kfd_ioctl_get_dmabuf_info_args *args = data; in kfd_ioctl_get_dmabuf_info() local
1663 if (args->metadata_ptr) { in kfd_ioctl_get_dmabuf_info()
1664 metadata_buffer = kzalloc(args->metadata_size, GFP_KERNEL); in kfd_ioctl_get_dmabuf_info()
1670 r = amdgpu_amdkfd_get_dmabuf_info(dev->kgd, args->dmabuf_fd, in kfd_ioctl_get_dmabuf_info()
1671 &dma_buf_kgd, &args->size, in kfd_ioctl_get_dmabuf_info()
1672 metadata_buffer, args->metadata_size, in kfd_ioctl_get_dmabuf_info()
1673 &args->metadata_size, &flags); in kfd_ioctl_get_dmabuf_info()
1683 args->gpu_id = dev->id; in kfd_ioctl_get_dmabuf_info()
1684 args->flags = flags; in kfd_ioctl_get_dmabuf_info()
1688 r = copy_to_user((void __user *)args->metadata_ptr, in kfd_ioctl_get_dmabuf_info()
1689 metadata_buffer, args->metadata_size); in kfd_ioctl_get_dmabuf_info()
1703 struct kfd_ioctl_import_dmabuf_args *args = data; in kfd_ioctl_import_dmabuf() local
1712 dev = kfd_device_by_id(args->gpu_id); in kfd_ioctl_import_dmabuf()
1716 dmabuf = dma_buf_get(args->dmabuf_fd); in kfd_ioctl_import_dmabuf()
1729 args->va_addr, pdd->drm_priv, in kfd_ioctl_import_dmabuf()
1744 args->handle = MAKE_HANDLE(args->gpu_id, idr_handle); in kfd_ioctl_import_dmabuf()
1761 struct kfd_ioctl_smi_events_args *args = data; in kfd_ioctl_smi_events() local
1764 dev = kfd_device_by_id(args->gpuid); in kfd_ioctl_smi_events()
1768 return kfd_smi_event_open(dev, &args->anon_fd); in kfd_ioctl_smi_events()
1774 struct kfd_ioctl_set_xnack_mode_args *args = data; in kfd_ioctl_set_xnack_mode() local
1778 if (args->xnack_enabled >= 0) { in kfd_ioctl_set_xnack_mode()
1784 if (args->xnack_enabled && !kfd_process_xnack_mode(p, true)) in kfd_ioctl_set_xnack_mode()
1787 p->xnack_enabled = args->xnack_enabled; in kfd_ioctl_set_xnack_mode()
1789 args->xnack_enabled = p->xnack_enabled; in kfd_ioctl_set_xnack_mode()
1799 struct kfd_ioctl_svm_args *args = data; in kfd_ioctl_svm() local
1803 args->start_addr, args->size, args->op, args->nattr); in kfd_ioctl_svm()
1805 if ((args->start_addr & ~PAGE_MASK) || (args->size & ~PAGE_MASK)) in kfd_ioctl_svm()
1807 if (!args->start_addr || !args->size) in kfd_ioctl_svm()
1810 r = svm_ioctl(p, args->op, args->start_addr, args->size, args->nattr, in kfd_ioctl_svm()
1811 args->attrs); in kfd_ioctl_svm()