xhat_sfmmu.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 2004 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
#pragma ident "%Z%%M% %I% %E% SMI"
#include <vm/hat_sfmmu.h>
#include <vm/xhat_sfmmu.h>
/*
* Allocates a block that includes both struct xhat and
* provider-specific data.
*/
struct xhat_hme_blk *
{
struct xhat_hme_blk *xblk;
xblk = (struct xhat_hme_blk *)
/*
* Since we are always walking the list in the
* forward direction, we don't update prev pointers
*/
} else {
}
return (xblk);
}
/*
* Return the block to free_blks pool. The memory will
* be freed in the reclaim routine.
*/
void
{
}
/*
* Ran by kmem reaper thread. Also called when
* provider unregisters
*/
void
xhat_xblkcache_reclaim(void *arg)
{
struct xhat_hme_blk *xblk;
/*
* Put free blocks on a separate list
* and free free_blks pointer.
*/
}
}
}
/*
* Insert the xhat block (or, more precisely, the sf_hment)
* into page's p_mapping list.
*/
{
struct xhat_hme_blk *xblk;
return (0);
/* Add a "user" to the XHAT */
/* Insert at the head of p_mapping list */
/* Only one tte per xhat_hme_blk, at least for now */
} else {
/* EMPTY */
}
/*
* Update number of mappings.
*/
return (pfn);
}
/*
* mlist_locked indicates whether the mapping list
* is locked. If provider did not lock it himself, the
* only time it is locked in HAT layer is in
* hat_pageunload().
*/
int
{
if (!mlist_locked)
else
} else {
}
}
if (!mlist_locked)
return (0);
}