Lines Matching refs:mock
151 struct mock_iommu_domain *mock;
159 mock = kzalloc(sizeof(*mock), GFP_KERNEL);
160 if (!mock)
162 mock->domain.geometry.aperture_start = MOCK_APERTURE_START;
163 mock->domain.geometry.aperture_end = MOCK_APERTURE_LAST;
164 mock->domain.pgsize_bitmap = MOCK_IO_PAGE_SIZE;
165 xa_init(&mock->pfns);
166 return &mock->domain;
171 struct mock_iommu_domain *mock =
174 WARN_ON(!xa_empty(&mock->pfns));
175 kfree(mock);
183 struct mock_iommu_domain *mock =
205 old = xa_store(&mock->pfns, iova / MOCK_IO_PAGE_SIZE,
212 xa_erase(&mock->pfns,
232 struct mock_iommu_domain *mock =
245 ent = xa_erase(&mock->pfns, iova / MOCK_IO_PAGE_SIZE);
274 struct mock_iommu_domain *mock =
279 ent = xa_load(&mock->pfns, iova / MOCK_IO_PAGE_SIZE);
292 * mock doesn't setup default domains because we can't hook into the
326 struct mock_iommu_domain **mock)
340 *mock = container_of(hwpt->domain, struct mock_iommu_domain, domain);
403 /* Create an hw_pagetable with the mock domain so we can test the domain ops */
459 /* Replace the mock domain with a manually allocated hw_pagetable */
519 struct mock_iommu_domain *mock;
528 hwpt = get_md_pagetable(ucmd, mockpt_id, &mock);
551 ent = xa_load(&mock->pfns, iova / MOCK_IO_PAGE_SIZE);