Lines Matching refs:native

231 	afu->native->spa_order = -1;  in cxl_alloc_spa()
233 afu->native->spa_order++; in cxl_alloc_spa()
234 spa_size = (1 << afu->native->spa_order) * PAGE_SIZE; in cxl_alloc_spa()
238 afu->native->spa_max_procs, afu->native->spa_size); in cxl_alloc_spa()
240 afu->num_procs = afu->native->spa_max_procs; in cxl_alloc_spa()
244 afu->native->spa_size = spa_size; in cxl_alloc_spa()
245 afu->native->spa_max_procs = spa_max_procs(afu->native->spa_size); in cxl_alloc_spa()
246 } while (afu->native->spa_max_procs < afu->num_procs); in cxl_alloc_spa()
248 if (!(afu->native->spa = (struct cxl_process_element *) in cxl_alloc_spa()
249 __get_free_pages(GFP_KERNEL | __GFP_ZERO, afu->native->spa_order))) { in cxl_alloc_spa()
254 1<<afu->native->spa_order, afu->native->spa_max_procs, afu->num_procs); in cxl_alloc_spa()
263 afu->native->sw_command_status = (__be64 *)((char *)afu->native->spa + in attach_spa()
264 ((afu->native->spa_max_procs + 3) * 128)); in attach_spa()
266 spap = virt_to_phys(afu->native->spa) & CXL_PSL_SPAP_Addr; in attach_spa()
267 spap |= ((afu->native->spa_size >> (12 - CXL_PSL_SPAP_Size_Shift)) - 1) & CXL_PSL_SPAP_Size; in attach_spa()
270 afu->native->spa, afu->native->spa_max_procs, in attach_spa()
271 afu->native->sw_command_status, spap); in attach_spa()
282 if (afu->native->spa) { in cxl_release_spa()
283 free_pages((unsigned long) afu->native->spa, in cxl_release_spa()
284 afu->native->spa_order); in cxl_release_spa()
285 afu->native->spa = NULL; in cxl_release_spa()
361 if (adapter->native->no_data_cache) { in cxl_data_cache_flush()
417 WARN_ON(!mutex_is_locked(&ctx->afu->native->spa_mutex)); in slb_invalid()
447 *(ctx->afu->native->sw_command_status) = cpu_to_be64(cmd | 0 | ctx->pe); in do_process_element_cmd()
461 state = be64_to_cpup(ctx->afu->native->sw_command_status); in do_process_element_cmd()
489 mutex_lock(&ctx->afu->native->spa_mutex); in add_process_element()
494 mutex_unlock(&ctx->afu->native->spa_mutex); in add_process_element()
506 mutex_lock(&ctx->afu->native->spa_mutex); in terminate_process_element()
517 mutex_unlock(&ctx->afu->native->spa_mutex); in terminate_process_element()
525 mutex_lock(&ctx->afu->native->spa_mutex); in remove_process_element()
539 mutex_unlock(&ctx->afu->native->spa_mutex); in remove_process_element()
551 (ctx->afu->native->pp_offset + ctx->afu->pp_size * ctx->pe); in cxl_assign_psn_space()
563 if (afu->native->spa == NULL) { in activate_afu_directed()
711 ctx->irqs.offset[0] = ctx->afu->native->psl_hwirq; in process_element_entry_psl9()
774 ctx->irqs.offset[0] = ctx->afu->native->psl_hwirq; in cxl_attach_afu_directed_psl8()
825 if (afu->adapter->native->sl_ops->needs_reset_before_disable) in deactivate_afu_directed()
845 if (afu->native->spa == NULL) { in cxl_activate_dedicated_process_psl9()
918 if (ctx->afu->adapter->native->sl_ops->update_dedicated_ivtes) in cxl_attach_dedicated_process_psl9()
919 afu->adapter->native->sl_ops->update_dedicated_ivtes(ctx); in cxl_attach_dedicated_process_psl9()
954 if (ctx->afu->adapter->native->sl_ops->update_dedicated_ivtes) in cxl_attach_dedicated_process_psl8()
955 afu->adapter->native->sl_ops->update_dedicated_ivtes(ctx); in cxl_attach_dedicated_process_psl8()
1006 (afu->adapter->native->sl_ops->activate_dedicated_process)) in native_afu_activate_mode()
1007 return afu->adapter->native->sl_ops->activate_dedicated_process(afu); in native_afu_activate_mode()
1022 (ctx->afu->adapter->native->sl_ops->attach_afu_directed)) in native_attach_process()
1023 return ctx->afu->adapter->native->sl_ops->attach_afu_directed(ctx, wed, amr); in native_attach_process()
1026 (ctx->afu->adapter->native->sl_ops->attach_dedicated_process)) in native_attach_process()
1027 return ctx->afu->adapter->native->sl_ops->attach_dedicated_process(ctx, wed, amr); in native_attach_process()
1061 (ctx->afu->adapter->native->sl_ops->update_dedicated_ivtes)) in native_update_ivtes()
1062 return ctx->afu->adapter->native->sl_ops->update_dedicated_ivtes(ctx); in native_update_ivtes()
1114 if (ctx->afu->adapter->native->sl_ops->register_serr_irq) { in cxl_native_irq_dump_regs_psl9()
1131 if (ctx->afu->adapter->native->sl_ops->register_serr_irq) { in cxl_native_irq_dump_regs_psl8()
1145 if (ctx->afu->adapter->native->sl_ops->psl_irq_dump_registers) in native_handle_psl_slice_error()
1146 ctx->afu->adapter->native->sl_ops->psl_irq_dump_registers(ctx); in native_handle_psl_slice_error()
1148 if (ctx->afu->adapter->native->sl_ops->debugfs_stop_trace) { in native_handle_psl_slice_error()
1150 ctx->afu->adapter->native->sl_ops->debugfs_stop_trace(ctx->afu->adapter); in native_handle_psl_slice_error()
1196 if (afu->adapter->native->sl_ops->fail_irq) in native_irq_multiplexed()
1197 return afu->adapter->native->sl_ops->fail_irq(afu, &irq_info); in native_irq_multiplexed()
1204 if (afu->adapter->native->sl_ops->handle_interrupt) in native_irq_multiplexed()
1205 ret = afu->adapter->native->sl_ops->handle_interrupt(irq, ctx, &irq_info); in native_irq_multiplexed()
1215 if (afu->adapter->native->sl_ops->fail_irq) in native_irq_multiplexed()
1216 ret = afu->adapter->native->sl_ops->fail_irq(afu, &irq_info); in native_irq_multiplexed()
1316 if (adapter->native->sl_ops->debugfs_stop_trace) { in native_irq_err()
1318 adapter->native->sl_ops->debugfs_stop_trace(adapter); in native_irq_err()
1321 if (adapter->native->sl_ops->err_irq_dump_registers) in native_irq_err()
1322 adapter->native->sl_ops->err_irq_dump_registers(adapter); in native_irq_err()
1337 &adapter->native->err_hwirq, in cxl_native_register_psl_err_irq()
1338 &adapter->native->err_virq, in cxl_native_register_psl_err_irq()
1345 cxl_p1_write(adapter, CXL_PSL_ErrIVTE, adapter->native->err_hwirq & 0xffff); in cxl_native_register_psl_err_irq()
1352 if (adapter->native->err_virq == 0 || in cxl_native_release_psl_err_irq()
1353 adapter->native->err_virq != in cxl_native_release_psl_err_irq()
1354 irq_find_mapping(NULL, adapter->native->err_hwirq)) in cxl_native_release_psl_err_irq()
1358 cxl_unmap_irq(adapter->native->err_virq, adapter); in cxl_native_release_psl_err_irq()
1359 cxl_ops->release_one_irq(adapter, adapter->native->err_hwirq); in cxl_native_release_psl_err_irq()
1361 adapter->native->err_virq = 0; in cxl_native_release_psl_err_irq()
1420 afu, &afu->native->psl_hwirq, &afu->native->psl_virq, in cxl_native_register_psl_irq()
1430 if (afu->native->psl_virq == 0 || in cxl_native_release_psl_irq()
1431 afu->native->psl_virq != in cxl_native_release_psl_irq()
1432 irq_find_mapping(NULL, afu->native->psl_hwirq)) in cxl_native_release_psl_irq()
1435 cxl_unmap_irq(afu->native->psl_virq, afu); in cxl_native_release_psl_irq()
1436 cxl_ops->release_one_irq(afu->adapter, afu->native->psl_hwirq); in cxl_native_release_psl_irq()
1438 afu->native->psl_virq = 0; in cxl_native_release_psl_irq()
1483 *out = in_le64(afu->native->afu_desc_mmio + afu->crs_offset + in native_afu_cr_read64()
1494 *out = in_le32(afu->native->afu_desc_mmio + afu->crs_offset + in native_afu_cr_read32()
1529 out_le32(afu->native->afu_desc_mmio + afu->crs_offset + in native_afu_cr_write32()