Lines Matching full:distance
539 * Calculate the P2PDMA mapping type and distance between two PCI devices.
542 * PCI_P2PDMA_MAP_BUS_ADDR and a distance of 0.
545 * PCI_P2PDMA_MAP_BUS_ADDR and a distance of 2 (one hop up to the bridge,
549 * return a distance of 4. This corresponds to the following PCI tree:
558 * The distance is 4 because we traverse from Device A to Downstream Port 0
570 * PCI_P2PDMA_MAP_THRU_HOST_BRIDGE with the distance set to the number of
670 * pci_p2pdma_distance_many - Determine the cumulative distance between
693 int i, distance; in pci_p2pdma_distance_many() local
707 map = calc_map_type_and_dist(provider, pci_client, &distance, in pci_p2pdma_distance_many()
718 total_dist += distance; in pci_p2pdma_distance_many()
748 * the specified list of clients and shortest distance
756 * distance away, one will be chosen at random.
765 int distance; in pci_p2pmem_find_many() local
780 distance = pci_p2pdma_distance_many(pdev, clients, in pci_p2pmem_find_many()
782 if (distance < 0 || distance > closest_distance) in pci_p2pmem_find_many()
785 if (distance == closest_distance && dev_cnt >= max_devs) in pci_p2pmem_find_many()
788 if (distance < closest_distance) { in pci_p2pmem_find_many()
793 closest_distance = distance; in pci_p2pmem_find_many()