aboutsummaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
Diffstat (limited to 'sys')
-rw-r--r--sys/alpha/alpha/machdep.c25
1 files changed, 23 insertions, 2 deletions
diff --git a/sys/alpha/alpha/machdep.c b/sys/alpha/alpha/machdep.c
index 6d5492b22c720..b027e9870e901 100644
--- a/sys/alpha/alpha/machdep.c
+++ b/sys/alpha/alpha/machdep.c
@@ -23,7 +23,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: machdep.c,v 1.31 1999/01/26 02:49:51 julian Exp $
+ * $Id: machdep.c,v 1.32 1999/02/22 15:13:33 bde Exp $
*/
/*-
* Copyright (c) 1998 The NetBSD Foundation, Inc.
@@ -200,6 +200,27 @@ int ncpus; /* number of cpus */
vm_offset_t phys_avail[10];
+static int
+sysctl_hw_physmem SYSCTL_HANDLER_ARGS
+{
+ int error = sysctl_handle_int(oidp, 0, alpha_ptob(physmem), req);
+ return (error);
+}
+
+SYSCTL_PROC(_hw, HW_PHYSMEM, physmem, CTLTYPE_INT|CTLFLAG_RD,
+ 0, 0, sysctl_hw_physmem, "I", "");
+
+static int
+sysctl_hw_usermem SYSCTL_HANDLER_ARGS
+{
+ int error = sysctl_handle_int(oidp, 0,
+ alpha_ptob(physmem - cnt.v_wire_count), req);
+ return (error);
+}
+
+SYSCTL_PROC(_hw, HW_USERMEM, usermem, CTLTYPE_INT|CTLFLAG_RD,
+ 0, 0, sysctl_hw_usermem, "I", "");
+
SYSCTL_INT(_hw, OID_AUTO, availpages, CTLFLAG_RD, &physmem, 0, "");
/* must be 2 less so 0 0 can signal end of chunks */
@@ -1227,7 +1248,7 @@ remrq(p)
REMRQ(rtqs, whichrtqs, pri, p);
} else {
/* idle priority */
- REMRQ(rtqs, whichrtqs, pri, p);
+ REMRQ(idqs, whichidqs, pri, p);
}
}
}