1 /*
   2  * CDDL HEADER START
   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 2008 Sun Microsystems, Inc.  All rights reserved.
  23  * Use is subject to license terms.
  24  */
  25 
  26 /*
  27  *      This file contains interface code to the kernel.
  28  */
  29 
  30 /* LINTLIBRARY */
  31 
  32 #include <sys/types.h>
  33 #include <sys/param.h>
  34 #include <sys/errno.h>
  35 #include <sys/kmem.h>
  36 #include <sys/ksynch.h>
  37 #include <sys/cmn_err.h>
  38 #include <sys/uio.h>
  39 #include <sys/conf.h>
  40 #include <sys/ddi.h>
  41 
  42 #include <sys/nsctl/nsctl.h>
  43 #include "nsc_list.h"
  44 
  45 /*
  46  * _nsc_init_start
  47  *
  48  * ARGUMENTS:
  49  *
  50  * RETURNS:
  51  *
  52  * USAGE:
  53  *
  54  * CALLED BY:
  55  */
  56 void
  57 _nsc_init_start(void)
  58 {
  59 }
  60 
  61 /*
  62  * _nsc_init_os -
  63  *
  64  * ARGUMENTS:
  65  *
  66  * RETURNS:
  67  *
  68  * USAGE:
  69  *
  70  * CALLED BY:
  71  */
  72 void
  73 _nsc_init_os(void)
  74 {
  75 }
  76 
  77 /*
  78  * _nsc_deinit_os -
  79  *
  80  * ARGUMENTS:
  81  *
  82  * RETURNS:
  83  *
  84  * USAGE:
  85  *
  86  * CALLED BY:
  87  */
  88 void
  89 _nsc_deinit_os(void)
  90 {
  91 }
  92 
  93 /* dummy routine unless RMS/MC is really running */
  94 void
  95 _nsc_self_alive()
  96 {
  97 }
  98 
  99 /*
 100  * Check other nodes: checks for the heart_beat of other nodes and decides
 101  * if a node that was up went down... or a node that was down is now
 102  * up. Events NODE_UP and NODE_DOWN are posted to myself (this node)
 103  * Any processing that happens in these event handlers SHOULD abide by
 104  * the health monitor rules for the health monitor to work correctly.
 105  * If excessive computation during these events is required, consider the
 106  * possibility of forking of a process OR breaking up the computation into
 107  * smaller parts, and making sure that we call "SELF_ALIVE()" "often".
 108  * This is not the suggested mechanism, but there are times when we need it.
 109  */
 110 
 111 void
 112 _nsc_check_other_nodes()
 113 {
 114 }
 115 
 116 /*
 117  * Is our partner active ? (Should never block)
 118  */
 119 int
 120 alternate_health_hbeat()
 121 {
 122         return (0);
 123 }
 124 
 125 
 126 static int
 127 mark_rm_pages_to_dump(addr, size, dump)
 128 caddr_t addr;
 129 int size, dump;
 130 {
 131         return (0);
 132 }
 133 
 134 
 135 void
 136 _nsc_mark_pages(caddr_t addr, size_t size, int dump)
 137 {
 138         if (mark_rm_pages_to_dump(addr, (int)size, dump) < 0)
 139                 cmn_err(CE_WARN, "_nsc_mark_pages: %s failed - 0x%p size %d",
 140                         (dump ? "mark" : "unmark"), addr, (int)size);
 141 }