Lines Matching full:distance
414 * Calculate the P2PDMA mapping type and distance between two PCI devices.
417 * PCI_P2PDMA_MAP_BUS_ADDR and a distance of 0.
420 * PCI_P2PDMA_MAP_BUS_ADDR and a distance of 2 (one hop up to the bridge,
424 * return a distance of 4. This corresponds to the following PCI tree:
433 * The distance is 4 because we traverse from Device A to Downstream Port 0
445 * PCI_P2PDMA_MAP_THRU_HOST_BRIDGE with the distance set to the number of
545 * pci_p2pdma_distance_many - Determine the cumulative distance between
568 int i, distance; in pci_p2pdma_distance_many() local
582 map = calc_map_type_and_dist(provider, pci_client, &distance, in pci_p2pdma_distance_many()
593 total_dist += distance; in pci_p2pdma_distance_many()
623 * the specified list of clients and shortest distance (as determined
632 * distance away, one will be chosen at random.
641 int distance; in pci_p2pmem_find_many() local
656 distance = pci_p2pdma_distance_many(pdev, clients, in pci_p2pmem_find_many()
658 if (distance < 0 || distance > closest_distance) in pci_p2pmem_find_many()
661 if (distance == closest_distance && dev_cnt >= max_devs) in pci_p2pmem_find_many()
664 if (distance < closest_distance) { in pci_p2pmem_find_many()
669 closest_distance = distance; in pci_p2pmem_find_many()