kernel: remove unused utsname_set_machine()
[unleashed.git] / usr / src / uts / sun4v / io / n2piupc / n2piupc.h
blobb9c224618f52bd9fed6ac1b280bbb1d7349e8293
1 /*
2 * CDDL HEADER START
4 * The contents of this file are subject to the terms of the
5 * Common Development and Distribution License (the "License").
6 * You may not use this file except in compliance with the License.
8 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9 * or http://www.opensolaris.org/os/licensing.
10 * See the License for the specific language governing permissions
11 * and limitations under the License.
13 * When distributing Covered Code, include this CDDL HEADER in each
14 * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15 * If applicable, add the following below this CDDL HEADER, with the
16 * fields enclosed by brackets "[]" replaced with your own identifying
17 * information: Portions Copyright [yyyy] [name of copyright owner]
19 * CDDL HEADER END
23 * Copyright 2006 Sun Microsystems, Inc. All rights reserved.
24 * Use is subject to license terms.
27 #ifndef _N2PIUPC_H
28 #define _N2PIUPC_H
31 * Definitions which deal with things other than registers.
34 #pragma ident "%Z%%M% %I% %E% SMI"
36 #ifdef __cplusplus
37 extern "C" {
38 #endif
40 #include <sys/sunddi.h>
42 #define SUCCESS 0
43 #define FAILURE -1
45 #define NAMEINST(dip) ddi_driver_name(dip), ddi_get_instance(dip)
47 /* Used for data structure retrieval during kstat update. */
48 typedef struct n2piu_ksinfo {
49 kstat_t *cntr_ksp;
50 struct n2piupc *n2piupc_p;
51 n2piu_grp_t *grp_p;
52 } n2piu_ksinfo_t;
54 /* State structure. */
55 typedef struct n2piupc {
56 dev_info_t *n2piupc_dip;
57 cntr_handle_t n2piupc_handle;
58 void * n2piupc_biterr_p;
59 n2piu_ksinfo_t *n2piupc_ksinfo_p[NUM_GRPS];
60 } n2piupc_t;
62 /* Debugging facility. */
63 #ifdef DEBUG
64 extern int n2piupc_debug;
65 #define N2PIUPC_DBG1 if (n2piupc_debug >= 1) printf
66 #define N2PIUPC_DBG2 if (n2piupc_debug >= 2) printf
67 #else
68 #define N2PIUPC_DBG1 0 &&
69 #define N2PIUPC_DBG2 0 &&
70 #endif /* DEBUG */
73 /* Function definitions exported among different modules. */
74 extern int n2piupc_kstat_init();
75 extern void n2piupc_kstat_fini();
76 extern int n2piupc_kstat_attach(n2piupc_t *n2piupc_p);
77 extern void n2piupc_kstat_detach(n2piupc_t *n2piupc_p);
79 #ifdef __cplusplus
81 #endif
83 #endif /* _N2PIUPC_H */