seg_spt.h revision a98e9dbfaecb09c4032dc0076786bd835f25eab3
/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License (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 2008 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
#ifndef _VM_SEG_SPT_H
#define _VM_SEG_SPT_H
#pragma ident "%Z%%M% %I% %E% SMI"
#ifdef __cplusplus
extern "C" {
#endif
#ifndef _ASM
/*
* Passed data when creating spt segment.
*/
struct segspt_crargs {
};
typedef struct spt_data {
/*
* Initial memory allocation policy
* used during pre-allocation done in shmat()
*/
} spt_data_t;
/*
* Private data for spt_shm segment.
*/
typedef struct shm_data {
char *shm_vpage; /* indicating locked pages */
/*
* Memory allocation policy after shmat()
*/
} shm_data_t;
#endif
#ifdef _KERNEL
#ifndef _ASM
/*
* Functions used in shm.c to call ISM.
*/
#define spt_locked(a) ((a) & SHM_SHARE_MMU)
#define spt_pageable(a) ((a) & SHM_PAGEABLE)
/*
* This can be applied to a segment with seg->s_ops == &segspt_shmops
* to determine the real size of the ISM segment.
*/
/*
* This can be applied to a segment with seg->s_ops == &segspt_ops
* to determine the flags of the {D}ISM segment.
*/
/*
* For large page support
*/
extern int segvn_anypgsz;
#endif
/*
* In a 64-bit address space, we'll try to put ISM segments between
* PREDISM_BASE and PREDISM_BOUND. The HAT may use these constants to
* predict that a VA is contained by an ISM segment, which may optimize
* translation. The range must _only_ be treated as advisory; ISM segments
* may fall outside of the range, and non-ISM segments may be contained
* within the range.
* PREDISM_1T_BASESHIFT (1T).
* The HAT is still expecting that any VA larger than PREDISM_BASESHIFT
* translation)
*/
#define PREDISM_BASESHIFT 33
#define PREDISM_1T_BASESHIFT 40
#endif /* _KERNEL */
#ifdef __cplusplus
}
#endif
#endif /* _VM_SEG_SPT_H */