1ae0874509b6811fdde1dfd46f0d93fd09867a3fheppo * CDDL HEADER START
1ae0874509b6811fdde1dfd46f0d93fd09867a3fheppo * The contents of this file are subject to the terms of the
1ae0874509b6811fdde1dfd46f0d93fd09867a3fheppo * Common Development and Distribution License (the "License").
1ae0874509b6811fdde1dfd46f0d93fd09867a3fheppo * You may not use this file except in compliance with the License.
1ae0874509b6811fdde1dfd46f0d93fd09867a3fheppo * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
1ae0874509b6811fdde1dfd46f0d93fd09867a3fheppo * See the License for the specific language governing permissions
1ae0874509b6811fdde1dfd46f0d93fd09867a3fheppo * and limitations under the License.
1ae0874509b6811fdde1dfd46f0d93fd09867a3fheppo * When distributing Covered Code, include this CDDL HEADER in each
1ae0874509b6811fdde1dfd46f0d93fd09867a3fheppo * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
1ae0874509b6811fdde1dfd46f0d93fd09867a3fheppo * If applicable, add the following below this CDDL HEADER, with the
1ae0874509b6811fdde1dfd46f0d93fd09867a3fheppo * fields enclosed by brackets "[]" replaced with your own identifying
1ae0874509b6811fdde1dfd46f0d93fd09867a3fheppo * information: Portions Copyright [yyyy] [name of copyright owner]
1ae0874509b6811fdde1dfd46f0d93fd09867a3fheppo * CDDL HEADER END
b5353d912e615fb002628d16835832e79668c442Abhinandan Ekande * Copyright 2008 Sun Microsystems, Inc. All rights reserved.
1ae0874509b6811fdde1dfd46f0d93fd09867a3fheppo * Use is subject to license terms.
1ae0874509b6811fdde1dfd46f0d93fd09867a3fheppo * Routines for walking the PROMs devinfo tree
1ae0874509b6811fdde1dfd46f0d93fd09867a3fheppo /* only supports known nodes */
1ae0874509b6811fdde1dfd46f0d93fd09867a3fheppo return (0);
b5353d912e615fb002628d16835832e79668c442Abhinandan Ekande * We are passing the cpu pointer (CPU->cpu_id) explicitly to
b5353d912e615fb002628d16835832e79668c442Abhinandan Ekande * thread_affinity_set() so that we don't attempt to grab the
b5353d912e615fb002628d16835832e79668c442Abhinandan Ekande * cpu_lock internally in thread_affinity_set() and may sleep
b5353d912e615fb002628d16835832e79668c442Abhinandan Ekande * as a result.
b5353d912e615fb002628d16835832e79668c442Abhinandan Ekande * It is safe to pass CPU->cpu_id and it will always be valid.
b5353d912e615fb002628d16835832e79668c442Abhinandan Ekande thread_affinity_set(curthread, CPU->cpu_id);
1ae0874509b6811fdde1dfd46f0d93fd09867a3fheppo return (0);
1ae0874509b6811fdde1dfd46f0d93fd09867a3fheppo next = promif_stree_nextnode(p1275_cell2dnode(ci[3]));
1ae0874509b6811fdde1dfd46f0d93fd09867a3fheppo return (0);
1ae0874509b6811fdde1dfd46f0d93fd09867a3fheppo child = promif_stree_childnode(p1275_cell2dnode(ci[3]));
1ae0874509b6811fdde1dfd46f0d93fd09867a3fheppo return (0);
1ae0874509b6811fdde1dfd46f0d93fd09867a3fheppo parent = promif_stree_parentnode(p1275_cell2dnode(ci[3]));
1ae0874509b6811fdde1dfd46f0d93fd09867a3fheppo return (0);
1ae0874509b6811fdde1dfd46f0d93fd09867a3fheppo * Get a token from a prom pathname, collecting everything
1ae0874509b6811fdde1dfd46f0d93fd09867a3fheppo * until a non-comma, non-colon separator is found. Any
1ae0874509b6811fdde1dfd46f0d93fd09867a3fheppo * options, including the ':' option separator, on the end
1ae0874509b6811fdde1dfd46f0d93fd09867a3fheppo * of the token are removed.
1ae0874509b6811fdde1dfd46f0d93fd09867a3fheppostatic char *
1ae0874509b6811fdde1dfd46f0d93fd09867a3fheppo /* strip off any options from the token */
1ae0874509b6811fdde1dfd46f0d93fd09867a3fheppo * Retrieve the unit address for a node by looking it up
1ae0874509b6811fdde1dfd46f0d93fd09867a3fheppo * in the corresponding dip. -1 is returned if no unit
1ae0874509b6811fdde1dfd46f0d93fd09867a3fheppo * address can be determined.
1ae0874509b6811fdde1dfd46f0d93fd09867a3fheppo return (-1);
1ae0874509b6811fdde1dfd46f0d93fd09867a3fheppo return (-1);
1ae0874509b6811fdde1dfd46f0d93fd09867a3fheppo return (0);
1ae0874509b6811fdde1dfd46f0d93fd09867a3fheppo * Get node id of node in prom tree that path identifies
1ae0874509b6811fdde1dfd46f0d93fd09867a3fheppo /* must be a fully specified path */
1ae0874509b6811fdde1dfd46f0d93fd09867a3fheppo /* get the name from the path */
1ae0874509b6811fdde1dfd46f0d93fd09867a3fheppo /* get the address from the path */
1ae0874509b6811fdde1dfd46f0d93fd09867a3fheppo /* get the name from the current node */
1ae0874509b6811fdde1dfd46f0d93fd09867a3fheppo /* get the address from the current node */
1ae0874509b6811fdde1dfd46f0d93fd09867a3fheppo /* compare the names and addresses */
1ae0874509b6811fdde1dfd46f0d93fd09867a3fheppo /* path does not map to a node */
1ae0874509b6811fdde1dfd46f0d93fd09867a3fheppo /* found a matching node */
1ae0874509b6811fdde1dfd46f0d93fd09867a3fheppo * Continue the loop with the
1ae0874509b6811fdde1dfd46f0d93fd09867a3fheppo * next component of the path.