ao_poll.c revision a307a2550e1618a7971751ee83c22441ced27bbe
/*
* 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"
/*
*
* The AMD Opteron processor doesn't yet report correctable errors via #mc's.
* Instead, it fixes the problem, silently updates the error state MSRs, and
* resumes operation. In order to discover occurrances of correctable errors,
* we have to poll in the background using the omni cyclics mechanism. The
* error injector also has the ability to manually request an immediate poll.
* Locking is fairly simple within the poller: the per-CPU mutex
* ao->ao_mca.ao_mca_poll_lock ensures that only one poll request is active.
*/
#include <sys/sysmacros.h>
#include <sys/x86_archext.h>
#include "ao.h"
#ifdef DEBUG
#else
static uint_t ao_mca_poll_trace_always = 0;
#endif
static cyclic_id_t ao_mca_poll_cycid;
static void
{
return; /* poll trace buffer is disabled */
if (what == AO_MPT_WHAT_CYC_ERR)
}
static void
{
int i, n, fatal;
/*
* On the first poll after re-enabling a faulty CPU we clear
* the status registers; see ao_faulted_exit() for more info.
*/
if (what == AO_MPT_WHAT_CYC_ERR) {
for (i = 0; i < AMD_MCA_BANK_COUNT; i++)
return;
}
}
fm_panic("Unrecoverable Machine-Check Error (polled)");
}
static void
ao_mca_poll_cyclic(void *arg)
{
}
}
void
ao_mca_poke(void *arg)
{
}
/*ARGSUSED*/
static void
{
/*
* If the CPU coming on-line isn't supported by this CPU module, then
* disable the cylic by cranking cyt_interval and setting arg to NULL.
*/
} else {
}
}
/*ARGSUSED*/
static void
{
/* nothing to do here */
}
void
{
if (ao_mca_poll_trace_always) {
kmem_zalloc(sizeof (ao_mca_poll_trace_t) *
mca->ao_mca_poll_curtrace = 0;
}
}
void
ao_mca_poll_start(void)
{
if (ao_mca_poll_interval == 0)
return; /* if manually tuned to zero, disable polling */
}