Print this page
11528 Makefile.noget can get gone
11529 Use -Wno-maybe-initialized


   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) 2004, 2010, Oracle and/or its affiliates. All rights reserved.

  23  */
  24 /*
  25  * Copyright (c) 2010, Intel Corporation.
  26  * All rights reserved.
  27  */
  28 
  29 /*
  30  * UNIX machine dependent virtual memory support.
  31  */
  32 
  33 #ifndef _VM_DEP_H
  34 #define _VM_DEP_H
  35 
  36 
  37 #ifdef  __cplusplus
  38 extern "C" {
  39 #endif
  40 
  41 #include <sys/clock.h>
  42 #include <vm/hat_pte.h>


 288  * and page_get_contig_pages)
 289  *
 290  * MTYPE_START sets the initial mtype. -1 if the mtype range specified does
 291  * not contain mnode.
 292  *
 293  * MTYPE_NEXT sets the next mtype. -1 if there are no more valid
 294  * mtype in the range.
 295  */
 296 
 297 #define MTYPE_START(mnode, mtype, flags)                                \
 298         (mtype = mtype_func(mnode, mtype, flags))
 299 
 300 #define MTYPE_NEXT(mnode, mtype, flags) {                               \
 301         if (flags & PGI_MT_RANGE) {                                 \
 302                 mtype = mtype_func(mnode, mtype, flags | PGI_MT_NEXT);  \
 303         } else {                                                        \
 304                 mtype = -1;                                             \
 305         }                                                               \
 306 }
 307 
 308 extern int mtype_pgr_init(int *, page_t *, int, pgcnt_t);
 309 #define MTYPE_PGR_INIT(mtype, flags, pp, mnode, pgcnt)                  \
 310         (mtype = mtype_pgr_init(&flags, pp, mnode, pgcnt))
 311 
 312 #define MNODE_PGCNT(mnode)              mnode_pgcnt(mnode)
 313 
 314 extern void mnodetype_2_pfn(int, int, pfn_t *, pfn_t *);
 315 #define MNODETYPE_2_PFN(mnode, mtype, pfnlo, pfnhi)                     \
 316         mnodetype_2_pfn(mnode, mtype, &pfnlo, &pfnhi)
 317 
 318 #define PC_BIN_MUTEX(mnode, bin, flags) ((flags & PG_FREE_LIST) ?   \
 319         &fpc_mutex[(bin) & (NPC_MUTEX - 1)][mnode] :                    \
 320         &cpc_mutex[(bin) & (NPC_MUTEX - 1)][mnode])
 321 
 322 #define FPC_MUTEX(mnode, i)     (&fpc_mutex[i][mnode])
 323 #define CPC_MUTEX(mnode, i)     (&cpc_mutex[i][mnode])
 324 
 325 #ifdef DEBUG
 326 #define CHK_LPG(pp, szc)        chk_lpg(pp, szc)
 327 extern void     chk_lpg(page_t *, uchar_t);
 328 #else
 329 #define CHK_LPG(pp, szc)
 330 #endif




   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) 2004, 2010, Oracle and/or its affiliates. All rights reserved.
  23  * Copyright 2019 Joyent, Inc.
  24  */
  25 /*
  26  * Copyright (c) 2010, Intel Corporation.
  27  * All rights reserved.
  28  */
  29 
  30 /*
  31  * UNIX machine dependent virtual memory support.
  32  */
  33 
  34 #ifndef _VM_DEP_H
  35 #define _VM_DEP_H
  36 
  37 
  38 #ifdef  __cplusplus
  39 extern "C" {
  40 #endif
  41 
  42 #include <sys/clock.h>
  43 #include <vm/hat_pte.h>


 289  * and page_get_contig_pages)
 290  *
 291  * MTYPE_START sets the initial mtype. -1 if the mtype range specified does
 292  * not contain mnode.
 293  *
 294  * MTYPE_NEXT sets the next mtype. -1 if there are no more valid
 295  * mtype in the range.
 296  */
 297 
 298 #define MTYPE_START(mnode, mtype, flags)                                \
 299         (mtype = mtype_func(mnode, mtype, flags))
 300 
 301 #define MTYPE_NEXT(mnode, mtype, flags) {                               \
 302         if (flags & PGI_MT_RANGE) {                                 \
 303                 mtype = mtype_func(mnode, mtype, flags | PGI_MT_NEXT);  \
 304         } else {                                                        \
 305                 mtype = -1;                                             \
 306         }                                                               \
 307 }
 308 
 309 extern int mtype_pgr_init(int *, page_t *, pgcnt_t);
 310 #define MTYPE_PGR_INIT(mtype, flags, pp, pgcnt)                         \
 311         (mtype = mtype_pgr_init(&flags, pp, pgcnt))
 312 
 313 #define MNODE_PGCNT(mnode)              mnode_pgcnt(mnode)
 314 
 315 extern void mnodetype_2_pfn(int, int, pfn_t *, pfn_t *);
 316 #define MNODETYPE_2_PFN(mnode, mtype, pfnlo, pfnhi)                     \
 317         mnodetype_2_pfn(mnode, mtype, &pfnlo, &pfnhi)
 318 
 319 #define PC_BIN_MUTEX(mnode, bin, flags) ((flags & PG_FREE_LIST) ?   \
 320         &fpc_mutex[(bin) & (NPC_MUTEX - 1)][mnode] :                    \
 321         &cpc_mutex[(bin) & (NPC_MUTEX - 1)][mnode])
 322 
 323 #define FPC_MUTEX(mnode, i)     (&fpc_mutex[i][mnode])
 324 #define CPC_MUTEX(mnode, i)     (&cpc_mutex[i][mnode])
 325 
 326 #ifdef DEBUG
 327 #define CHK_LPG(pp, szc)        chk_lpg(pp, szc)
 328 extern void     chk_lpg(page_t *, uchar_t);
 329 #else
 330 #define CHK_LPG(pp, szc)
 331 #endif