fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte/*
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * CDDL HEADER START
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte *
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * The contents of this file are subject to the terms of the
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * Common Development and Distribution License (the "License").
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * You may not use this file except in compliance with the License.
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte *
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * or http://www.opensolaris.org/os/licensing.
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * See the License for the specific language governing permissions
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * and limitations under the License.
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte *
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * When distributing Covered Code, include this CDDL HEADER in each
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * If applicable, add the following below this CDDL HEADER, with the
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * fields enclosed by brackets "[]" replaced with your own identifying
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * information: Portions Copyright [yyyy] [name of copyright owner]
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte *
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * CDDL HEADER END
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte/*
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * Copyright 2008 Sun Microsystems, Inc. All rights reserved.
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * Use is subject to license terms.
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#ifndef _SD_CONF_H
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define _SD_CONF_H
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#ifdef __cplusplus
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forteextern "C" {
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#endif
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#if defined(_RCSID)
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Fortestatic char *rcs_sd_conf_h = "@(#)(SMI) sd_conf.h 1.1 07/06/21 16:17:54";
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#endif
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define MEGABYTE (1024*1024)
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define DEFAULT_HANDLES 1000
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define MAX_SD_NODES 256 /* max configured nodes */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define SD_MCIII 0
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define SD_MCIV 1
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte/* for initializing fields to an invalid host id */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define _SD_NO_HOST -1
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte/* netaddr filler for mc_*() compatibility */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define _SD_NO_NETADDR 0
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte/* dummy net for mc_*() compatibility */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define _SD_NO_NET 0
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define _SD_VME_DEFAULT (1024*1024) /* default 1mb contiguous memory */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#ifdef _KERNEL
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forteextern _sd_cache_param_t _sd_cache_config;
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forteextern int _SD_SELF_DSP, _SD_REM_DSP[], _SD_NUM_REM;
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forteextern int _SD_SELF_HOST, _SD_MIRROR_HOST;
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forteextern int _sd_nodes_configured, _SD_HOST_CONF[];
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forteextern int _sd_parallel_resync_cnt;
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forteextern int _sdbc_gateway_wblocks;
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forteextern int _sdbc_memtype_deconfigure_delayed;
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forteextern kmutex_t _sdbc_config_lock;
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forteextern nsc_mem_t *sdbc_info_mem;
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forteextern nsc_mem_t *sdbc_iobuf_mem, *sdbc_hash_mem;
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forteextern nsc_mem_t *sdbc_local_mem, *sdbc_stats_mem, *sdbc_cache_mem;
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#if defined(_SD_USE_THREADS)
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forteextern nstset_t *_sd_ioset;
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#endif /* _SD_USE_THREADS */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forteextern ushort_t SD_AUTO_RESYNC;
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forteextern volatile int _sd_cache_dem_cnt;
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forteextern volatile int _sd_cache_initialized;
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forteextern void _sdbc_memtype_deconfigure(void);
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forteextern int _sdbc_configure(_sd_cache_param_t *,
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte _sdbc_config_t *, spcs_s_info_t);
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forteextern int _sdbc_deconfigure(spcs_s_info_t);
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forteextern int _sdbc_get_config(_sdbc_config_t *);
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forteextern int get_high_bit(int size);
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#endif /* _KERNEL */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#ifdef __cplusplus
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte}
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#endif
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#endif /* _SD_CONF_H */