Lines Matching refs:native

227 	afu->native->spa_order = -1;  in cxl_alloc_spa()
229 afu->native->spa_order++; in cxl_alloc_spa()
230 spa_size = (1 << afu->native->spa_order) * PAGE_SIZE; in cxl_alloc_spa()
234 afu->native->spa_max_procs, afu->native->spa_size); in cxl_alloc_spa()
236 afu->num_procs = afu->native->spa_max_procs; in cxl_alloc_spa()
240 afu->native->spa_size = spa_size; in cxl_alloc_spa()
241 afu->native->spa_max_procs = spa_max_procs(afu->native->spa_size); in cxl_alloc_spa()
242 } while (afu->native->spa_max_procs < afu->num_procs); in cxl_alloc_spa()
244 if (!(afu->native->spa = (struct cxl_process_element *) in cxl_alloc_spa()
245 __get_free_pages(GFP_KERNEL | __GFP_ZERO, afu->native->spa_order))) { in cxl_alloc_spa()
250 1<<afu->native->spa_order, afu->native->spa_max_procs, afu->num_procs); in cxl_alloc_spa()
259 afu->native->sw_command_status = (__be64 *)((char *)afu->native->spa + in attach_spa()
260 ((afu->native->spa_max_procs + 3) * 128)); in attach_spa()
262 spap = virt_to_phys(afu->native->spa) & CXL_PSL_SPAP_Addr; in attach_spa()
263 spap |= ((afu->native->spa_size >> (12 - CXL_PSL_SPAP_Size_Shift)) - 1) & CXL_PSL_SPAP_Size; in attach_spa()
266 afu->native->spa, afu->native->spa_max_procs, in attach_spa()
267 afu->native->sw_command_status, spap); in attach_spa()
278 if (afu->native->spa) { in cxl_release_spa()
279 free_pages((unsigned long) afu->native->spa, in cxl_release_spa()
280 afu->native->spa_order); in cxl_release_spa()
281 afu->native->spa = NULL; in cxl_release_spa()
357 if (adapter->native->no_data_cache) { in cxl_data_cache_flush()
413 WARN_ON(!mutex_is_locked(&ctx->afu->native->spa_mutex)); in slb_invalid()
443 *(ctx->afu->native->sw_command_status) = cpu_to_be64(cmd | 0 | ctx->pe); in do_process_element_cmd()
457 state = be64_to_cpup(ctx->afu->native->sw_command_status); in do_process_element_cmd()
485 mutex_lock(&ctx->afu->native->spa_mutex); in add_process_element()
490 mutex_unlock(&ctx->afu->native->spa_mutex); in add_process_element()
502 mutex_lock(&ctx->afu->native->spa_mutex); in terminate_process_element()
513 mutex_unlock(&ctx->afu->native->spa_mutex); in terminate_process_element()
521 mutex_lock(&ctx->afu->native->spa_mutex); in remove_process_element()
535 mutex_unlock(&ctx->afu->native->spa_mutex); in remove_process_element()
547 (ctx->afu->native->pp_offset + ctx->afu->pp_size * ctx->pe); in cxl_assign_psn_space()
559 if (afu->native->spa == NULL) { in activate_afu_directed()
707 ctx->irqs.offset[0] = ctx->afu->native->psl_hwirq; in process_element_entry_psl9()
770 ctx->irqs.offset[0] = ctx->afu->native->psl_hwirq; in cxl_attach_afu_directed_psl8()
821 if (afu->adapter->native->sl_ops->needs_reset_before_disable) in deactivate_afu_directed()
841 if (afu->native->spa == NULL) { in cxl_activate_dedicated_process_psl9()
914 if (ctx->afu->adapter->native->sl_ops->update_dedicated_ivtes) in cxl_attach_dedicated_process_psl9()
915 afu->adapter->native->sl_ops->update_dedicated_ivtes(ctx); in cxl_attach_dedicated_process_psl9()
950 if (ctx->afu->adapter->native->sl_ops->update_dedicated_ivtes) in cxl_attach_dedicated_process_psl8()
951 afu->adapter->native->sl_ops->update_dedicated_ivtes(ctx); in cxl_attach_dedicated_process_psl8()
1002 (afu->adapter->native->sl_ops->activate_dedicated_process)) in native_afu_activate_mode()
1003 return afu->adapter->native->sl_ops->activate_dedicated_process(afu); in native_afu_activate_mode()
1018 (ctx->afu->adapter->native->sl_ops->attach_afu_directed)) in native_attach_process()
1019 return ctx->afu->adapter->native->sl_ops->attach_afu_directed(ctx, wed, amr); in native_attach_process()
1022 (ctx->afu->adapter->native->sl_ops->attach_dedicated_process)) in native_attach_process()
1023 return ctx->afu->adapter->native->sl_ops->attach_dedicated_process(ctx, wed, amr); in native_attach_process()
1057 (ctx->afu->adapter->native->sl_ops->update_dedicated_ivtes)) in native_update_ivtes()
1058 return ctx->afu->adapter->native->sl_ops->update_dedicated_ivtes(ctx); in native_update_ivtes()
1110 if (ctx->afu->adapter->native->sl_ops->register_serr_irq) { in cxl_native_irq_dump_regs_psl9()
1127 if (ctx->afu->adapter->native->sl_ops->register_serr_irq) { in cxl_native_irq_dump_regs_psl8()
1141 if (ctx->afu->adapter->native->sl_ops->psl_irq_dump_registers) in native_handle_psl_slice_error()
1142 ctx->afu->adapter->native->sl_ops->psl_irq_dump_registers(ctx); in native_handle_psl_slice_error()
1144 if (ctx->afu->adapter->native->sl_ops->debugfs_stop_trace) { in native_handle_psl_slice_error()
1146 ctx->afu->adapter->native->sl_ops->debugfs_stop_trace(ctx->afu->adapter); in native_handle_psl_slice_error()
1192 if (afu->adapter->native->sl_ops->fail_irq) in native_irq_multiplexed()
1193 return afu->adapter->native->sl_ops->fail_irq(afu, &irq_info); in native_irq_multiplexed()
1200 if (afu->adapter->native->sl_ops->handle_interrupt) in native_irq_multiplexed()
1201 ret = afu->adapter->native->sl_ops->handle_interrupt(irq, ctx, &irq_info); in native_irq_multiplexed()
1211 if (afu->adapter->native->sl_ops->fail_irq) in native_irq_multiplexed()
1212 ret = afu->adapter->native->sl_ops->fail_irq(afu, &irq_info); in native_irq_multiplexed()
1312 if (adapter->native->sl_ops->debugfs_stop_trace) { in native_irq_err()
1314 adapter->native->sl_ops->debugfs_stop_trace(adapter); in native_irq_err()
1317 if (adapter->native->sl_ops->err_irq_dump_registers) in native_irq_err()
1318 adapter->native->sl_ops->err_irq_dump_registers(adapter); in native_irq_err()
1333 &adapter->native->err_hwirq, in cxl_native_register_psl_err_irq()
1334 &adapter->native->err_virq, in cxl_native_register_psl_err_irq()
1341 cxl_p1_write(adapter, CXL_PSL_ErrIVTE, adapter->native->err_hwirq & 0xffff); in cxl_native_register_psl_err_irq()
1348 if (adapter->native->err_virq == 0 || in cxl_native_release_psl_err_irq()
1349 adapter->native->err_virq != in cxl_native_release_psl_err_irq()
1350 irq_find_mapping(NULL, adapter->native->err_hwirq)) in cxl_native_release_psl_err_irq()
1354 cxl_unmap_irq(adapter->native->err_virq, adapter); in cxl_native_release_psl_err_irq()
1355 cxl_ops->release_one_irq(adapter, adapter->native->err_hwirq); in cxl_native_release_psl_err_irq()
1357 adapter->native->err_virq = 0; in cxl_native_release_psl_err_irq()
1416 afu, &afu->native->psl_hwirq, &afu->native->psl_virq, in cxl_native_register_psl_irq()
1426 if (afu->native->psl_virq == 0 || in cxl_native_release_psl_irq()
1427 afu->native->psl_virq != in cxl_native_release_psl_irq()
1428 irq_find_mapping(NULL, afu->native->psl_hwirq)) in cxl_native_release_psl_irq()
1431 cxl_unmap_irq(afu->native->psl_virq, afu); in cxl_native_release_psl_irq()
1432 cxl_ops->release_one_irq(afu->adapter, afu->native->psl_hwirq); in cxl_native_release_psl_irq()
1434 afu->native->psl_virq = 0; in cxl_native_release_psl_irq()
1479 *out = in_le64(afu->native->afu_desc_mmio + afu->crs_offset + in native_afu_cr_read64()
1490 *out = in_le32(afu->native->afu_desc_mmio + afu->crs_offset + in native_afu_cr_read32()
1525 out_le32(afu->native->afu_desc_mmio + afu->crs_offset + in native_afu_cr_write32()