/*
* 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
*/
/*
* Copyright 2008 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
#include <cma.h>
#include <fm/fmd_fmri.h>
#include <assert.h>
#include <fcntl.h>
#include <unistd.h>
#include <errno.h>
#include <strings.h>
#include <sys/processor.h>
extern ldom_hdl_t *cma_lhp;
/*ARGSUSED*/
int
{
if (repair)
else
}
int
{
/*
* Some platforms have special unums for the E$ DIMMs. If we're dealing
* with a platform that has these unums, one will have been added to the
* fault as the resource. We'll use that for the blacklisting. If we
* can't find a resource, we'll fall back to the ASRU.
*/
return (-1);
}
return (0);
}
/*ARGSUSED*/
static int
{
int rc = 0;
char *scheme;
/*
* We're using topo retire if the fmri is in "hc" scheme.
*/
return (-1);
}
switch (rc) {
return (P_FAULTED);
case -1:
return (-1);
default:
return (P_ONLINE);
}
}
case P_STATUS:
break;
case P_FAULTED:
break;
case P_ONLINE:
break;
default:
return (-1);
}
return (-1);
}
return (rc);
}
void
{
char *scheme;
int err;
return;
return;
return;
} else {
/* lookup cpuid from ASRU */
}
return;
}
}
/*
* check to see if the cpu has been offline.
*/
/*
* Create a cpu node and add to the head of the cpu list
*/
if (cma.cma_cpu_timerid != 0)
}
int
{
int i;
return (CMA_RA_FAILURE);
}
/*
* cpu offlining using ldom_fmri_retire() may be asynchronous, so we
* have to set the timer and check the cpu status later.
*/
for (i = 0; i < cma.cma_cpu_tries;
if (repair)
else
break;
}
}
if (i >= cma.cma_cpu_tries) {
}
return (CMA_RA_FAILURE);
}
static int
{
int rc = 0;
return (1);
}
return (1);
}
return (1); /* success */
}
if (rc == -1) {
return (1); /* give up */
}
return (0);
}
static void
{
}
void
{
cma.cma_cpu_timerid = 0;
/*
* Successful retry or we're giving up - remove from
* the list
*/
} else {
cpu->cpu_nretries++;
}
}
return; /* no more cpus */
/*
* We still have cpus to check. Back the delay
* off, and schedule a retry.
*/
}
void
{
}
}