4 * The contents of this file are subject to the terms of the
5 * Common Development and Distribution License, Version 1.0 only
6 * (the "License"). You may not use this file except in compliance
9 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10 * or http://www.opensolaris.org/os/licensing.
11 * See the License for the specific language governing permissions
12 * and limitations under the License.
14 * When distributing Covered Code, include this CDDL HEADER in each
15 * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
16 * If applicable, add the following below this CDDL HEADER, with the
17 * fields enclosed by brackets "[]" replaced with your own identifying
18 * information: Portions Copyright [yyyy] [name of copyright owner]
23 * Copyright 1999-2001, 2003 Sun Microsystems, Inc. All rights reserved.
24 * Use is subject to license terms.
27 #ifndef _SYS_RSM_RSMAPI_COMMON_H
28 #define _SYS_RSM_RSMAPI_COMMON_H
30 #pragma ident "%Z%%M% %I% %E% SMI"
36 #include <sys/rsm/rsm_common.h>
39 * Applications must provide a handle for each region of local memory
40 * specified in the scatter/gather list used for an rsm_memseg_putv
41 * rsm_memseg_getv operation.
43 struct __rsm_localmemory_handle
;
44 typedef struct __rsm_localmemory_handle
*rsm_localmemory_handle_t
;
46 struct __rsmapi_controller_handle
;
47 typedef struct __rsmapi_controller_handle
*rsmapi_controller_handle_t
;
50 uint_t attr_direct_access_sizes
;
51 uint_t attr_atomic_sizes
;
52 size_t attr_page_size
;
53 size_t attr_max_export_segment_size
;
54 size_t attr_tot_export_segment_size
;
55 ulong_t attr_max_export_segments
;
56 size_t attr_max_import_map_size
;
57 size_t attr_tot_import_map_size
;
58 ulong_t attr_max_import_segments
;
59 } rsmapi_controller_attr_t
;
62 rsm_node_id_t ae_node
; /* node id allowed access */
63 rsm_permission_t ae_permission
; /* permissions for node */
64 } rsmapi_access_entry_t
;
73 * The scatter/gather list contains a pointer (iovec) to an io vector array.
74 * Each array element is of type rsm_io_vect_t
80 rsm_localmemory_handle_t handle
;
85 size_t transfer_length
;
89 rsm_node_id_t local_nodeid
;
90 ulong_t io_request_count
;
91 ulong_t io_residual_count
;
93 rsm_memseg_import_handle_t remote_handle
;
97 /* scatter/gather I/O types */
98 #define RSM_HANDLE_TYPE 0x01
99 #define RSM_VA_TYPE 0x02
102 * The following macro can be used to indicate that rebind and unbind is
103 * allowed for an exported segment. This flag is used during the export
106 #define RSM_ALLOW_REBIND 0x01
109 * This new flag will be used in rsm_memseg_export_create
110 * to control blocking/noblocking resource allocation
111 * from RSMAPI layer/interface
114 #define RSM_CREATE_SEG_DONTWAIT 0x02
117 * The bits in the flags field in the scatter gather structure can be
118 * initialized using the following macros. An RSM_SIGPOST_NO_ACCUMULATE
119 * flag can be ored into the flags value to indicate that when an implicit
120 * signal post is being done, the events are not to be accumulated.
121 * This flag is defined below.
123 #define RSM_IMPLICIT_SIGPOST 0x01
126 * The following macro can be used as the flags argument in
127 * rsm_intr_signal_post to indicate that the events should not be
128 * accumulated and then serviced individually. The default value of the
129 * flags argument for the rsm_intr_signal_post is 0, which indicates that
130 * the events are accumulated and serviced individually.
131 * It is important to note here that the value of this macro is 0x02 and
132 * should not be changed without checking for consistency of use in the
133 * rsm_memseg_import_getv and rsm_memseg_import_putv calls for an implicit
136 #define RSM_SIGPOST_NO_ACCUMULATE 0x02
142 #endif /* _SYS_RSM_RSMAPI_COMMON_H */