xref: /onnv-gate/usr/src/uts/common/os/mem_config_stubs.c (revision 12004:93f274d4a367)
10Sstevel@tonic-gate /*
20Sstevel@tonic-gate  * CDDL HEADER START
30Sstevel@tonic-gate  *
40Sstevel@tonic-gate  * The contents of this file are subject to the terms of the
53446Smrj  * Common Development and Distribution License (the "License").
63446Smrj  * You may not use this file except in compliance with the License.
70Sstevel@tonic-gate  *
80Sstevel@tonic-gate  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
90Sstevel@tonic-gate  * or http://www.opensolaris.org/os/licensing.
100Sstevel@tonic-gate  * See the License for the specific language governing permissions
110Sstevel@tonic-gate  * and limitations under the License.
120Sstevel@tonic-gate  *
130Sstevel@tonic-gate  * When distributing Covered Code, include this CDDL HEADER in each
140Sstevel@tonic-gate  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
150Sstevel@tonic-gate  * If applicable, add the following below this CDDL HEADER, with the
160Sstevel@tonic-gate  * fields enclosed by brackets "[]" replaced with your own identifying
170Sstevel@tonic-gate  * information: Portions Copyright [yyyy] [name of copyright owner]
180Sstevel@tonic-gate  *
190Sstevel@tonic-gate  * CDDL HEADER END
200Sstevel@tonic-gate  */
210Sstevel@tonic-gate /*
22*12004Sjiang.liu@intel.com  * Copyright 2010 Sun Microsystems, Inc.  All rights reserved.
230Sstevel@tonic-gate  * Use is subject to license terms.
240Sstevel@tonic-gate  */
250Sstevel@tonic-gate 
260Sstevel@tonic-gate #include <sys/types.h>
270Sstevel@tonic-gate #include <sys/cmn_err.h>
280Sstevel@tonic-gate #include <sys/errno.h>
290Sstevel@tonic-gate #include <sys/debug.h>
300Sstevel@tonic-gate #include <vm/page.h>
310Sstevel@tonic-gate #include <sys/mem_config.h>
320Sstevel@tonic-gate #include <sys/mem_cage.h>
330Sstevel@tonic-gate 
340Sstevel@tonic-gate /* These should be in a platform stubs file. */
350Sstevel@tonic-gate 
360Sstevel@tonic-gate int kcage_on;
370Sstevel@tonic-gate kthread_id_t kcage_cageout_thread;
380Sstevel@tonic-gate pgcnt_t kcage_freemem;
390Sstevel@tonic-gate pgcnt_t kcage_throttlefree;
400Sstevel@tonic-gate pgcnt_t kcage_minfree;
410Sstevel@tonic-gate pgcnt_t kcage_desfree;
420Sstevel@tonic-gate pgcnt_t kcage_needfree;
430Sstevel@tonic-gate pgcnt_t	kcage_lotsfree = 1;
440Sstevel@tonic-gate 
45*12004Sjiang.liu@intel.com #if !defined(__x86) || defined(__xpv)
460Sstevel@tonic-gate /*ARGSUSED*/
470Sstevel@tonic-gate int
kphysm_setup_func_register(kphysm_setup_vector_t * vec,void * arg)480Sstevel@tonic-gate kphysm_setup_func_register(kphysm_setup_vector_t *vec, void *arg)
490Sstevel@tonic-gate {
500Sstevel@tonic-gate 	return (0);
510Sstevel@tonic-gate }
520Sstevel@tonic-gate 
530Sstevel@tonic-gate /*ARGSUSED*/
540Sstevel@tonic-gate void
kphysm_setup_func_unregister(kphysm_setup_vector_t * vec,void * arg)550Sstevel@tonic-gate kphysm_setup_func_unregister(kphysm_setup_vector_t *vec, void *arg)
560Sstevel@tonic-gate {
570Sstevel@tonic-gate }
58*12004Sjiang.liu@intel.com #endif
590Sstevel@tonic-gate 
600Sstevel@tonic-gate /*ARGSUSED*/
610Sstevel@tonic-gate int
kcage_create_throttle(pgcnt_t npages,int flags)620Sstevel@tonic-gate kcage_create_throttle(pgcnt_t npages, int flags)
630Sstevel@tonic-gate {
640Sstevel@tonic-gate 	return (0);
650Sstevel@tonic-gate }
660Sstevel@tonic-gate 
670Sstevel@tonic-gate void
kcage_cageout_init(void)680Sstevel@tonic-gate kcage_cageout_init(void)
690Sstevel@tonic-gate {
700Sstevel@tonic-gate }
710Sstevel@tonic-gate 
720Sstevel@tonic-gate void
kcage_cageout_wakeup()730Sstevel@tonic-gate kcage_cageout_wakeup()
740Sstevel@tonic-gate {
750Sstevel@tonic-gate }
760Sstevel@tonic-gate 
770Sstevel@tonic-gate void
kcage_tick()780Sstevel@tonic-gate kcage_tick()
790Sstevel@tonic-gate {
800Sstevel@tonic-gate }
810Sstevel@tonic-gate 
820Sstevel@tonic-gate /*ARGSUSED*/
830Sstevel@tonic-gate int
kcage_current_pfn(pfn_t * pfn)840Sstevel@tonic-gate kcage_current_pfn(pfn_t *pfn)
850Sstevel@tonic-gate {
860Sstevel@tonic-gate 	return (0);
870Sstevel@tonic-gate }
88