2N/A * The contents of this file are subject to the terms of the 2N/A * Common Development and Distribution License (the "License"). 2N/A * You may not use this file except in compliance with the License. 2N/A * See the License for the specific language governing permissions 2N/A * and limitations under the License. 2N/A * When distributing Covered Code, include this CDDL HEADER in each 2N/A * If applicable, add the following below this CDDL HEADER, with the 2N/A * fields enclosed by brackets "[]" replaced with your own identifying 2N/A * information: Portions Copyright [yyyy] [name of copyright owner] 2N/A * Copyright (c) 2008, 2011, Oracle and/or its affiliates. All rights reserved. 2N/A * Look for a symlink. On any error, fallback to 2N/A * driver and instance based logical ap_ids. 2N/A * Append the dynamic portion, if any. 2N/A * For a physical ap_id, look only at the base part. 2N/A * No ':' found, or got a '::'. If this is a physical 2N/A * ap_id, it must have a minor separtor ':' which must 2N/A * appear before the dynamic part (starting with '::'). 2N/A * i.e. up to the minor node name. 2N/A * Need to go to the end of the string before the :: if any 2N/A * If the string is null then we are done 2N/A * Save the component id. 2N/A * Get the operation target, e.g. slot0, slot0::cpu0. 2N/A * At this point, a->path points to the /devices path 2N/A * minus the dynamic part, for a physical ap_id. In 2N/A * the case of a logical ap_id, the target is already 2N/A * initialized above. 2N/A * Get the component unit number, if present. 2N/A * There must be no characters after the unit number. 2N/A * Disallow leading zeroes, e.g. cpu00, cpu01, cpu001. 2N/A * If there are 2 or more digits and the first is a zero, 2N/A if ((s-p) >=
2 && *p ==
'0') {
2N/A DBG(
"drv=<%s> inst=%d minor=<%s> ",
2N/A * The first set of commands in the table are in sequencing order, 2N/A * for example, the first group starts with assign and ends with 2N/A * configure. command sequencer relies on this ordering. 2N/A "notify add capacity",
2N/A "request delete capacity",
2N/A "notify capacity change",
2N/A * Command descriptor. 2N/A * Each command has a (command) mask specifying the AP target classes 2N/A * it operates on, e.g. the assign command applies only to boards. 2N/A * In addition each AP target class has a separate option mask specifying 2N/A * which command options are valid for that target class. 2N/A * A global value mask specifies which options require values. 2N/A * Command option definitions. 2N/A * cmd cmd board cpu mem io cmp 2N/A * cmask omask omask omask omask omask 2N/A * Global mask for options that require values. 2N/A dbg(
"%23s%5s%5s%9s%9s%9s%9s%9s\n",
2N/A "cmd",
"msk",
"none",
"brd",
"cpu",
"mem",
"io",
"cmp");
2N/A * Set default values. 2N/A * Check whether the option requires a value. 2N/A * Set the options's value. 2N/A * The skip value may be a ':' separated 2N/A * list of steps (commands) to be skipped 2N/A * during sequencing. 2N/A * Change a->statonly to 1, if the case is CMD_STATUS. We are only 2N/A * wanting to read the devices and no more 2N/A * Get the status for all components if either the list all 2N/A * the board. The latter is needed for the RCM interface. 2N/A * Get the target here in case it is a component in which 2N/A * case its type is known after the initialization. 2N/A DBG(
"cmd=%s(%d) tmask=0x%x cmask=0x%x omask=0x%x\n",
2N/A * Currently on x86 platforms, only limited cfgadm commands are exposed 2N/A * to end users, though all cfgadm commands are supported by underlying 2N/A * dr driver. If the special platform option "acpi-update-status" is 2N/A * absent, reject all hidden commands. 2N/A * This is a ugly hack, it should be removed in future releases.