xref: /titanic_44/usr/src/uts/common/avs/ns/sdbc/sd_misc.h (revision fcf3ce441efd61da9bb2884968af01cb7c1452cc)
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 _SD_MISC_H
27 #define	_SD_MISC_H
28 
29 #ifdef __cplusplus
30 extern "C" {
31 #endif
32 
33 #define	_SD_FIFO_WAIT	1000
34 #define	_SD_FIFO_WSPIN	100
35 #ifdef _KERNEL
36 
37 extern _dm_process_vars_t dynmem_processing_dm;
38 
39 extern int sdbc_wrthru_len;
40 extern nsc_size_t sdbc_max_fbas;
41 extern int sdbc_max_devs;
42 
43 
44 extern int _init(void);
45 extern void _sd_data_log(int num, _sd_cctl_t *centry, nsc_off_t st,
46     nsc_size_t len);
47 extern void _sd_data_log_chain(int num, _sd_cctl_t *centry, nsc_off_t fba_pos,
48     nsc_size_t fba_len);
49 extern int _sd_reflect_ignore(ucaddr_t from, ucaddr_t to, int size);
50 extern int _sd_reflect(ucaddr_t from, ucaddr_t to, int size, int flag);
51 extern void _sd_timed_block(clock_t ticks, kcondvar_t *cvp);
52 extern void _sd_unblock(kcondvar_t *cvp);
53 extern void _sd_zap_stats(void);
54 extern int _sd_cache_sizes(int *asize, int *wsize);
55 extern void _sd_print(int level, char *fmt, ...);
56 extern int _sd_get_cd_blk(int cd, nsc_off_t blk, _sd_cctl_t **cc, caddr_t *data,
57     char **filename);
58 
59 #endif /* _KERNEL */
60 
61 #ifdef __cplusplus
62 }
63 #endif
64 
65 #endif /* _SD_MISC_H */
66