void cxl_unmap_afu_irq(struct cxl_context *ctx, int num, void *cookie) { irq_hw_number_t hwirq; unsigned int virq; hwirq = cxl_find_afu_irq(ctx, num); if (!hwirq) return; virq = irq_find_mapping(NULL, hwirq); if (virq) cxl_unmap_irq(virq, cookie); }
void cxl_free_afu_irqs(struct cxl_context *ctx) { irq_hw_number_t hwirq; unsigned int virq; if (!cpu_has_feature(CPU_FTR_HVMODE)) { hwirq = cxl_find_afu_irq(ctx, 0); if (hwirq) { virq = irq_find_mapping(NULL, hwirq); if (virq) cxl_unmap_irq(virq, ctx); } } afu_irq_name_free(ctx); cxl_ops->release_irq_ranges(&ctx->irqs, ctx->afu->adapter); }
void afu_release_irqs(struct cxl_context *ctx) { irq_hw_number_t hwirq; unsigned int virq; int r, i; for (r = 1; r < CXL_IRQ_RANGES; r++) { hwirq = ctx->irqs.offset[r]; for (i = 0; i < ctx->irqs.range[r]; hwirq++, i++) { virq = irq_find_mapping(NULL, hwirq); if (virq) cxl_unmap_irq(virq, ctx); } } cxl_release_irq_ranges(&ctx->irqs, ctx->afu->adapter); }
void cxl_release_psl_irq(struct cxl_afu *afu) { cxl_unmap_irq(afu->psl_virq, afu); cxl_release_one_irq(afu->adapter, afu->psl_hwirq); }
void cxl_release_serr_irq(struct cxl_afu *afu) { cxl_p1n_write(afu, CXL_PSL_SERR_An, 0x0000000000000000); cxl_unmap_irq(afu->serr_virq, afu); cxl_release_one_irq(afu->adapter, afu->serr_hwirq); }
void cxl_release_psl_err_irq(struct cxl *adapter) { cxl_p1_write(adapter, CXL_PSL_ErrIVTE, 0x0000000000000000); cxl_unmap_irq(adapter->err_virq, adapter); cxl_release_one_irq(adapter, adapter->err_hwirq); }