wrsm_memseg.c revision 7c478bd95313f5f23a4c958a745db2134aa03244
/*
* 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 2005 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
#pragma ident "%Z%%M% %I% %E% SMI"
/*
* This file manages generic RSMPI memory segment management, setup and
* teardown.
*/
#include <vm/seg_kmem.h>
#include <sys/ddimapreq.h>
#include <sys/wrsm_common.h>
#include <sys/wrsm_session.h>
#include <sys/wrsm_memseg.h>
#include <sys/wrsm_memseg_impl.h>
#include <sys/wrsm_intr.h>
#ifdef DEBUG
#define DBG_MEMSEG 0x001
#define DBG_MEMSEG_EXTRA 0x010
#else /* DEBUG */
#define DPRINTF(a, b) { }
#endif /* DEBUG */
/* Non-pageable kernel memory is allocated from the wrsm_arena. */
static vmem_t *wrsm_arena;
static boolean_t
{
/*
* it is presumed that at this point the node was removed from the
* cluster_members_bits registers in all wcis
*/
/*
* clean up exports to the remote node
*/
if (!exportseg_sess_teardown(node)) {
}
/*
* clean up iseginfos imported from remote node
*/
if (!iseginfo_sess_teardown(node)) {
}
return (teardown_complete);
}
static boolean_t
{
switch (state) {
/*
* nothing to do on SESSION_UP
*/
case SESSION_DOWN:
break;
}
return (teardown_complete);
}
/*
*
* driver initialization functions
*
*/
void
{
struct wrsm_node_memseg *memseg;
sizeof (struct wrsm_node_memseg), KM_SLEEP);
}
void
{
#ifdef DEBUG
int i;
#endif
#ifdef DEBUG
/* verify that the segment is really not in use */
for (i = 0; i < WRSM_SEGID_HASH_SIZE; i++) {
}
#endif
}
void
{
network->rsm_ctlr_id));
/* this initiates all variables to 0 */
(void) wrsm_tl_add_handler(network,
(void) wrsm_tl_add_handler(network,
(void) wrsm_tl_add_handler(network,
/*
* Register for session teardown calls
*/
}
void
{
network->rsm_ctlr_id));
/*
* If there are importsegs or exportsegs left around which a client
* did not destroy prior to doing release controller, destroy them
* now.
*/
(void) wrsm_tl_add_handler(network,
(void) wrsm_tl_add_handler(network,
(void) wrsm_tl_add_handler(network,
}
void
wrsm_memseg_init(void)
{
}
void
wrsm_memseg_fini(void)
{
}
void
{
}
/*
* wrsm alloc routine used in place of kmem_{z}alloc()
* as it allocates memory from the non-relocatable heap arena
*/
void *
{
}
/*
* wrsm free routine used in place of kmem_{z}alloc()
* as it frees memory to the non-relocatable heap arena
*/
void
{
}