xref: /titanic_41/usr/src/lib/fm/topo/libtopo/common/cpu.h (revision 0eb822a1c0c2bea495647510b75f77f0e57633eb)
1*0eb822a1Scindi /*
2*0eb822a1Scindi  * CDDL HEADER START
3*0eb822a1Scindi  *
4*0eb822a1Scindi  * The contents of this file are subject to the terms of the
5*0eb822a1Scindi  * Common Development and Distribution License (the "License").
6*0eb822a1Scindi  * You may not use this file except in compliance with the License.
7*0eb822a1Scindi  *
8*0eb822a1Scindi  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9*0eb822a1Scindi  * or http://www.opensolaris.org/os/licensing.
10*0eb822a1Scindi  * See the License for the specific language governing permissions
11*0eb822a1Scindi  * and limitations under the License.
12*0eb822a1Scindi  *
13*0eb822a1Scindi  * When distributing Covered Code, include this CDDL HEADER in each
14*0eb822a1Scindi  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15*0eb822a1Scindi  * If applicable, add the following below this CDDL HEADER, with the
16*0eb822a1Scindi  * fields enclosed by brackets "[]" replaced with your own identifying
17*0eb822a1Scindi  * information: Portions Copyright [yyyy] [name of copyright owner]
18*0eb822a1Scindi  *
19*0eb822a1Scindi  * CDDL HEADER END
20*0eb822a1Scindi  */
21*0eb822a1Scindi 
22*0eb822a1Scindi /*
23*0eb822a1Scindi  * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
24*0eb822a1Scindi  * Use is subject to license terms.
25*0eb822a1Scindi  */
26*0eb822a1Scindi 
27*0eb822a1Scindi #ifndef	_CPU_H
28*0eb822a1Scindi #define	_CPU_H
29*0eb822a1Scindi 
30*0eb822a1Scindi #pragma ident	"%Z%%M%	%I%	%E% SMI"
31*0eb822a1Scindi 
32*0eb822a1Scindi #ifdef	__cplusplus
33*0eb822a1Scindi extern "C" {
34*0eb822a1Scindi #endif
35*0eb822a1Scindi 
36*0eb822a1Scindi #include <kstat.h>
37*0eb822a1Scindi 
38*0eb822a1Scindi #define	CPU_VERSION	1
39*0eb822a1Scindi 
40*0eb822a1Scindi typedef struct cpu_node {
41*0eb822a1Scindi 	kstat_ctl_t *cn_kc;
42*0eb822a1Scindi 	kstat_t **cn_cpustats;
43*0eb822a1Scindi 	uint_t cn_ncpustats;
44*0eb822a1Scindi } cpu_node_t;
45*0eb822a1Scindi 
46*0eb822a1Scindi extern int cpu_init(topo_mod_t *, topo_version_t);	/* see cpu.c */
47*0eb822a1Scindi extern void cpu_fini(topo_mod_t *);			/* see cpu.c */
48*0eb822a1Scindi 
49*0eb822a1Scindi #ifdef	__cplusplus
50*0eb822a1Scindi }
51*0eb822a1Scindi #endif
52*0eb822a1Scindi 
53*0eb822a1Scindi #endif	/* _CPU_H */
54