Lines Matching refs:ops
57 static const struct iommu_ops *ops; variable
66 if (ops != NULL) in IOMMU_INIT()
67 return ((*ops->init)()); in IOMMU_INIT()
75 if (ops != NULL && iommu_avail) in IOMMU_CLEANUP()
76 (*ops->cleanup)(); in IOMMU_CLEANUP()
83 if (ops != NULL && iommu_avail) in IOMMU_CREATE_DOMAIN()
84 return ((*ops->create_domain)(maxaddr)); in IOMMU_CREATE_DOMAIN()
93 if (ops != NULL && iommu_avail) in IOMMU_DESTROY_DOMAIN()
94 (*ops->destroy_domain)(dom); in IOMMU_DESTROY_DOMAIN()
102 if (ops != NULL && iommu_avail) in IOMMU_CREATE_MAPPING()
103 return ((*ops->create_mapping)(domain, gpa, hpa, len, res_len)); in IOMMU_CREATE_MAPPING()
112 if (ops != NULL && iommu_avail) in IOMMU_REMOVE_MAPPING()
113 return ((*ops->remove_mapping)(domain, gpa, len, res_len)); in IOMMU_REMOVE_MAPPING()
121 if (ops != NULL && iommu_avail) in IOMMU_ADD_DEVICE()
122 return ((*ops->add_device)(domain, dev, rid)); in IOMMU_ADD_DEVICE()
130 if (ops != NULL && iommu_avail) in IOMMU_REMOVE_DEVICE()
131 return ((*ops->remove_device)(domain, dev, rid)); in IOMMU_REMOVE_DEVICE()
139 if (ops != NULL && iommu_avail) in IOMMU_INVALIDATE_TLB()
140 return ((*ops->invalidate_tlb)(domain)); in IOMMU_INVALIDATE_TLB()
148 if (ops != NULL && iommu_avail) in IOMMU_ENABLE()
149 (*ops->enable)(); in IOMMU_ENABLE()
156 if (ops != NULL && iommu_avail) in IOMMU_DISABLE()
157 (*ops->disable)(); in IOMMU_DISABLE()
187 ops = &iommu_ops_intel; in iommu_init()
189 ops = &iommu_ops_amd; in iommu_init()
191 ops = NULL; in iommu_init()
207 ops = NULL; in iommu_init()