summaryrefslogtreecommitdiffstats
path: root/sys/alpha
diff options
context:
space:
mode:
authortmm <tmm@FreeBSD.org>2002-11-07 23:57:17 +0000
committertmm <tmm@FreeBSD.org>2002-11-07 23:57:17 +0000
commitf740e3df9bd1ce0fef776b6c9444176d4c64bcaa (patch)
tree4cf885259d3ca54239f82ab003a069f284512d18 /sys/alpha
parentaae3d5b8b6dbe84cd25f622726f44f46008df89a (diff)
downloadFreeBSD-src-f740e3df9bd1ce0fef776b6c9444176d4c64bcaa.zip
FreeBSD-src-f740e3df9bd1ce0fef776b6c9444176d4c64bcaa.tar.gz
Move the definitions of the hw.physmem, hw.usermem and hw.availpages
sysctls to MI code; this reduces code duplication and makes all of them available on sparc64, and the latter two on powerpc. The semantics by the i386 and pc98 hw.availpages is slightly changed: previously, holes between ranges of available pages would be included, while they are excluded now. The new behaviour should be more correct and brings i386 in line with the other architectures. Move physmem to vm/vm_init.c, where this variable is used in MI code.
Diffstat (limited to 'sys/alpha')
-rw-r--r--sys/alpha/alpha/machdep.c27
1 files changed, 0 insertions, 27 deletions
diff --git a/sys/alpha/alpha/machdep.c b/sys/alpha/alpha/machdep.c
index 796b250..1c79652 100644
--- a/sys/alpha/alpha/machdep.c
+++ b/sys/alpha/alpha/machdep.c
@@ -192,7 +192,6 @@ struct msgbuf *msgbufp=0;
long Maxmem = 0;
long totalphysmem; /* total amount of physical memory in system */
-long physmem; /* physical memory used by NetBSD + some rsvd */
long resvmem; /* amount of memory reserved for PROM */
long unusedmem; /* amount of memory for OS that we don't use */
long unknownmem; /* amount of memory with an unknown use */
@@ -200,32 +199,6 @@ int ncpus; /* number of cpus */
vm_offset_t phys_avail[10];
-static int
-sysctl_hw_physmem(SYSCTL_HANDLER_ARGS)
-{
- u_long val;
-
- val = alpha_ptob(physmem);
- return (sysctl_handle_long(oidp, &val, 0, req));
-}
-
-SYSCTL_PROC(_hw, HW_PHYSMEM, physmem, CTLTYPE_ULONG | CTLFLAG_RD,
- 0, 0, sysctl_hw_physmem, "LU", "");
-
-static int
-sysctl_hw_usermem(SYSCTL_HANDLER_ARGS)
-{
- u_long val;
-
- val = alpha_ptob(physmem - cnt.v_wire_count);
- return (sysctl_handle_long(oidp, &val, 0, req));
-}
-
-SYSCTL_PROC(_hw, HW_USERMEM, usermem, CTLTYPE_ULONG | CTLFLAG_RD,
- 0, 0, sysctl_hw_usermem, "LU", "");
-
-SYSCTL_ULONG(_hw, OID_AUTO, availpages, CTLFLAG_RD, &physmem, 0, "");
-
/* must be 2 less so 0 0 can signal end of chunks */
#define PHYS_AVAIL_ARRAY_END ((sizeof(phys_avail) / sizeof(vm_offset_t)) - 2)
OpenPOWER on IntegriCloud