/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License (the "License").
* You may not use this file except in compliance with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* See the License for the specific language governing permissions
* and limitations under the License.
*
* When distributing Covered Code, include this CDDL HEADER in each
* file and include the License file at usr/src/OPENSOLARIS.LICENSE.
* If applicable, add the following below this CDDL HEADER, with the
* fields enclosed by brackets "[]" replaced with your own identifying
* information: Portions Copyright [yyyy] [name of copyright owner]
*
* CDDL HEADER END
*/
/*
*/
#include <strings.h>
#include <string.h>
#include <libnvpair.h>
#include <fm/topo_mod.h>
#include <fm/fmd_fmri.h>
#include <fm/fmd_agent.h>
struct cpu_walk_data {
};
static topo_method_f
cpu_retire },
cpu_unretire },
{ NULL }
};
cpu_retire },
cpu_unretire },
{ NULL }
};
cpu_retire },
cpu_unretire },
{ NULL }
};
{ NULL }
};
#pragma init(pi_ldom_init)
static void
pi_ldom_init(void)
{
}
#pragma fini(pi_ldom_fini)
static void
pi_ldom_fini(void)
{
}
static int
{
}
return (0);
}
/*
* For each visited cpu node, call the callback function with its ASRU.
*/
static int
{
/*
* Terminate the walk if we reach start-node's sibling
*/
return (TOPO_WALK_TERMINATE);
/*
* Stop walking if the online strand has been found.
*/
return (TOPO_WALK_TERMINATE);
return (TOPO_WALK_NEXT);
return (TOPO_WALK_NEXT);
}
/*
* The "offline" and "online" counter are only useful for the "status"
* callback.
*/
err = 0;
return (TOPO_WALK_TERMINATE);
}
}
err = 0;
} else {
}
/* dump out status info if debug is turned on. */
const char *op;
op = "retire";
op = "unretire";
op = "check status";
else
op = "unknown op";
}
return (TOPO_WALK_NEXT);
}
static int
{
int err;
/*
* Return failure if ldom service is not initialized.
*/
return (0);
}
return (-1);
return (-1);
return (0);
}
static int
{
PI_WALK_FIND_ONLINE) == 0 &&
return (0);
}
return (-1);
}
static boolean_t
{
&cache) == 0 ||
&cache) == 0)
return (B_TRUE);
}
return (B_FALSE);
}
static int
{
int rc;
return (-1);
return (-1);
}
int
{
if (version > TOPO_METH_RETIRE_VERSION)
if (is_cacheline_fmri(in))
return (-1);
}
static int
{
int rc;
return (-1);
return (-1);
}
int
{
if (is_cacheline_fmri(in))
return (-1);
}
static int
{
int rc;
return (-1);
return (-1);
}
int
{
if (is_cacheline_fmri(in))
return (-1);
else
}
static nvlist_t *
{
int err;
return (NULL);
&serial, 1);
if (err != 0) {
return (NULL);
}
return (fmri);
}
/* Topo Methods */
static int
{
int err;
/*
* Simply set ASRU to the input argument. This will make resource
* itself be used as ASRU for chip, core, and cache line.
*/
}
if (err != 0) {
nvlist_free(*out);
}
return (0);
}
static int
{
int err;
&serial);
&serial);
err = 0;
/*
* For a memory page, 'in' includes an hc-specific member which
*/
FM_FMRI_HC_SPECIFIC, &hcsp) == 0) {
if (nvlist_lookup_uint64(hcsp,
FM_FMRI_HC_SPECIFIC_PHYSADDR, &pa) == 0)
pa);
if (nvlist_lookup_uint64(hcsp,
FM_FMRI_HC_SPECIFIC_OFFSET, &offset) == 0)
offset);
}
}
if (err != 0) {
nvlist_free(*out);
}
return (0);
}
static boolean_t
{
&val) == 0 ||
&val) == 0 ||
&val) == 0 ||
&val) == 0))
return (B_TRUE);
return (B_FALSE);
}
static int
{
int err;
}
}
static int
{
int err;
if (version > TOPO_METH_RETIRE_VERSION)
}
}
static int
{
int err;
}
}