Lines Matching refs:mp

44 #define	HAS_REDZONE(mp)	(((mp)->dmai_rflags & DDI_DMA_REDZONE) ? 1 : 0)  argument
97 #define MP_PFN0(mp) ((iopfn_t)(mp)->dmai_pfn0) argument
98 #define MP_HAT_CB_COOKIE(mp, i) ((i < PCI_DMA_HAT_NUM_CB_COOKIES)? \ argument
99 (((pci_dma_hdl_t *)(mp))->pdh_cbcookie[i]) : NULL)
100 #define MP_HAT_CB_COOKIE_PTR(mp, i) \ argument
102 &(((pci_dma_hdl_t *)(mp))->pdh_cbcookie[i]) : NULL)
103 #define WINLST(mp) ((pci_dma_win_t *)(mp)->dmai_winlst) argument
104 #define DEV_ATTR(mp) (&((pci_dma_hdl_t *)(mp))->pdh_attr_dev) argument
105 #define SYNC_BUF_PA(mp) (((pci_dma_hdl_t *)(mp))->pdh_sync_buf_pa) argument
136 #define HAS_NOFASTLIMIT(mp) ((mp)->dmai_flags & DMAI_FLAGS_NOFASTLIMIT) argument
137 #define HAS_NOSYSLIMIT(mp) ((mp)->dmai_flags & DMAI_FLAGS_NOSYSLIMIT) argument
138 #define PCI_DMA_ISPEERONLY(mp) ((mp)->dmai_flags & DMAI_FLAGS_PEER_ONLY) argument
139 #define PCI_DMA_ISPGPFN(mp) ((mp)->dmai_flags & DMAI_FLAGS_PGPFN) argument
140 #define PCI_DMA_TYPE(mp) ((mp)->dmai_flags & DMAI_FLAGS_DMA_TYPE) argument
141 #define PCI_DMA_ISDVMA(mp) (PCI_DMA_TYPE(mp) == DMAI_FLAGS_DVMA) argument
142 #define PCI_DMA_ISBYPASS(mp) (PCI_DMA_TYPE(mp) == DMAI_FLAGS_BYPASS) argument
143 #define PCI_DMA_ISPTP(mp) (PCI_DMA_TYPE(mp) == DMAI_FLAGS_PEER_TO_PEER) argument
144 #define PCI_DMA_CANFAST(mp) (((mp)->dmai_ndvmapages + HAS_REDZONE(mp) \ argument
145 <= pci_dvma_page_cache_clustsz) && HAS_NOFASTLIMIT(mp))
146 #define PCI_DMA_WINNPGS(mp) IOMMU_BTOP((mp)->dmai_winsize) argument
147 #define PCI_DMA_CANCACHE(mp) (!HAS_REDZONE(mp) && \ argument
148 (PCI_DMA_WINNPGS(mp) == 1) && HAS_NOSYSLIMIT(mp))
149 #define PCI_DMA_CANRELOC(mp) ((mp)->dmai_flags & DMAI_FLAGS_RELOC) argument
150 #define PCI_DMA_ISMAPPED(mp) ((mp)->dmai_flags & DMAI_FLAGS_MAPPED) argument
182 #define PCI_DMA_USECTX(mp) (!(mp->dmai_flags & DMAI_FLAGS_NOCTX)) argument
184 #define PCI_DMA_BYPASS_PREFIX(mp, pfn) \ argument
185 (PCI_DMA_ISBYPASS(mp) ? COMMON_IOMMU_BYPASS_BASE | \
190 #define PCI_DMA_CURWIN(mp) \ argument
191 (((mp)->dmai_offset + (mp)->dmai_roffset) / (mp)->dmai_winsize)
196 #define PCI_DVMA_FASTTRAK_PROF(mp) { \ argument
197 if ((mp->dmai_ndvmapages + HAS_REDZONE(mp)) > pci_dvma_page_cache_clustsz) \
199 else if (!HAS_NOFASTLIMIT(mp)) \
205 #define PCI_DVMA_FASTTRAK_PROF(mp) argument
222 ddi_dma_impl_t *mp; member
236 extern void pci_dma_freemp(ddi_dma_impl_t *mp);
237 extern void pci_dma_freepfn(ddi_dma_impl_t *mp);
240 extern int pci_dma_attr2hdl(pci_t *pci_p, ddi_dma_impl_t *mp);
242 extern int pci_dma_type(pci_t *pci_p, ddi_dma_req_t *req, ddi_dma_impl_t *mp);
243 extern int pci_dma_pfn(pci_t *pci_p, ddi_dma_req_t *req, ddi_dma_impl_t *mp);
244 extern int pci_dvma_win(pci_t *pci_p, ddi_dma_req_t *r, ddi_dma_impl_t *mp);
245 extern void pci_dma_freewin(ddi_dma_impl_t *mp);
246 extern int pci_dvma_map_fast(iommu_t *iommu_p, ddi_dma_impl_t *mp);
247 extern int pci_dvma_map(ddi_dma_impl_t *mp, ddi_dma_req_t *dmareq,
249 extern void pci_dvma_unmap(iommu_t *iommu_p, ddi_dma_impl_t *mp);
251 ddi_dma_impl_t *mp);
253 ddi_dma_impl_t *mp);
255 ddi_dma_impl_t *mp, enum ddi_dma_ctlops cmd, off_t *offp,
258 ddi_dma_impl_t *mp, enum ddi_dma_ctlops cmd, off_t *offp,
263 #define PCI_GET_MP_NCOOKIES(mp) ((mp)->dmai_ncookies) argument
264 #define PCI_SET_MP_NCOOKIES(mp, nc) ((mp)->dmai_ncookies = (nc)) argument
265 #define PCI_GET_MP_PFN1_ADDR(mp) (((iopfn_t *)(mp)->dmai_pfnlst) + 1) argument
270 #define PCI_SAVE_MP_TTE(mp, tte) \ argument
271 (mp)->dmai_tte = (caddr_t)(HI32(tte) | ((tte) & 0x12))
273 #define PCI_GET_MP_PFN1(mp, page_no) (((iopfn_t *)(mp)->dmai_pfnlst)[page_no]) argument
274 #define PCI_GET_MP_PFN(mp, page_no) ((mp)->dmai_ndvmapages == 1 ? \ argument
275 (iopfn_t)(mp)->dmai_pfnlst : PCI_GET_MP_PFN1(mp, page_no))
277 #define PCI_SET_MP_PFN(mp, page_no, pfn) { \ argument
278 if ((mp)->dmai_ndvmapages == 1) { \
279 ASSERT(!((page_no) || (mp)->dmai_pfnlst)); \
280 (mp)->dmai_pfnlst = (void *)(pfn); \
282 ((iopfn_t *)(mp)->dmai_pfnlst)[page_no] = (iopfn_t)(pfn); \
284 #define PCI_SET_MP_PFN1(mp, page_no, pfn) { \ argument
285 ((iopfn_t *)(mp)->dmai_pfnlst)[page_no] = (pfn); \
288 #define GET_TTE_TEMPLATE(mp) MAKE_TTE_TEMPLATE(PCI_GET_MP_PFN((mp), 0), (mp)) argument