3  *
   4  * The contents of this file are subject to the terms of the
   5  * Common Development and Distribution License (the "License").
   6  * You may not use this file except in compliance with the License.
   7  *
   8  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
   9  * or http://www.opensolaris.org/os/licensing.
  10  * See the License for the specific language governing permissions
  11  * and limitations under the License.
  12  *
  13  * When distributing Covered Code, include this CDDL HEADER in each
  14  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  15  * If applicable, add the following below this CDDL HEADER, with the
  16  * fields enclosed by brackets "[]" replaced with your own identifying
  17  * information: Portions Copyright [yyyy] [name of copyright owner]
  18  *
  19  * CDDL HEADER END
  20  */
  21 /*
  22  * Copyright (c) 1998, 2010, Oracle and/or its affiliates. All rights reserved.
  23  */
  24 
  25 #include <sys/types.h>
  26 #include <sys/t_lock.h>
  27 #include <sys/param.h>
  28 #include <sys/sysmacros.h>
  29 #include <sys/tuneable.h>
  30 #include <sys/systm.h>
  31 #include <sys/vm.h>
  32 #include <sys/kmem.h>
  33 #include <sys/vmem.h>
  34 #include <sys/mman.h>
  35 #include <sys/cmn_err.h>
  36 #include <sys/debug.h>
  37 #include <sys/dumphdr.h>
  38 #include <sys/bootconf.h>
  39 #include <sys/lgrp.h>
  40 #include <vm/seg_kmem.h>
  41 #include <vm/hat.h>
  42 #include <vm/page.h>
 
 
 756         segkmem_badop();
 757         return (0);
 758 }
 759 
 760 /*ARGSUSED*/
 761 static lgrp_mem_policy_info_t *
 762 segkmem_getpolicy(struct seg *seg, caddr_t addr)
 763 {
 764         return (NULL);
 765 }
 766 
 767 /*ARGSUSED*/
 768 static int
 769 segkmem_capable(struct seg *seg, segcapability_t capability)
 770 {
 771         if (capability == S_CAPABILITY_NOMINFLT)
 772                 return (1);
 773         return (0);
 774 }
 775 
 776 static struct seg_ops segkmem_ops = {
 777         SEGKMEM_BADOP(int),             /* dup */
 778         SEGKMEM_BADOP(int),             /* unmap */
 779         SEGKMEM_BADOP(void),            /* free */
 780         segkmem_fault,
 781         SEGKMEM_BADOP(faultcode_t),     /* faulta */
 782         segkmem_setprot,
 783         segkmem_checkprot,
 784         segkmem_kluster,
 785         SEGKMEM_BADOP(size_t),          /* swapout */
 786         SEGKMEM_BADOP(int),             /* sync */
 787         SEGKMEM_BADOP(size_t),          /* incore */
 788         SEGKMEM_BADOP(int),             /* lockop */
 789         SEGKMEM_BADOP(int),             /* getprot */
 790         SEGKMEM_BADOP(u_offset_t),      /* getoffset */
 791         SEGKMEM_BADOP(int),             /* gettype */
 792         SEGKMEM_BADOP(int),             /* getvp */
 793         SEGKMEM_BADOP(int),             /* advise */
 794         segkmem_dump,
 795         segkmem_pagelock,
 796         SEGKMEM_BADOP(int),             /* setpgsz */
 
 | 
 
 
   3  *
   4  * The contents of this file are subject to the terms of the
   5  * Common Development and Distribution License (the "License").
   6  * You may not use this file except in compliance with the License.
   7  *
   8  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
   9  * or http://www.opensolaris.org/os/licensing.
  10  * See the License for the specific language governing permissions
  11  * and limitations under the License.
  12  *
  13  * When distributing Covered Code, include this CDDL HEADER in each
  14  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  15  * If applicable, add the following below this CDDL HEADER, with the
  16  * fields enclosed by brackets "[]" replaced with your own identifying
  17  * information: Portions Copyright [yyyy] [name of copyright owner]
  18  *
  19  * CDDL HEADER END
  20  */
  21 /*
  22  * Copyright (c) 1998, 2010, Oracle and/or its affiliates. All rights reserved.
  23  * Copyright 2016 Joyent, Inc.
  24  */
  25 
  26 #include <sys/types.h>
  27 #include <sys/t_lock.h>
  28 #include <sys/param.h>
  29 #include <sys/sysmacros.h>
  30 #include <sys/tuneable.h>
  31 #include <sys/systm.h>
  32 #include <sys/vm.h>
  33 #include <sys/kmem.h>
  34 #include <sys/vmem.h>
  35 #include <sys/mman.h>
  36 #include <sys/cmn_err.h>
  37 #include <sys/debug.h>
  38 #include <sys/dumphdr.h>
  39 #include <sys/bootconf.h>
  40 #include <sys/lgrp.h>
  41 #include <vm/seg_kmem.h>
  42 #include <vm/hat.h>
  43 #include <vm/page.h>
 
 
 757         segkmem_badop();
 758         return (0);
 759 }
 760 
 761 /*ARGSUSED*/
 762 static lgrp_mem_policy_info_t *
 763 segkmem_getpolicy(struct seg *seg, caddr_t addr)
 764 {
 765         return (NULL);
 766 }
 767 
 768 /*ARGSUSED*/
 769 static int
 770 segkmem_capable(struct seg *seg, segcapability_t capability)
 771 {
 772         if (capability == S_CAPABILITY_NOMINFLT)
 773                 return (1);
 774         return (0);
 775 }
 776 
 777 struct seg_ops segkmem_ops = {
 778         SEGKMEM_BADOP(int),             /* dup */
 779         SEGKMEM_BADOP(int),             /* unmap */
 780         SEGKMEM_BADOP(void),            /* free */
 781         segkmem_fault,
 782         SEGKMEM_BADOP(faultcode_t),     /* faulta */
 783         segkmem_setprot,
 784         segkmem_checkprot,
 785         segkmem_kluster,
 786         SEGKMEM_BADOP(size_t),          /* swapout */
 787         SEGKMEM_BADOP(int),             /* sync */
 788         SEGKMEM_BADOP(size_t),          /* incore */
 789         SEGKMEM_BADOP(int),             /* lockop */
 790         SEGKMEM_BADOP(int),             /* getprot */
 791         SEGKMEM_BADOP(u_offset_t),      /* getoffset */
 792         SEGKMEM_BADOP(int),             /* gettype */
 793         SEGKMEM_BADOP(int),             /* getvp */
 794         SEGKMEM_BADOP(int),             /* advise */
 795         segkmem_dump,
 796         segkmem_pagelock,
 797         SEGKMEM_BADOP(int),             /* setpgsz */
 
 |