Lines Matching full:native

89 #define AFUD_READ(afu, off)		in_be64(afu->native->afu_desc_mmio + off)
90 #define AFUD_READ_LE(afu, off) in_le64(afu->native->afu_desc_mmio + off)
544 adapter->native->no_data_cache = true; in init_implementation_adapter_regs_psl9()
627 if (adapter->native->sl_ops->write_timebase_ctrl) in cxl_setup_psl_timebase()
628 adapter->native->sl_ops->write_timebase_ctrl(adapter); in cxl_setup_psl_timebase()
790 afu->psn_phys = p2_base(dev) + (adapter->native->ps_off + (afu->slice * adapter->ps_size)); in pci_map_slice_regs()
791 …afu_desc = p2_base(dev) + adapter->native->afu_desc_off + (afu->slice * adapter->native->afu_desc_… in pci_map_slice_regs()
793 if (!(afu->native->p1n_mmio = ioremap(p1n_base, p1n_size))) in pci_map_slice_regs()
798 if (!(afu->native->afu_desc_mmio = ioremap(afu_desc, adapter->native->afu_desc_size))) in pci_map_slice_regs()
806 iounmap(afu->native->p1n_mmio); in pci_map_slice_regs()
818 if (afu->native->p1n_mmio) { in pci_unmap_slice_regs()
819 iounmap(afu->native->p1n_mmio); in pci_unmap_slice_regs()
820 afu->native->p1n_mmio = NULL; in pci_unmap_slice_regs()
822 if (afu->native->afu_desc_mmio) { in pci_unmap_slice_regs()
823 iounmap(afu->native->afu_desc_mmio); in pci_unmap_slice_regs()
824 afu->native->afu_desc_mmio = NULL; in pci_unmap_slice_regs()
837 kfree(afu->native); in cxl_pci_release_afu()
862 afu->native->pp_offset = AFUD_READ_PPPSA_OFF(afu); in cxl_read_afu_descriptor()
893 (afu->native->pp_offset + afu->pp_size*afu->max_procs_virtualised)) { in cxl_afu_descriptor_looks_ok()
956 if (afu->adapter->native->sl_ops->register_serr_irq) { in sanitise_afu_regs_psl9()
1011 if (afu->adapter->native->sl_ops->register_serr_irq) { in sanitise_afu_regs_psl8()
1041 const void __iomem *ebuf = afu->native->afu_desc_mmio + afu->eb_offset; in cxl_pci_afu_read_err_buffer()
1079 if (adapter->native->sl_ops->sanitise_afu_regs) { in pci_configure_afu()
1080 rc = adapter->native->sl_ops->sanitise_afu_regs(afu); in pci_configure_afu()
1098 if (adapter->native->sl_ops->afu_regs_init) in pci_configure_afu()
1099 if ((rc = adapter->native->sl_ops->afu_regs_init(afu))) in pci_configure_afu()
1102 if (adapter->native->sl_ops->register_serr_irq) in pci_configure_afu()
1103 if ((rc = adapter->native->sl_ops->register_serr_irq(afu))) in pci_configure_afu()
1113 if (adapter->native->sl_ops->release_serr_irq) in pci_configure_afu()
1114 adapter->native->sl_ops->release_serr_irq(afu); in pci_configure_afu()
1131 if (afu->adapter->native->sl_ops->release_serr_irq) in pci_deconfigure_afu()
1132 afu->adapter->native->sl_ops->release_serr_irq(afu); in pci_deconfigure_afu()
1145 afu->native = kzalloc(sizeof(struct cxl_afu_native), GFP_KERNEL); in pci_init_afu()
1146 if (!afu->native) in pci_init_afu()
1149 mutex_init(&afu->native->spa_mutex); in pci_init_afu()
1186 kfree(afu->native); in pci_init_afu()
1254 if (!(adapter->native->p1_mmio = ioremap(p1_base(dev), p1_size(dev)))) in cxl_map_adapter_regs()
1257 if (!(adapter->native->p2_mmio = ioremap(p2_base(dev), p2_size(dev)))) in cxl_map_adapter_regs()
1263 iounmap(adapter->native->p1_mmio); in cxl_map_adapter_regs()
1264 adapter->native->p1_mmio = NULL; in cxl_map_adapter_regs()
1275 if (adapter->native->p1_mmio) { in cxl_unmap_adapter_regs()
1276 iounmap(adapter->native->p1_mmio); in cxl_unmap_adapter_regs()
1277 adapter->native->p1_mmio = NULL; in cxl_unmap_adapter_regs()
1280 if (adapter->native->p2_mmio) { in cxl_unmap_adapter_regs()
1281 iounmap(adapter->native->p2_mmio); in cxl_unmap_adapter_regs()
1282 adapter->native->p2_mmio = NULL; in cxl_unmap_adapter_regs()
1324 adapter->native->ps_off = ps_off * 64 * 1024; in cxl_read_vsec()
1326 adapter->native->afu_desc_off = afu_desc_off * 64 * 1024; in cxl_read_vsec()
1327 adapter->native->afu_desc_size = afu_desc_size * 64 * 1024; in cxl_read_vsec()
1395 if (!adapter->native->afu_desc_off || !adapter->native->afu_desc_size) { in cxl_vsec_looks_ok()
1400 if (adapter->ps_size > p2_size(dev) - adapter->native->ps_off) { in cxl_vsec_looks_ok()
1403 adapter->ps_size, p2_size(dev) - adapter->native->ps_off); in cxl_vsec_looks_ok()
1423 kfree(adapter->native); in cxl_release_adapter()
1436 if (adapter->native->sl_ops->invalidate_all) { in sanitise_adapter_regs()
1440 rc = adapter->native->sl_ops->invalidate_all(adapter); in sanitise_adapter_regs()
1486 if ((rc = adapter->native->sl_ops->adapter_regs_init(adapter, dev))) in cxl_configure_adapter()
1501 if ((rc = pnv_phb_to_cxl_mode(dev, adapter->native->sl_ops->capi_mode))) in cxl_configure_adapter()
1625 adapter->native->sl_ops = &psl8_ops; in set_sl_ops()
1628 adapter->native->sl_ops = &psl9_ops; in set_sl_ops()
1642 adapter->native = kzalloc(sizeof(struct cxl_native), GFP_KERNEL); in cxl_pci_init_adapter()
1643 if (!adapter->native) { in cxl_pci_init_adapter()