summaryrefslogtreecommitdiffstats
path: root/sys/amd64
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/amd64
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/amd64')
-rw-r--r--sys/amd64/amd64/machdep.c37
1 files changed, 0 insertions, 37 deletions
diff --git a/sys/amd64/amd64/machdep.c b/sys/amd64/amd64/machdep.c
index c7efb3b..fb6c1b2 100644
--- a/sys/amd64/amd64/machdep.c
+++ b/sys/amd64/amd64/machdep.c
@@ -159,7 +159,6 @@ SYSCTL_INT(_debug, OID_AUTO, tlb_flush_count,
CTLFLAG_RD, &tlb_flush_count, 0, "");
#endif
-long physmem = 0;
int cold = 1;
#ifdef COMPAT_43
@@ -170,42 +169,6 @@ static void freebsd4_sendsig(sig_t catcher, int sig, sigset_t *mask,
u_long code);
#endif
-static int
-sysctl_hw_physmem(SYSCTL_HANDLER_ARGS)
-{
- u_long val;
-
- val = ctob(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 = ctob(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", "");
-
-static int
-sysctl_hw_availpages(SYSCTL_HANDLER_ARGS)
-{
- u_long val;
-
- val = i386_btop(avail_end - avail_start);
- return (sysctl_handle_long(oidp, &val, 0, req));
-}
-
-SYSCTL_PROC(_hw, OID_AUTO, availpages, CTLTYPE_ULONG | CTLFLAG_RD,
- 0, 0, sysctl_hw_availpages, "LU", "");
-
long Maxmem = 0;
vm_offset_t phys_avail[10];
OpenPOWER on IntegriCloud