/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License, Version 1.0 only
* (the "License"). You may not use this file except in compliance
* with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* See the License for the specific language governing permissions
* and limitations under the License.
*
* When distributing Covered Code, include this CDDL HEADER in each
* file and include the License file at usr/src/OPENSOLARIS.LICENSE.
* If applicable, add the following below this CDDL HEADER, with the
* fields enclosed by brackets "[]" replaced with your own identifying
* information: Portions Copyright [yyyy] [name of copyright owner]
*
* CDDL HEADER END
*/
/*
* Copyright 1999-2003 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
#ifndef _RSM_IN_H
#define _RSM_IN_H
#pragma ident "%Z%%M% %I% %E% SMI"
#ifdef __cplusplus
extern "C" {
#endif
#define RSM_DRIVER_MINOR 0
/*
* The base for Sun RSMAPI Kernel Agent service idenitifiers is RSM_INTR_T_KA
* as defined below. This is as per the RSMPI specification. Thus,
* in the kernel agent, we need to use this value as the service identifier
* while registering the service handlers.
*/
#define RSM_LOCK 0
/*
* The following defines UINT_MAX rounded down to a page aligned value.
*/
/*
* Define TRASHSIZE as the maximum possible size which is page aligned
* This value cannot be 0xffffffffffffe000 since this is taken as a
* negative value in the devmap_umem_remap call, thus causing the call
* to fail.
*/
/* flag values for rsmseg_unload */
#define NO_DISCONNECT 0
struct rsm_driver_data {
};
/* rsm driver state */
#define RSM_DRV_NEW 0
/* internal flags */
#define RSM_DR_QUIESCE 0
typedef enum {
RSM_STATE_NEW = 0,
typedef enum {
/*
* All resources have the only common info. whether it is a segment or
* a notification queue.
*/
typedef struct rsm_resource {
/*
* The following macro is used within the kernel agent to indicate that
* segment's s_flags field.
*/
typedef struct rsm_region {
typedef struct rsm_cookie {
typedef struct rsm_mapinfo {
/*
* Shared Importer data structure
*
*/
typedef struct rsm_import_share {
/* has been sent */
typedef struct rsm_seginfo {
int s_flags;
union {
/*
* This field is used to indicate the cookie returned by the
* ddi_umem_lock when binding pages for an export segment.
* Also, for importers on the same node as the export segment,
* this field indicates the cookie used during import mapping.
*/
/*
* This field in an import segments indicates the number of
* a handle in the iovec.
*/
} rsmseg_t;
/*
* Resource elements structure
*/
typedef struct {
int rsmrcblk_avail;
struct rsmresource_table {
int rsmrc_len;
int rsmrc_sz;
};
/*
* Struct for advertised resource list
*/
/*
* Hashtable structs
* bucket points to an array of pointers, each entry in the bucket array
* points to a linked list of resource items.
* bucket index = bucket_address%RSM_HASHSZ
*/
typedef struct rsmhash_table {
/*
* Remote messaging related structure
*/
/*
* Flags for ipc slot
*/
typedef struct rsmipc_slot {
int rsmipc_flags;
/*
* Messaging struc
*/
typedef struct {
int count;
int wanted;
int sequence;
/*
* These tokens are used for building the list of remote node importers
* of a segment exported from the local node
*/
typedef struct importing_token {
void *import_segment_cookie;
typedef struct {
/*
* Used by the rsm_send_republish() fn
*/
typedef struct republish_token {
/*
* data strucuture for list manipulation
*/
typedef struct list_element {
typedef struct list_head {
} list_head_t;
#ifdef __cplusplus
}
#endif
#endif /* _RSM_IN_H */