Lines Matching defs:from
153 static int __init pcpu_cpu_distance(unsigned int from, unsigned int to)
155 return node_distance(early_cpu_to_node(from), early_cpu_to_node(to));
305 * numa_set_distance() - Set inter node NUMA distance from node to node.
306 * @from: the 'from' node to set distance
310 * Set the distance from node @from to @to to @distance.
313 * If @from or @to is higher than the highest known node or lower than zero
316 void __init numa_set_distance(int from, int to, int distance)
323 if (from >= numa_distance_cnt || to >= numa_distance_cnt ||
324 from < 0 || to < 0) {
325 pr_warn_once("Warning: node ids are out of bound, from=%d to=%d distance=%d\n",
326 from, to, distance);
331 (from == to && distance != LOCAL_DISTANCE)) {
332 pr_warn_once("Warning: invalid distance parameter, from=%d to=%d distance=%d\n",
333 from, to, distance);
337 numa_distance[from * numa_distance_cnt + to] = distance;
341 * Return NUMA distance @from to @to
343 int __node_distance(int from, int to)
345 if (from >= numa_distance_cnt || to >= numa_distance_cnt)
346 return from == to ? LOCAL_DISTANCE : REMOTE_DISTANCE;
347 return numa_distance[from * numa_distance_cnt + to];