Lines Matching refs:native

228 	afu->native->spa_order = -1;  in cxl_alloc_spa()
230 afu->native->spa_order++; in cxl_alloc_spa()
231 spa_size = (1 << afu->native->spa_order) * PAGE_SIZE; in cxl_alloc_spa()
235 afu->native->spa_max_procs, afu->native->spa_size); in cxl_alloc_spa()
237 afu->num_procs = afu->native->spa_max_procs; in cxl_alloc_spa()
241 afu->native->spa_size = spa_size; in cxl_alloc_spa()
242 afu->native->spa_max_procs = spa_max_procs(afu->native->spa_size); in cxl_alloc_spa()
243 } while (afu->native->spa_max_procs < afu->num_procs); in cxl_alloc_spa()
245 if (!(afu->native->spa = (struct cxl_process_element *) in cxl_alloc_spa()
246 __get_free_pages(GFP_KERNEL | __GFP_ZERO, afu->native->spa_order))) { in cxl_alloc_spa()
251 1<<afu->native->spa_order, afu->native->spa_max_procs, afu->num_procs); in cxl_alloc_spa()
260 afu->native->sw_command_status = (__be64 *)((char *)afu->native->spa + in attach_spa()
261 ((afu->native->spa_max_procs + 3) * 128)); in attach_spa()
263 spap = virt_to_phys(afu->native->spa) & CXL_PSL_SPAP_Addr; in attach_spa()
264 spap |= ((afu->native->spa_size >> (12 - CXL_PSL_SPAP_Size_Shift)) - 1) & CXL_PSL_SPAP_Size; in attach_spa()
267 afu->native->spa, afu->native->spa_max_procs, in attach_spa()
268 afu->native->sw_command_status, spap); in attach_spa()
274 if (afu->native->spa) { in cxl_release_spa()
275 free_pages((unsigned long) afu->native->spa, in cxl_release_spa()
276 afu->native->spa_order); in cxl_release_spa()
277 afu->native->spa = NULL; in cxl_release_spa()
353 if (adapter->native->no_data_cache) { in cxl_data_cache_flush()
409 WARN_ON(!mutex_is_locked(&ctx->afu->native->spa_mutex)); in slb_invalid()
439 *(ctx->afu->native->sw_command_status) = cpu_to_be64(cmd | 0 | ctx->pe); in do_process_element_cmd()
453 state = be64_to_cpup(ctx->afu->native->sw_command_status); in do_process_element_cmd()
481 mutex_lock(&ctx->afu->native->spa_mutex); in add_process_element()
486 mutex_unlock(&ctx->afu->native->spa_mutex); in add_process_element()
498 mutex_lock(&ctx->afu->native->spa_mutex); in terminate_process_element()
509 mutex_unlock(&ctx->afu->native->spa_mutex); in terminate_process_element()
517 mutex_lock(&ctx->afu->native->spa_mutex); in remove_process_element()
531 mutex_unlock(&ctx->afu->native->spa_mutex); in remove_process_element()
543 (ctx->afu->native->pp_offset + ctx->afu->pp_size * ctx->pe); in cxl_assign_psn_space()
555 if (afu->native->spa == NULL) { in activate_afu_directed()
703 ctx->irqs.offset[0] = ctx->afu->native->psl_hwirq; in process_element_entry_psl9()
766 ctx->irqs.offset[0] = ctx->afu->native->psl_hwirq; in cxl_attach_afu_directed_psl8()
817 if (afu->adapter->native->sl_ops->needs_reset_before_disable) in deactivate_afu_directed()
837 if (afu->native->spa == NULL) { in cxl_activate_dedicated_process_psl9()
910 if (ctx->afu->adapter->native->sl_ops->update_dedicated_ivtes) in cxl_attach_dedicated_process_psl9()
911 afu->adapter->native->sl_ops->update_dedicated_ivtes(ctx); in cxl_attach_dedicated_process_psl9()
946 if (ctx->afu->adapter->native->sl_ops->update_dedicated_ivtes) in cxl_attach_dedicated_process_psl8()
947 afu->adapter->native->sl_ops->update_dedicated_ivtes(ctx); in cxl_attach_dedicated_process_psl8()
998 (afu->adapter->native->sl_ops->activate_dedicated_process)) in native_afu_activate_mode()
999 return afu->adapter->native->sl_ops->activate_dedicated_process(afu); in native_afu_activate_mode()
1014 (ctx->afu->adapter->native->sl_ops->attach_afu_directed)) in native_attach_process()
1015 return ctx->afu->adapter->native->sl_ops->attach_afu_directed(ctx, wed, amr); in native_attach_process()
1018 (ctx->afu->adapter->native->sl_ops->attach_dedicated_process)) in native_attach_process()
1019 return ctx->afu->adapter->native->sl_ops->attach_dedicated_process(ctx, wed, amr); in native_attach_process()
1053 (ctx->afu->adapter->native->sl_ops->update_dedicated_ivtes)) in native_update_ivtes()
1054 return ctx->afu->adapter->native->sl_ops->update_dedicated_ivtes(ctx); in native_update_ivtes()
1106 if (ctx->afu->adapter->native->sl_ops->register_serr_irq) { in cxl_native_irq_dump_regs_psl9()
1123 if (ctx->afu->adapter->native->sl_ops->register_serr_irq) { in cxl_native_irq_dump_regs_psl8()
1137 if (ctx->afu->adapter->native->sl_ops->psl_irq_dump_registers) in native_handle_psl_slice_error()
1138 ctx->afu->adapter->native->sl_ops->psl_irq_dump_registers(ctx); in native_handle_psl_slice_error()
1140 if (ctx->afu->adapter->native->sl_ops->debugfs_stop_trace) { in native_handle_psl_slice_error()
1142 ctx->afu->adapter->native->sl_ops->debugfs_stop_trace(ctx->afu->adapter); in native_handle_psl_slice_error()
1188 if (afu->adapter->native->sl_ops->fail_irq) in native_irq_multiplexed()
1189 return afu->adapter->native->sl_ops->fail_irq(afu, &irq_info); in native_irq_multiplexed()
1196 if (afu->adapter->native->sl_ops->handle_interrupt) in native_irq_multiplexed()
1197 ret = afu->adapter->native->sl_ops->handle_interrupt(irq, ctx, &irq_info); in native_irq_multiplexed()
1207 if (afu->adapter->native->sl_ops->fail_irq) in native_irq_multiplexed()
1208 ret = afu->adapter->native->sl_ops->fail_irq(afu, &irq_info); in native_irq_multiplexed()
1308 if (adapter->native->sl_ops->debugfs_stop_trace) { in native_irq_err()
1310 adapter->native->sl_ops->debugfs_stop_trace(adapter); in native_irq_err()
1313 if (adapter->native->sl_ops->err_irq_dump_registers) in native_irq_err()
1314 adapter->native->sl_ops->err_irq_dump_registers(adapter); in native_irq_err()
1329 &adapter->native->err_hwirq, in cxl_native_register_psl_err_irq()
1330 &adapter->native->err_virq, in cxl_native_register_psl_err_irq()
1337 cxl_p1_write(adapter, CXL_PSL_ErrIVTE, adapter->native->err_hwirq & 0xffff); in cxl_native_register_psl_err_irq()
1344 if (adapter->native->err_virq == 0 || in cxl_native_release_psl_err_irq()
1345 adapter->native->err_virq != in cxl_native_release_psl_err_irq()
1346 irq_find_mapping(NULL, adapter->native->err_hwirq)) in cxl_native_release_psl_err_irq()
1350 cxl_unmap_irq(adapter->native->err_virq, adapter); in cxl_native_release_psl_err_irq()
1351 cxl_ops->release_one_irq(adapter, adapter->native->err_hwirq); in cxl_native_release_psl_err_irq()
1353 adapter->native->err_virq = 0; in cxl_native_release_psl_err_irq()
1412 afu, &afu->native->psl_hwirq, &afu->native->psl_virq, in cxl_native_register_psl_irq()
1422 if (afu->native->psl_virq == 0 || in cxl_native_release_psl_irq()
1423 afu->native->psl_virq != in cxl_native_release_psl_irq()
1424 irq_find_mapping(NULL, afu->native->psl_hwirq)) in cxl_native_release_psl_irq()
1427 cxl_unmap_irq(afu->native->psl_virq, afu); in cxl_native_release_psl_irq()
1428 cxl_ops->release_one_irq(afu->adapter, afu->native->psl_hwirq); in cxl_native_release_psl_irq()
1430 afu->native->psl_virq = 0; in cxl_native_release_psl_irq()
1475 *out = in_le64(afu->native->afu_desc_mmio + afu->crs_offset + in native_afu_cr_read64()
1486 *out = in_le32(afu->native->afu_desc_mmio + afu->crs_offset + in native_afu_cr_read32()
1521 out_le32(afu->native->afu_desc_mmio + afu->crs_offset + in native_afu_cr_write32()