xref: /titanic_51/usr/src/uts/common/avs/ns/nsctl_inter.h (revision 1e49577a7fcde812700ded04431b49d67cc57d6d)
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 (the "License").
6  * You may not use this file except in compliance with the License.
7  *
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.
12  *
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]
18  *
19  * CDDL HEADER END
20  */
21 /*
22  * Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
23  * Use is subject to license terms.
24  */
25 
26 #ifndef	_SYS_NSCTL_INTER_H
27 #define	_SYS_NSCTL_INTER_H
28 
29 #ifdef	__cplusplus
30 extern "C" {
31 #endif
32 
33 #define	__NSC_GEN__
34 #include <sys/ksynch.h>
35 #include <sys/nsctl/nsc_dev.h>
36 #include <sys/nsctl/nsc_gen.h>
37 #include <sys/nsctl/nsc_mem.h>
38 #include <sys/nsctl/nsc_rmspin.h>
39 
40 #ifdef _KERNEL
41 
42 #include <sys/nsc_ddi.h>
43 
44 /* prevent errors from typedefs not defined until after this is included */
45 typedef int	nsc_size_t;
46 typedef int	nsc_off_t;
47 
48 int nsc_inval() { }
49 int nsc_ioerr() { }
50 int nsc_fatal() { }
51 int nsc_null()  { }
52 int nsc_true()  { }
53 void nsc_decode_param(void *, void *, void *) { }
54 int nskernd_isdaemon() { }
55 uchar_t nsc_ldstub(uchar_t *) { }
56 void nsc_membar_stld(void) { }
57 
58 #ifndef _BLIND_T
59 typedef void * blind_t;
60 #endif
61 typedef void strategy_fn_t;
62 nsc_io_t *nsc_register_io(char *, int, void *) { }
63 int nsc_unregister_io(nsc_io_t *, int) { }
64 nsc_path_t *nsc_register_path(char *, int, nsc_io_t *) { }
65 int nsc_unregister_path(nsc_path_t *, int) { }
66 int nsc_cache_sizes(int *, int *) { }
67 int nsc_register_down(void (*)()) { }
68 int nsc_node_hints(unsigned int *) { }
69 int nsc_node_hints_set(unsigned int) { }
70 blind_t nsc_register_power(char *, void *) { }
71 int nsc_unregister_power(blind_t) { }
72 strategy_fn_t    nsc_get_strategy(major_t) { }
73 void *nsc_get_devops(major_t) { }
74 void nsc_do_sysevent(char *, char *, int, int, char *, dev_info_t *) { }
75 nsc_fd_t *nsc_open(char *, int, void *, blind_t, int *) { }
76 int nsc_close(nsc_fd_t *) { }
77 char *nsc_pathname(nsc_fd_t *) { }
78 int nsc_shared(nsc_fd_t *) { }
79 int nsc_setval(nsc_fd_t *, char *, int) { }
80 int nsc_getval(nsc_fd_t *, char *, int *) { }
81 int nsc_set_trksize(nsc_fd_t *, int) { }
82 int nsc_discard_pinned(nsc_fd_t *, int, int) { }
83 kmutex_t *nsc_lock_addr(nsc_fd_t *) { }
84 int nsc_attach(nsc_fd_t *, int) { }
85 int nsc_reserve(nsc_fd_t *, int) { }
86 void nsc_reserve_lk(nsc_fd_t *) { }
87 void nsc_release(nsc_fd_t *) { }
88 int nsc_release_lk(nsc_fd_t *) { }
89 int nsc_detach(nsc_fd_t *, int) { }
90 int nsc_avail(nsc_fd_t *) { }
91 int nsc_held(nsc_fd_t *) { }
92 int nsc_waiting(nsc_fd_t *) { }
93 int nsc_partsize(nsc_fd_t *, nsc_size_t *) { }
94 int nsc_maxfbas(nsc_fd_t *, int, nsc_size_t *) { }
95 int nsc_control(nsc_fd_t *, int, void *, int) { }
96 int nsc_get_pinned(nsc_fd_t *) { }
97 int nsc_max_devices(void) { }
98 
99 void nsc_set_owner(nsc_fd_t *, nsc_iodev_t *) { }
100 void nsc_pinned_data(nsc_iodev_t *, int, int) { }
101 void nsc_unpinned_data(nsc_iodev_t *, int, int) { }
102 int nsc_alloc_buf(nsc_fd_t *, nsc_off_t, nsc_size_t, int, void **) { }
103 int nsc_alloc_abuf(nsc_off_t, nsc_size_t, int, void **) { }
104 int nsc_read(void *, nsc_off_t, nsc_size_t, int) { }
105 int nsc_write(void *, nsc_off_t, nsc_size_t, int) { }
106 int nsc_zero(void *, nsc_off_t, nsc_size_t, int) { }
107 int nsc_copy(void *, void *, nsc_off_t, nsc_off_t, nsc_size_t) { }
108 int nsc_copy_direct(void *, void *, nsc_off_t, nsc_off_t, nsc_size_t) { }
109 int nsc_uncommit(void *, nsc_off_t, nsc_size_t, int) { }
110 int nsc_free_buf(void *) { }
111 void *nsc_alloc_handle(nsc_fd_t *,
112 	void (*)(), void (*)(), void (*)()) { }
113 int nsc_free_handle(void *) { }
114 int nsc_uread(nsc_fd_t *, void *, void *) { }
115 int nsc_uwrite(nsc_fd_t *, void *, void *) { }
116 
117 nsc_rmlock_t *nsc_rm_lock_alloc(char *, int, void *) { }
118 void nsc_rm_lock_dealloc(nsc_rmlock_t *) { }
119 int nsc_rm_lock(nsc_rmlock_t *) { }
120 void nsc_rm_unlock(nsc_rmlock_t *) { }
121 
122 void *nsc_register_mem(char *, int, int) { }
123 void nsc_unregister_mem(void *) { }
124 void *nsc_kmem_alloc(size_t, int, void *) { }
125 void *nsc_kmem_zalloc(size_t, int, void *) { }
126 void nsc_kmem_free(void *, size_t) { }
127 void nsc_mem_sizes(void *, size_t *, size_t *, size_t *) { }
128 size_t nsc_mem_avail(void *) { }
129 
130 int nsc_commit_mem(void *, void *, size_t, void) { }
131 
132 void nsc_cm_errhdlr(void *, void *, size_t, int) { }
133 
134 nsc_svc_t *nsc_register_svc(char *, void (*)(intptr_t)) { }
135 int nsc_unregister_svc(nsc_svc_t *) { }
136 int nsc_call_svc(nsc_svc_t *, intptr_t) { }
137 
138 char *nsc_strdup(char *) { }
139 void nsc_strfree(char *) { }
140 int nsc_strmatch(char *, char *) { }
141 void nsc_sprintf(char *, char *, ...) { }
142 int nsc_max_nodeid, nsc_min_nodeid;
143 int nsc_nodeid_data(void) { }
144 int nsc_node_id(void) { }
145 int nsc_node_up(int) { }
146 char *nsc_node_name(void) { }
147 time_t nsc_time(void) { }
148 clock_t nsc_lbolt(void) { }
149 int nsc_delay_sig(clock_t) { }
150 clock_t nsc_usec(void) { }
151 void nsc_yield(void) { }
152 int nsc_create_process(void (*)(void *), void *, boolean_t) { }
153 int nsc_power_init(void) { }
154 void nsc_power_deinit(void) { }
155 void _nsc_global_nvmemmap_lookup(void *) { }
156 void _nsc_mark_pages(void addr, void size, int dump) { }
157 void _nsc_init_raw() { }
158 void _nsc_deinit_raw() { }
159 void _nsc_init_start() { }
160 void _nsc_init_os() { }
161 void _nsc_raw_flags() { }
162 int _nsc_raw_def[1];
163 void nskernd_command() { }
164 void nskern_bsize() { }
165 int nsc_do_lock() { }
166 void nsc_do_unlock() { }
167 int HZ;
168 uint64_t nsc_strhash(char *) { }
169 int nsc_fdpathcmp(void *, uint64_t, char *) { }
170 char *nsc_caller() { }
171 char *nsc_callee() { }
172 void *nsc_threadp() { }
173 
174 /*
175  * Misc stuff to make our life easier
176  */
177 #ifndef _VERSION_
178 #define	_VERSION_	"SunOS 5.11"
179 #endif
180 
181 #ifndef ISS_VERSION_STR
182 #define	ISS_VERSION_STR "SunOS 5.11"
183 #endif
184 
185 #ifndef ISS_VERSION_NUM
186 #define	ISS_VERSION_NUM 61
187 #endif
188 
189 #ifndef ISS_VERSION_MAJ
190 #define	ISS_VERSION_MAJ 11
191 #endif
192 
193 #ifndef ISS_VERSION_MIN
194 #define	ISS_VERSION_MIN 11
195 #endif
196 
197 #ifndef ISS_VERSION_MIC
198 #define	ISS_VERSION_MIC	0
199 #endif
200 
201 #ifndef BUILD_DATE_STR
202 #define	BUILD_DATE_STR "None"
203 #endif
204 
205 #ifndef SCMTEST_MAJOR_VERSION
206 #define	SCMTEST_MAJOR_VERSION "0"
207 #endif
208 
209 #ifndef SCMTEST_MINOR_VERSION
210 #define	SCMTEST_MINOR_VERSION "0"
211 #endif
212 
213 #ifndef SCMTEST_PATCH_VERSION
214 #define	SCMTEST_PATCH_VERSION "0"
215 #endif
216 
217 #endif /* _KERNEL */
218 
219 #ifdef	__cplusplus
220 }
221 #endif
222 
223 #endif /* _SYS_NSCTL_INTER_H */
224