Lines Matching defs:from
152 static int __init pcpu_cpu_distance(unsigned int from, unsigned int to)
154 return node_distance(early_cpu_to_node(from), early_cpu_to_node(to));
297 * numa_set_distance() - Set inter node NUMA distance from node to node.
298 * @from: the 'from' node to set distance
302 * Set the distance from node @from to @to to @distance.
305 * If @from or @to is higher than the highest known node or lower than zero
308 void __init numa_set_distance(int from, int to, int distance)
315 if (from >= numa_distance_cnt || to >= numa_distance_cnt ||
316 from < 0 || to < 0) {
317 pr_warn_once("Warning: node ids are out of bound, from=%d to=%d distance=%d\n",
318 from, to, distance);
323 (from == to && distance != LOCAL_DISTANCE)) {
324 pr_warn_once("Warning: invalid distance parameter, from=%d to=%d distance=%d\n",
325 from, to, distance);
329 numa_distance[from * numa_distance_cnt + to] = distance;
333 * Return NUMA distance @from to @to
335 int __node_distance(int from, int to)
337 if (from >= numa_distance_cnt || to >= numa_distance_cnt)
338 return from == to ? LOCAL_DISTANCE : REMOTE_DISTANCE;
339 return numa_distance[from * numa_distance_cnt + to];
448 pr_info("Failed to initialise from firmware\n");