summaryrefslogtreecommitdiffstats
path: root/sys/pc98
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/pc98
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/pc98')
-rw-r--r--sys/pc98/i386/machdep.c37
-rw-r--r--sys/pc98/pc98/machdep.c37
2 files changed, 0 insertions, 74 deletions
diff --git a/sys/pc98/i386/machdep.c b/sys/pc98/i386/machdep.c
index 388db73..183cf65 100644
--- a/sys/pc98/i386/machdep.c
+++ b/sys/pc98/i386/machdep.c
@@ -176,7 +176,6 @@ static int ispc98 = 0;
#endif
SYSCTL_INT(_machdep, OID_AUTO, ispc98, CTLFLAG_RD, &ispc98, 0, "");
-long physmem = 0;
int cold = 1;
#ifdef COMPAT_43
@@ -187,42 +186,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;
#ifdef PC98
int Maxmem_under16M = 0;
diff --git a/sys/pc98/pc98/machdep.c b/sys/pc98/pc98/machdep.c
index 388db73..183cf65 100644
--- a/sys/pc98/pc98/machdep.c
+++ b/sys/pc98/pc98/machdep.c
@@ -176,7 +176,6 @@ static int ispc98 = 0;
#endif
SYSCTL_INT(_machdep, OID_AUTO, ispc98, CTLFLAG_RD, &ispc98, 0, "");
-long physmem = 0;
int cold = 1;
#ifdef COMPAT_43
@@ -187,42 +186,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;
#ifdef PC98
int Maxmem_under16M = 0;
OpenPOWER on IntegriCloud