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