MCPcopy Create free account
hub / github.com/F-Stack/f-stack / dmar_release_resources

Function dmar_release_resources

freebsd/x86/iommu/intel_drv.c:247–273  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

245}
246
247static void
248dmar_release_resources(device_t dev, struct dmar_unit *unit)
249{
250 int i;
251
252 iommu_fini_busdma(&unit->iommu);
253 dmar_fini_irt(unit);
254 dmar_fini_qi(unit);
255 dmar_fini_fault_log(unit);
256 for (i = 0; i < DMAR_INTR_TOTAL; i++)
257 dmar_release_intr(dev, unit, i);
258 if (unit->regs != NULL) {
259 bus_deactivate_resource(dev, SYS_RES_MEMORY, unit->reg_rid,
260 unit->regs);
261 bus_release_resource(dev, SYS_RES_MEMORY, unit->reg_rid,
262 unit->regs);
263 unit->regs = NULL;
264 }
265 if (unit->domids != NULL) {
266 delete_unrhdr(unit->domids);
267 unit->domids = NULL;
268 }
269 if (unit->ctx_obj != NULL) {
270 vm_object_deallocate(unit->ctx_obj);
271 unit->ctx_obj = NULL;
272 }
273}
274
275static int
276dmar_alloc_irq(device_t dev, struct dmar_unit *unit, int idx)

Callers 1

dmar_attachFunction · 0.85

Calls 8

dmar_fini_irtFunction · 0.85
dmar_fini_qiFunction · 0.85
dmar_fini_fault_logFunction · 0.85
dmar_release_intrFunction · 0.85
bus_deactivate_resourceFunction · 0.85
bus_release_resourceFunction · 0.85
delete_unrhdrFunction · 0.85
vm_object_deallocateFunction · 0.85

Tested by

no test coverage detected