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_CONF_H
  27 #define _SD_CONF_H
  28 
  29 #ifdef  __cplusplus
  30 extern "C" {
  31 #endif
  32 
  33 #if defined(_RCSID)
  34 static char *rcs_sd_conf_h = "@(#)(SMI) sd_conf.h 1.1 07/06/21 16:17:54";
  35 #endif
  36 
  37 #define MEGABYTE        (1024*1024)
  38 
  39 #define DEFAULT_HANDLES 1000
  40 #define MAX_SD_NODES    256   /* max configured nodes */
  41 #define SD_MCIII 0
  42 #define SD_MCIV  1
  43 
  44 /* for initializing fields to an invalid host id */
  45 #define _SD_NO_HOST -1
  46 
  47 /* netaddr filler for mc_*() compatibility */
  48 #define _SD_NO_NETADDR 0
  49 /* dummy net for mc_*() compatibility */
  50 #define _SD_NO_NET 0
  51 
  52 #define _SD_VME_DEFAULT (1024*1024)     /* default 1mb contiguous memory */
  53 
  54 #ifdef _KERNEL
  55 
  56 extern _sd_cache_param_t _sd_cache_config;
  57 extern int _SD_SELF_DSP, _SD_REM_DSP[], _SD_NUM_REM;
  58 extern int _SD_SELF_HOST, _SD_MIRROR_HOST;
  59 extern int _sd_nodes_configured, _SD_HOST_CONF[];
  60 extern int _sd_parallel_resync_cnt;
  61 extern int _sdbc_gateway_wblocks;
  62 extern int _sdbc_memtype_deconfigure_delayed;
  63 extern kmutex_t _sdbc_config_lock;
  64 extern nsc_mem_t *sdbc_info_mem;
  65 extern nsc_mem_t *sdbc_iobuf_mem, *sdbc_hash_mem;
  66 extern nsc_mem_t *sdbc_local_mem, *sdbc_stats_mem, *sdbc_cache_mem;
  67 #if defined(_SD_USE_THREADS)
  68 extern nstset_t *_sd_ioset;
  69 #endif  /* _SD_USE_THREADS */
  70 extern ushort_t SD_AUTO_RESYNC;
  71 extern volatile int _sd_cache_dem_cnt;
  72 extern volatile int _sd_cache_initialized;
  73 
  74 extern void _sdbc_memtype_deconfigure(void);
  75 extern int _sdbc_configure(_sd_cache_param_t *,
  76         _sdbc_config_t *, spcs_s_info_t);
  77 extern int _sdbc_deconfigure(spcs_s_info_t);
  78 extern int _sdbc_get_config(_sdbc_config_t *);
  79 extern int get_high_bit(int size);
  80 
  81 #endif /* _KERNEL */
  82 
  83 #ifdef  __cplusplus
  84 }
  85 #endif
  86 
  87 #endif /* _SD_CONF_H */