Lines Matching defs:dip
36 /* 1 per IOMMU unit. There may be more than one per dip */
124 iommulib_nexus_register(dev_info_t *dip, iommulib_nexops_t *nexops,
128 int instance = ddi_get_instance(dip);
129 const char *driver = ddi_driver_name(dip);
130 dev_info_t *pdip = ddi_get_parent(dip);
141 if (dip != ddi_root_node() && (i_ddi_node_state(dip) < DS_PROBED ||
264 ndi_hold_devi(dip);
265 nexp->nex_dip = dip;
281 DEVI(dip)->devi_iommulib_handle = IOMMU_HANDLE_UNUSED;
283 DEVI(dip)->devi_iommulib_nex_handle = nexp;
289 "nexops=%p", f, driver, instance, ddi_node_name(dip),
300 dev_info_t *dip;
313 dip = nexp->nex_dip;
314 driver = ddi_driver_name(dip);
315 instance = ddi_get_instance(dip);
334 ddi_node_name(dip));
336 ndi_rele_devi(dip);
342 iommulib_iommu_register(dev_info_t *dip, iommulib_ops_t *ops,
347 int instance = ddi_get_instance(dip);
348 const char *driver = ddi_driver_name(dip);
458 ndi_hold_devi(dip);
459 unitp->ilu_dip = dip;
472 DEVI(dip)->devi_iommulib_handle = IOMMU_HANDLE_UNUSED;
494 dev_info_t *dip;
506 dip = unitp->ilu_dip;
507 driver = ddi_driver_name(dip);
508 instance = ddi_get_instance(dip);
541 ndi_rele_devi(dip);
547 iommulib_nex_open(dev_info_t *dip, dev_info_t *rdip)
554 ASSERT(DEVI(dip)->devi_iommulib_nex_handle != NULL);
565 * manner whether this dip is controlled by an IOMMU. If yes,
589 unitp->ilu_nex = DEVI(dip)->devi_iommulib_nex_handle;
595 atomic_inc_uint(&DEVI(dip)->devi_iommulib_nex_handle->nex_ref);
633 cmn_err(CE_NOTE, "%s: %s%d: closing IOMMU for dip (%p), "
641 iommulib_nexdma_allochdl(dev_info_t *dip, dev_info_t *rdip,
651 return (unitp->ilu_ops->ilops_dma_allochdl(handle, dip, rdip,
656 iommulib_nexdma_freehdl(dev_info_t *dip, dev_info_t *rdip,
666 error = unitp->ilu_ops->ilops_dma_freehdl(handle, dip,
673 iommulib_nexdma_bindhdl(dev_info_t *dip, dev_info_t *rdip,
683 return (unitp->ilu_ops->ilops_dma_bindhdl(handle, dip, rdip, dma_handle,
688 iommulib_nexdma_unbindhdl(dev_info_t *dip, dev_info_t *rdip,
697 return (unitp->ilu_ops->ilops_dma_unbindhdl(handle, dip, rdip,
702 iommulib_nexdma_sync(dev_info_t *dip, dev_info_t *rdip,
712 return (unitp->ilu_ops->ilops_dma_sync(handle, dip, rdip, dma_handle,
717 iommulib_nexdma_win(dev_info_t *dip, dev_info_t *rdip,
727 return (unitp->ilu_ops->ilops_dma_win(handle, dip, rdip, dma_handle,
732 iommulib_nexdma_mapobject(dev_info_t *dip, dev_info_t *rdip,
739 return (unitp->ilu_ops->ilops_dma_mapobject(handle, dip, rdip,
744 iommulib_nexdma_unmapobject(dev_info_t *dip, dev_info_t *rdip,
750 return (unitp->ilu_ops->ilops_dma_unmapobject(handle, dip, rdip,
756 iommulib_iommu_dma_allochdl(dev_info_t *dip, dev_info_t *rdip,
762 nexops = &DEVI(dip)->devi_iommulib_nex_handle->nex_ops;
763 return (nexops->nops_dma_allochdl(dip, rdip, attr, waitfp, arg,
768 iommulib_iommu_dma_freehdl(dev_info_t *dip, dev_info_t *rdip,
773 nexops = &DEVI(dip)->devi_iommulib_nex_handle->nex_ops;
775 return (nexops->nops_dma_freehdl(dip, rdip, handle));
779 iommulib_iommu_dma_bindhdl(dev_info_t *dip, dev_info_t *rdip,
785 nexops = &DEVI(dip)->devi_iommulib_nex_handle->nex_ops;
786 return (nexops->nops_dma_bindhdl(dip, rdip, handle, dmareq,
791 iommulib_iommu_dma_unbindhdl(dev_info_t *dip, dev_info_t *rdip,
796 nexops = &DEVI(dip)->devi_iommulib_nex_handle->nex_ops;
797 return (nexops->nops_dma_unbindhdl(dip, rdip, handle));
801 iommulib_iommu_dma_reset_cookies(dev_info_t *dip, ddi_dma_handle_t handle)
805 nexops = &DEVI(dip)->devi_iommulib_nex_handle->nex_ops;
806 nexops->nops_dma_reset_cookies(dip, handle);
810 iommulib_iommu_dma_get_cookies(dev_info_t *dip, ddi_dma_handle_t handle,
815 nexops = &DEVI(dip)->devi_iommulib_nex_handle->nex_ops;
816 return (nexops->nops_dma_get_cookies(dip, handle, cookiepp, ccountp));
820 iommulib_iommu_dma_set_cookies(dev_info_t *dip, ddi_dma_handle_t handle,
825 nexops = &DEVI(dip)->devi_iommulib_nex_handle->nex_ops;
826 return (nexops->nops_dma_set_cookies(dip, handle, cookiep, ccount));
830 iommulib_iommu_dma_clear_cookies(dev_info_t *dip, ddi_dma_handle_t handle)
834 nexops = &DEVI(dip)->devi_iommulib_nex_handle->nex_ops;
835 return (nexops->nops_dma_clear_cookies(dip, handle));
839 iommulib_iommu_dma_get_sleep_flags(dev_info_t *dip, ddi_dma_handle_t handle)
843 nexops = &DEVI(dip)->devi_iommulib_nex_handle->nex_ops;
848 iommulib_iommu_dma_sync(dev_info_t *dip, dev_info_t *rdip,
853 nexops = &DEVI(dip)->devi_iommulib_nex_handle->nex_ops;
854 return (nexops->nops_dma_sync(dip, rdip, handle, off, len,
859 iommulib_iommu_dma_win(dev_info_t *dip, dev_info_t *rdip,
865 nexops = &DEVI(dip)->devi_iommulib_nex_handle->nex_ops;
866 return (nexops->nops_dma_win(dip, rdip, handle, win, offp, lenp,
871 iommulib_iommu_dmahdl_setprivate(dev_info_t *dip, dev_info_t *rdip,
876 nexops = &DEVI(dip)->devi_iommulib_nex_handle->nex_ops;
877 return (nexops->nops_dmahdl_setprivate(dip, rdip, handle, priv));
881 iommulib_iommu_dmahdl_getprivate(dev_info_t *dip, dev_info_t *rdip,
886 nexops = &DEVI(dip)->devi_iommulib_nex_handle->nex_ops;
887 return (nexops->nops_dmahdl_getprivate(dip, rdip, handle));
915 dev_info_t *dip;
922 dip = unitp->ilu_dip;
923 ASSERT(dip);
924 ndi_hold_devi(dip);
927 return (dip);