xref: /onnv-gate/usr/src/cmd/fm/modules/sun4u/datapath-retire/cda.h (revision 1186:7791ded250f8)
1*1186Sayznaga /*
2*1186Sayznaga  * CDDL HEADER START
3*1186Sayznaga  *
4*1186Sayznaga  * The contents of this file are subject to the terms of the
5*1186Sayznaga  * Common Development and Distribution License, Version 1.0 only
6*1186Sayznaga  * (the "License").  You may not use this file except in compliance
7*1186Sayznaga  * with the License.
8*1186Sayznaga  *
9*1186Sayznaga  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10*1186Sayznaga  * or http://www.opensolaris.org/os/licensing.
11*1186Sayznaga  * See the License for the specific language governing permissions
12*1186Sayznaga  * and limitations under the License.
13*1186Sayznaga  *
14*1186Sayznaga  * When distributing Covered Code, include this CDDL HEADER in each
15*1186Sayznaga  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
16*1186Sayznaga  * If applicable, add the following below this CDDL HEADER, with the
17*1186Sayznaga  * fields enclosed by brackets "[]" replaced with your own identifying
18*1186Sayznaga  * information: Portions Copyright [yyyy] [name of copyright owner]
19*1186Sayznaga  *
20*1186Sayznaga  * CDDL HEADER END
21*1186Sayznaga  */
22*1186Sayznaga /*
23*1186Sayznaga  * Copyright 2005 Sun Microsystems, Inc.  All rights reserved.
24*1186Sayznaga  * Use is subject to license terms.
25*1186Sayznaga  */
26*1186Sayznaga 
27*1186Sayznaga #ifndef _CDA_H
28*1186Sayznaga #define	_CDA_H
29*1186Sayznaga 
30*1186Sayznaga #pragma ident	"%Z%%M%	%I%	%E% SMI"
31*1186Sayznaga 
32*1186Sayznaga #include <fm/fmd_api.h>
33*1186Sayznaga 
34*1186Sayznaga #include <sys/types.h>
35*1186Sayznaga 
36*1186Sayznaga #define	DP_MAX_BUF	16		/* max len of general purpose buffer */
37*1186Sayznaga 
38*1186Sayznaga #ifdef __cplusplus
39*1186Sayznaga extern "C" {
40*1186Sayznaga #endif
41*1186Sayznaga 
42*1186Sayznaga typedef struct cda {
43*1186Sayznaga 	struct timespec cda_cpu_delay;	/* CPU offline retry interval */
44*1186Sayznaga 	uint_t cda_cpu_tries;		/* Number of CPU offline retries */
45*1186Sayznaga 	uint_t cda_cpu_dooffline;	/* Whether to offline CPUs */
46*1186Sayznaga 	uint_t cda_cpu_forcedoffline;	/* Whether to do forced CPU offline */
47*1186Sayznaga } cda_t;
48*1186Sayznaga 
49*1186Sayznaga typedef struct cda_stats {
50*1186Sayznaga 	fmd_stat_t dp_offs;		/* Successful offlines */
51*1186Sayznaga 	fmd_stat_t dp_fails;		/* Failed offlines */
52*1186Sayznaga 	fmd_stat_t dp_supp;		/* Suppressed offlines */
53*1186Sayznaga 	fmd_stat_t bad_flts;		/* Malformed faults */
54*1186Sayznaga 	fmd_stat_t nop_flts;		/* Inapplicable faults */
55*1186Sayznaga } cda_stats_t;
56*1186Sayznaga 
57*1186Sayznaga extern cda_stats_t cda_stats;
58*1186Sayznaga extern cda_t cda;
59*1186Sayznaga 
60*1186Sayznaga extern void cda_dp_retire(fmd_hdl_t *, nvlist_t *, nvlist_t *, const char *);
61*1186Sayznaga 
62*1186Sayznaga #ifdef __cplusplus
63*1186Sayznaga }
64*1186Sayznaga #endif
65*1186Sayznaga 
66*1186Sayznaga #endif /* _CDA_H */
67