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

Function dmar_dev_depth

freebsd/x86/iommu/intel_drv.c:610–626  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

608}
609
610int
611dmar_dev_depth(device_t child)
612{
613 devclass_t pci_class;
614 device_t bus, pcib;
615 int depth;
616
617 pci_class = devclass_find("pci");
618 for (depth = 1; ; depth++) {
619 bus = device_get_parent(child);
620 pcib = device_get_parent(bus);
621 if (device_get_devclass(device_get_parent(pcib)) !=
622 pci_class)
623 return (depth);
624 child = pcib;
625 }
626}
627
628void
629dmar_dev_path(device_t child, int *busno, void *path1, int depth)

Callers 2

dmar_get_ctx_for_devFunction · 0.85
dmar_findFunction · 0.85

Calls 3

devclass_findFunction · 0.85
device_get_parentFunction · 0.85
device_get_devclassFunction · 0.85

Tested by

no test coverage detected