summaryrefslogtreecommitdiffstats
path: root/sys/ia64
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/ia64
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/ia64')
-rw-r--r--sys/ia64/ia64/machdep.c27
1 files changed, 0 insertions, 27 deletions
diff --git a/sys/ia64/ia64/machdep.c b/sys/ia64/ia64/machdep.c
index 3a3c150..d1d7c28 100644
--- a/sys/ia64/ia64/machdep.c
+++ b/sys/ia64/ia64/machdep.c
@@ -145,36 +145,9 @@ SYSINIT(cpu, SI_SUB_CPU, SI_ORDER_FIRST, cpu_startup, NULL)
struct msgbuf *msgbufp=0;
long Maxmem = 0;
-long physmem; /* Physical conventional memory. */
vm_offset_t phys_avail[100];
-static int
-sysctl_hw_physmem(SYSCTL_HANDLER_ARGS)
-{
- u_long val;
-
- val = ia64_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 = ia64_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