cma_main.c revision 9ee0dd10a0351d0f2cb5138380ec1017c92bdd4f
/*
* 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 2006 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
#pragma ident "%Z%%M% %I% %E% SMI"
#include <cma.h>
#include <strings.h>
#include <errno.h>
#include <time.h>
cma_stats_t cma_stats = {
};
typedef struct cma_subscriber {
const char *subr_class;
const char *subr_sname;
static const cma_subscriber_t cma_subrs[] = {
NULL },
NULL },
NULL },
NULL },
NULL },
NULL },
/*
* The following ultraSPARC-T1 faults do NOT retire a cpu thread,
* and therefore must be intercepted before
* the default "fault.cpu.*" dispatch to cma_cpu_retire.
*/
{ "fault.cpu.ultraSPARC-T1.freg", FM_FMRI_SCHEME_CPU,
{ "fault.cpu.ultraSPARC-T1.l2cachedata", FM_FMRI_SCHEME_CPU,
{ "fault.cpu.ultraSPARC-T1.l2cachetag", FM_FMRI_SCHEME_CPU,
{ "fault.cpu.ultraSPARC-T1.l2cachectl", FM_FMRI_SCHEME_CPU,
{ "fault.cpu.ultraSPARC-T1.mau", FM_FMRI_SCHEME_CPU,
};
static const cma_subscriber_t *
{
const cma_subscriber_t *sp;
char *scheme;
return (NULL);
}
return (sp);
}
}
return (NULL);
}
static void
{
int err = 0;
if (err != 0) {
return;
}
const cma_subscriber_t *subr;
continue;
/*
* A handler returns CMA_RA_SUCCESS to indicate that
* from this suspects point-of-view the case may be
* closed, CMA_RA_FAILURE otherwise.
* A handler must not close the case itself.
*/
if (err == CMA_RA_SUCCESS)
keepopen--;
}
}
if (!keepopen)
}
static void
{
const cma_subscriber_t *subr;
return;
}
/*ARGSUSED*/
static void
{
else
}
/*ARGSUSED*/
static void
{
}
static const fmd_hdl_ops_t fmd_ops = {
cma_recv, /* fmdo_recv */
cma_timeout, /* fmdo_timeout */
NULL, /* fmdo_close */
NULL, /* fmdo_stats */
NULL, /* fmdo_gc */
};
static const fmd_prop_t fmd_props[] = {
#ifdef i386
/*
* On i386, leaving cases open while we retry the
* retire can cause the eft module to use large amounts
* of memory. Until eft is fixed, we set a maximum number
* of retries on page retires, after which the case will
* be closed.
*/
#else
#endif /* i386 */
};
static const fmd_hdl_info_t fmd_info = {
};
void
{
return; /* invalid data in configuration file */
"cpu_forced_offline");
"cpu_blacklist_enable");
}
void
{
}