diff options
-rw-r--r-- | sys/alpha/alpha/machdep.c | 33 | ||||
-rw-r--r-- | sys/alpha/include/md_var.h | 2 | ||||
-rw-r--r-- | sys/alpha/osf1/osf1_misc.c | 2 | ||||
-rw-r--r-- | sys/amd64/amd64/machdep.c | 25 | ||||
-rw-r--r-- | sys/amd64/include/md_var.h | 2 | ||||
-rw-r--r-- | sys/i386/i386/machdep.c | 25 | ||||
-rw-r--r-- | sys/i386/include/md_var.h | 2 | ||||
-rw-r--r-- | sys/ia64/ia64/machdep.c | 27 | ||||
-rw-r--r-- | sys/ia64/include/md_var.h | 2 | ||||
-rw-r--r-- | sys/kern/subr_param.c | 2 | ||||
-rw-r--r-- | sys/kern/vfs_bio.c | 2 | ||||
-rw-r--r-- | sys/pc98/i386/machdep.c | 36 | ||||
-rw-r--r-- | sys/pc98/pc98/machdep.c | 36 | ||||
-rw-r--r-- | sys/powerpc/aim/machdep.c | 14 | ||||
-rw-r--r-- | sys/powerpc/include/md_var.h | 2 | ||||
-rw-r--r-- | sys/powerpc/powerpc/machdep.c | 14 | ||||
-rw-r--r-- | sys/sparc64/include/md_var.h | 2 | ||||
-rw-r--r-- | sys/sparc64/sparc64/machdep.c | 4 | ||||
-rw-r--r-- | sys/sys/buf.h | 2 | ||||
-rw-r--r-- | sys/sys/systm.h | 4 | ||||
-rw-r--r-- | sys/vm/vm_init.c | 4 |
21 files changed, 149 insertions, 93 deletions
diff --git a/sys/alpha/alpha/machdep.c b/sys/alpha/alpha/machdep.c index af5e44b..d2ebb83 100644 --- a/sys/alpha/alpha/machdep.c +++ b/sys/alpha/alpha/machdep.c @@ -189,13 +189,13 @@ SYSINIT(cpu, SI_SUB_CPU, SI_ORDER_FIRST, cpu_startup, NULL) struct msgbuf *msgbufp=0; -int Maxmem = 0; +long Maxmem = 0; -int totalphysmem; /* total amount of physical memory in system */ -int physmem; /* physical memory used by NetBSD + some rsvd */ -int resvmem; /* amount of memory reserved for PROM */ -int unusedmem; /* amount of memory for OS that we don't use */ -int unknownmem; /* amount of memory with an unknown use */ +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 */ int ncpus; /* number of cpus */ vm_offset_t phys_avail[10]; @@ -203,23 +203,30 @@ 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); + int error; + unsigned long val; + + val = alpha_ptob(physmem); + error = sysctl_handle_long(oidp, &val, 0, req); return (error); } -SYSCTL_PROC(_hw, HW_PHYSMEM, physmem, CTLTYPE_INT|CTLFLAG_RD, - 0, 0, sysctl_hw_physmem, "I", ""); +SYSCTL_PROC(_hw, HW_PHYSMEM, physmem, CTLTYPE_ULONG|CTLFLAG_RD, + 0, 0, sysctl_hw_physmem, "LU", ""); static int sysctl_hw_usermem(SYSCTL_HANDLER_ARGS) { - int error = sysctl_handle_int(oidp, 0, - alpha_ptob(physmem - cnt.v_wire_count), req); + int error; + unsigned long val; + + val = alpha_ptob(physmem - cnt.v_wire_count); + error = sysctl_handle_long(oidp, &val, 0, req); return (error); } -SYSCTL_PROC(_hw, HW_USERMEM, usermem, CTLTYPE_INT|CTLFLAG_RD, - 0, 0, sysctl_hw_usermem, "I", ""); +SYSCTL_PROC(_hw, HW_USERMEM, usermem, CTLTYPE_ULONG|CTLFLAG_RD, + 0, 0, sysctl_hw_usermem, "LU", ""); SYSCTL_INT(_hw, OID_AUTO, availpages, CTLFLAG_RD, &physmem, 0, ""); diff --git a/sys/alpha/include/md_var.h b/sys/alpha/include/md_var.h index b43db60..b59cb7d 100644 --- a/sys/alpha/include/md_var.h +++ b/sys/alpha/include/md_var.h @@ -36,7 +36,7 @@ extern char sigcode[]; extern char esigcode[]; extern int szsigcode; -extern int Maxmem; +extern long Maxmem; extern int busdma_swi_pending; struct fpreg; diff --git a/sys/alpha/osf1/osf1_misc.c b/sys/alpha/osf1/osf1_misc.c index 8dca370..603747e 100644 --- a/sys/alpha/osf1/osf1_misc.c +++ b/sys/alpha/osf1/osf1_misc.c @@ -256,7 +256,7 @@ osf1_open(td, uap) return open(td, &a); } -extern int totalphysmem; +extern long totalphysmem; int osf1_getsysinfo(td, uap) diff --git a/sys/amd64/amd64/machdep.c b/sys/amd64/amd64/machdep.c index 6cd3bfc..ec6e05c 100644 --- a/sys/amd64/amd64/machdep.c +++ b/sys/amd64/amd64/machdep.c @@ -148,7 +148,7 @@ SYSCTL_INT(_debug, OID_AUTO, tlb_flush_count, CTLFLAG_RD, &tlb_flush_count, 0, ""); #endif -int physmem = 0; +long physmem = 0; int cold = 1; #ifdef COMPAT_43 @@ -158,23 +158,30 @@ static void osendsig(sig_t catcher, int sig, sigset_t *mask, u_long code); static int sysctl_hw_physmem(SYSCTL_HANDLER_ARGS) { - int error = sysctl_handle_int(oidp, 0, ctob(physmem), req); + int error; + unsigned long val; + + val = ctob(physmem); + error = sysctl_handle_int(oidp, &val, 0, req); return (error); } -SYSCTL_PROC(_hw, HW_PHYSMEM, physmem, CTLTYPE_INT|CTLFLAG_RD, - 0, 0, sysctl_hw_physmem, "IU", ""); +SYSCTL_PROC(_hw, HW_PHYSMEM, physmem, CTLTYPE_ULONG|CTLFLAG_RD, + 0, 0, sysctl_hw_physmem, "LU", ""); static int sysctl_hw_usermem(SYSCTL_HANDLER_ARGS) { - int error = sysctl_handle_int(oidp, 0, - ctob(physmem - cnt.v_wire_count), req); + int error; + unsigned long val; + + val = ctob(physmem - cnt.v_wire_count); + error = sysctl_handle_int(oidp, &val, 0, req); return (error); } -SYSCTL_PROC(_hw, HW_USERMEM, usermem, CTLTYPE_INT|CTLFLAG_RD, - 0, 0, sysctl_hw_usermem, "IU", ""); +SYSCTL_PROC(_hw, HW_USERMEM, usermem, CTLTYPE_ULONG|CTLFLAG_RD, + 0, 0, sysctl_hw_usermem, "LU", ""); static int sysctl_hw_availpages(SYSCTL_HANDLER_ARGS) @@ -187,7 +194,7 @@ sysctl_hw_availpages(SYSCTL_HANDLER_ARGS) SYSCTL_PROC(_hw, OID_AUTO, availpages, CTLTYPE_INT|CTLFLAG_RD, 0, 0, sysctl_hw_availpages, "I", ""); -int Maxmem = 0; +long Maxmem = 0; vm_offset_t phys_avail[10]; diff --git a/sys/amd64/include/md_var.h b/sys/amd64/include/md_var.h index 203f45c..f449c04 100644 --- a/sys/amd64/include/md_var.h +++ b/sys/amd64/include/md_var.h @@ -36,7 +36,7 @@ * Miscellaneous machine-dependent declarations. */ -extern int Maxmem; +extern long Maxmem; extern u_int atdevbase; /* offset in virtual memory of ISA io mem */ extern void (*bcopy_vector)(const void *from, void *to, size_t len); extern int busdma_swi_pending; diff --git a/sys/i386/i386/machdep.c b/sys/i386/i386/machdep.c index 6cd3bfc..ec6e05c 100644 --- a/sys/i386/i386/machdep.c +++ b/sys/i386/i386/machdep.c @@ -148,7 +148,7 @@ SYSCTL_INT(_debug, OID_AUTO, tlb_flush_count, CTLFLAG_RD, &tlb_flush_count, 0, ""); #endif -int physmem = 0; +long physmem = 0; int cold = 1; #ifdef COMPAT_43 @@ -158,23 +158,30 @@ static void osendsig(sig_t catcher, int sig, sigset_t *mask, u_long code); static int sysctl_hw_physmem(SYSCTL_HANDLER_ARGS) { - int error = sysctl_handle_int(oidp, 0, ctob(physmem), req); + int error; + unsigned long val; + + val = ctob(physmem); + error = sysctl_handle_int(oidp, &val, 0, req); return (error); } -SYSCTL_PROC(_hw, HW_PHYSMEM, physmem, CTLTYPE_INT|CTLFLAG_RD, - 0, 0, sysctl_hw_physmem, "IU", ""); +SYSCTL_PROC(_hw, HW_PHYSMEM, physmem, CTLTYPE_ULONG|CTLFLAG_RD, + 0, 0, sysctl_hw_physmem, "LU", ""); static int sysctl_hw_usermem(SYSCTL_HANDLER_ARGS) { - int error = sysctl_handle_int(oidp, 0, - ctob(physmem - cnt.v_wire_count), req); + int error; + unsigned long val; + + val = ctob(physmem - cnt.v_wire_count); + error = sysctl_handle_int(oidp, &val, 0, req); return (error); } -SYSCTL_PROC(_hw, HW_USERMEM, usermem, CTLTYPE_INT|CTLFLAG_RD, - 0, 0, sysctl_hw_usermem, "IU", ""); +SYSCTL_PROC(_hw, HW_USERMEM, usermem, CTLTYPE_ULONG|CTLFLAG_RD, + 0, 0, sysctl_hw_usermem, "LU", ""); static int sysctl_hw_availpages(SYSCTL_HANDLER_ARGS) @@ -187,7 +194,7 @@ sysctl_hw_availpages(SYSCTL_HANDLER_ARGS) SYSCTL_PROC(_hw, OID_AUTO, availpages, CTLTYPE_INT|CTLFLAG_RD, 0, 0, sysctl_hw_availpages, "I", ""); -int Maxmem = 0; +long Maxmem = 0; vm_offset_t phys_avail[10]; diff --git a/sys/i386/include/md_var.h b/sys/i386/include/md_var.h index 203f45c..f449c04 100644 --- a/sys/i386/include/md_var.h +++ b/sys/i386/include/md_var.h @@ -36,7 +36,7 @@ * Miscellaneous machine-dependent declarations. */ -extern int Maxmem; +extern long Maxmem; extern u_int atdevbase; /* offset in virtual memory of ISA io mem */ extern void (*bcopy_vector)(const void *from, void *to, size_t len); extern int busdma_swi_pending; diff --git a/sys/ia64/ia64/machdep.c b/sys/ia64/ia64/machdep.c index 69fb171..0c04a66 100644 --- a/sys/ia64/ia64/machdep.c +++ b/sys/ia64/ia64/machdep.c @@ -146,33 +146,40 @@ SYSINIT(cpu, SI_SUB_CPU, SI_ORDER_FIRST, cpu_startup, NULL) struct msgbuf *msgbufp=0; -int Maxmem = 0; -int physmem; /* Physical conventional memory. */ +long Maxmem = 0; +long physmem; /* Physical conventional memory. */ vm_offset_t phys_avail[100]; static int sysctl_hw_physmem(SYSCTL_HANDLER_ARGS) { - int error = sysctl_handle_int(oidp, 0, ia64_ptob(physmem), req); + int error; + unsigned long val; + + val = ia64_ptob(physmem); + error = sysctl_handle_long(oidp, &val, 0, req); return (error); } -SYSCTL_PROC(_hw, HW_PHYSMEM, physmem, CTLTYPE_INT|CTLFLAG_RD, - 0, 0, sysctl_hw_physmem, "I", ""); +SYSCTL_PROC(_hw, HW_PHYSMEM, physmem, CTLTYPE_ULONG|CTLFLAG_RD, + 0, 0, sysctl_hw_physmem, "LU", ""); static int sysctl_hw_usermem(SYSCTL_HANDLER_ARGS) { - int error = sysctl_handle_int(oidp, 0, - ia64_ptob(physmem - cnt.v_wire_count), req); + int error; + unsigned long val; + + val = ia64_ptob(physmem - cnt.v_wire_count); + error = sysctl_handle_long(oidp, &val, 0, req); return (error); } -SYSCTL_PROC(_hw, HW_USERMEM, usermem, CTLTYPE_INT|CTLFLAG_RD, - 0, 0, sysctl_hw_usermem, "I", ""); +SYSCTL_PROC(_hw, HW_USERMEM, usermem, CTLTYPE_ULONG|CTLFLAG_RD, + 0, 0, sysctl_hw_usermem, "LU", ""); -SYSCTL_INT(_hw, OID_AUTO, availpages, CTLFLAG_RD, &physmem, 0, ""); +SYSCTL_LONG(_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) diff --git a/sys/ia64/include/md_var.h b/sys/ia64/include/md_var.h index 75eab8b..706294f 100644 --- a/sys/ia64/include/md_var.h +++ b/sys/ia64/include/md_var.h @@ -36,7 +36,7 @@ extern char sigcode[]; extern char esigcode[]; extern int szsigcode; -extern int Maxmem; +extern long Maxmem; struct fpreg; struct thread; diff --git a/sys/kern/subr_param.c b/sys/kern/subr_param.c index 820fe0107..5055c7c 100644 --- a/sys/kern/subr_param.c +++ b/sys/kern/subr_param.c @@ -127,7 +127,7 @@ init_param1(void) * Boot time overrides that are scaled against main memory */ void -init_param2(int physpages) +init_param2(long physpages) { /* Base parameters */ diff --git a/sys/kern/vfs_bio.c b/sys/kern/vfs_bio.c index 7a7317a..d5e5898 100644 --- a/sys/kern/vfs_bio.c +++ b/sys/kern/vfs_bio.c @@ -410,7 +410,7 @@ bd_speedup(void) * being reserved at this time. */ caddr_t -kern_vfs_bio_buffer_alloc(caddr_t v, int physmem_est) +kern_vfs_bio_buffer_alloc(caddr_t v, long physmem_est) { /* * physmem_est is in pages. Convert it to kilobytes (assumes diff --git a/sys/pc98/i386/machdep.c b/sys/pc98/i386/machdep.c index e5319dd..e63b2e7 100644 --- a/sys/pc98/i386/machdep.c +++ b/sys/pc98/i386/machdep.c @@ -165,7 +165,7 @@ static int ispc98 = 0; #endif SYSCTL_INT(_machdep, OID_AUTO, ispc98, CTLFLAG_RD, &ispc98, 0, ""); -int physmem = 0; +long physmem = 0; int cold = 1; #ifdef COMPAT_43 @@ -175,36 +175,46 @@ static void osendsig(sig_t catcher, int sig, sigset_t *mask, u_long code); static int sysctl_hw_physmem(SYSCTL_HANDLER_ARGS) { - int error = sysctl_handle_int(oidp, 0, ctob(physmem), req); + int error; + unsigned long val; + + val = ctob(physmem); + int error = sysctl_handle_int(oidp, &val, req); return (error); } -SYSCTL_PROC(_hw, HW_PHYSMEM, physmem, CTLTYPE_INT|CTLFLAG_RD, - 0, 0, sysctl_hw_physmem, "IU", ""); +SYSCTL_PROC(_hw, HW_PHYSMEM, physmem, CTLTYPE_ULONG|CTLFLAG_RD, + 0, 0, sysctl_hw_physmem, "LU", ""); static int sysctl_hw_usermem(SYSCTL_HANDLER_ARGS) { - int error = sysctl_handle_int(oidp, 0, - ctob(physmem - cnt.v_wire_count), req); + int error; + unsigned long val; + + val = ctob(physmem - cnt.v_wire_count); + int error = sysctl_handle_int(oidp, &val, 0, req); return (error); } -SYSCTL_PROC(_hw, HW_USERMEM, usermem, CTLTYPE_INT|CTLFLAG_RD, - 0, 0, sysctl_hw_usermem, "IU", ""); +SYSCTL_PROC(_hw, HW_USERMEM, usermem, CTLTYPE_ULONG|CTLFLAG_RD, + 0, 0, sysctl_hw_usermem, "LU", ""); static int sysctl_hw_availpages(SYSCTL_HANDLER_ARGS) { - int error = sysctl_handle_int(oidp, 0, - i386_btop(avail_end - avail_start), req); + int error; + long val; + + val = i386_btop(avail_end - avail_start); + error = sysctl_handle_int(oidp, &val, 0, req); return (error); } -SYSCTL_PROC(_hw, OID_AUTO, availpages, CTLTYPE_INT|CTLFLAG_RD, - 0, 0, sysctl_hw_availpages, "I", ""); +SYSCTL_PROC(_hw, OID_AUTO, availpages, CTLTYPE_LONG|CTLFLAG_RD, + 0, 0, sysctl_hw_availpages, "L", ""); -int Maxmem = 0; +long Maxmem = 0; #ifdef PC98 int Maxmem_under16M = 0; #endif diff --git a/sys/pc98/pc98/machdep.c b/sys/pc98/pc98/machdep.c index e5319dd..e63b2e7 100644 --- a/sys/pc98/pc98/machdep.c +++ b/sys/pc98/pc98/machdep.c @@ -165,7 +165,7 @@ static int ispc98 = 0; #endif SYSCTL_INT(_machdep, OID_AUTO, ispc98, CTLFLAG_RD, &ispc98, 0, ""); -int physmem = 0; +long physmem = 0; int cold = 1; #ifdef COMPAT_43 @@ -175,36 +175,46 @@ static void osendsig(sig_t catcher, int sig, sigset_t *mask, u_long code); static int sysctl_hw_physmem(SYSCTL_HANDLER_ARGS) { - int error = sysctl_handle_int(oidp, 0, ctob(physmem), req); + int error; + unsigned long val; + + val = ctob(physmem); + int error = sysctl_handle_int(oidp, &val, req); return (error); } -SYSCTL_PROC(_hw, HW_PHYSMEM, physmem, CTLTYPE_INT|CTLFLAG_RD, - 0, 0, sysctl_hw_physmem, "IU", ""); +SYSCTL_PROC(_hw, HW_PHYSMEM, physmem, CTLTYPE_ULONG|CTLFLAG_RD, + 0, 0, sysctl_hw_physmem, "LU", ""); static int sysctl_hw_usermem(SYSCTL_HANDLER_ARGS) { - int error = sysctl_handle_int(oidp, 0, - ctob(physmem - cnt.v_wire_count), req); + int error; + unsigned long val; + + val = ctob(physmem - cnt.v_wire_count); + int error = sysctl_handle_int(oidp, &val, 0, req); return (error); } -SYSCTL_PROC(_hw, HW_USERMEM, usermem, CTLTYPE_INT|CTLFLAG_RD, - 0, 0, sysctl_hw_usermem, "IU", ""); +SYSCTL_PROC(_hw, HW_USERMEM, usermem, CTLTYPE_ULONG|CTLFLAG_RD, + 0, 0, sysctl_hw_usermem, "LU", ""); static int sysctl_hw_availpages(SYSCTL_HANDLER_ARGS) { - int error = sysctl_handle_int(oidp, 0, - i386_btop(avail_end - avail_start), req); + int error; + long val; + + val = i386_btop(avail_end - avail_start); + error = sysctl_handle_int(oidp, &val, 0, req); return (error); } -SYSCTL_PROC(_hw, OID_AUTO, availpages, CTLTYPE_INT|CTLFLAG_RD, - 0, 0, sysctl_hw_availpages, "I", ""); +SYSCTL_PROC(_hw, OID_AUTO, availpages, CTLTYPE_LONG|CTLFLAG_RD, + 0, 0, sysctl_hw_availpages, "L", ""); -int Maxmem = 0; +long Maxmem = 0; #ifdef PC98 int Maxmem_under16M = 0; #endif diff --git a/sys/powerpc/aim/machdep.c b/sys/powerpc/aim/machdep.c index a9aa219..00e9339 100644 --- a/sys/powerpc/aim/machdep.c +++ b/sys/powerpc/aim/machdep.c @@ -113,7 +113,7 @@ static const char rcsid[] = #include <sys/vnode.h> #include <machine/sigframe.h> -int physmem = 0; +long physmem = 0; int cold = 1; char pcpu0[PAGE_SIZE]; @@ -153,14 +153,18 @@ void osendsig(sig_t, int, sigset_t *, u_long); static int sysctl_hw_physmem(SYSCTL_HANDLER_ARGS) { - int error = sysctl_handle_int(oidp, 0, ctob(physmem), req); + int error; + unsigned long val; + + val = ctob(physmem); + error = sysctl_handle_int(oidp, &val, 0, req); return (error); } -SYSCTL_PROC(_hw, HW_PHYSMEM, physmem, CTLTYPE_INT|CTLFLAG_RD, - 0, 0, sysctl_hw_physmem, "IU", ""); +SYSCTL_PROC(_hw, HW_PHYSMEM, physmem, CTLTYPE_ULONG|CTLFLAG_RD, + 0, 0, sysctl_hw_physmem, "LU", ""); -int Maxmem = 0; +long Maxmem = 0; static int chosen; diff --git a/sys/powerpc/include/md_var.h b/sys/powerpc/include/md_var.h index b4d0ba0..5e4f93a 100644 --- a/sys/powerpc/include/md_var.h +++ b/sys/powerpc/include/md_var.h @@ -36,7 +36,7 @@ extern char sigcode[]; extern char esigcode[]; extern int szsigcode; -extern int Maxmem; +extern long Maxmem; extern int busdma_swi_pending; extern vm_offset_t kstack0; diff --git a/sys/powerpc/powerpc/machdep.c b/sys/powerpc/powerpc/machdep.c index a9aa219..00e9339 100644 --- a/sys/powerpc/powerpc/machdep.c +++ b/sys/powerpc/powerpc/machdep.c @@ -113,7 +113,7 @@ static const char rcsid[] = #include <sys/vnode.h> #include <machine/sigframe.h> -int physmem = 0; +long physmem = 0; int cold = 1; char pcpu0[PAGE_SIZE]; @@ -153,14 +153,18 @@ void osendsig(sig_t, int, sigset_t *, u_long); static int sysctl_hw_physmem(SYSCTL_HANDLER_ARGS) { - int error = sysctl_handle_int(oidp, 0, ctob(physmem), req); + int error; + unsigned long val; + + val = ctob(physmem); + error = sysctl_handle_int(oidp, &val, 0, req); return (error); } -SYSCTL_PROC(_hw, HW_PHYSMEM, physmem, CTLTYPE_INT|CTLFLAG_RD, - 0, 0, sysctl_hw_physmem, "IU", ""); +SYSCTL_PROC(_hw, HW_PHYSMEM, physmem, CTLTYPE_ULONG|CTLFLAG_RD, + 0, 0, sysctl_hw_physmem, "LU", ""); -int Maxmem = 0; +long Maxmem = 0; static int chosen; diff --git a/sys/sparc64/include/md_var.h b/sys/sparc64/include/md_var.h index d5e748c..ac142ed 100644 --- a/sys/sparc64/include/md_var.h +++ b/sys/sparc64/include/md_var.h @@ -36,7 +36,7 @@ extern char tl0_base[]; extern char _end[]; -extern int Maxmem; +extern long Maxmem; extern vm_offset_t kstack0; extern vm_offset_t kstack0_phys; diff --git a/sys/sparc64/sparc64/machdep.c b/sys/sparc64/sparc64/machdep.c index ea83d8c..a17c7a3 100644 --- a/sys/sparc64/sparc64/machdep.c +++ b/sys/sparc64/sparc64/machdep.c @@ -111,9 +111,9 @@ typedef int ofw_vec_t(void *); struct tlb_entry *kernel_tlbs; int kernel_tlb_slots; -int physmem; +long physmem; int cold = 1; -int Maxmem; +long Maxmem; char pcpu0[PCPU_PAGES * PAGE_SIZE]; char uarea0[UAREA_PAGES * PAGE_SIZE]; diff --git a/sys/sys/buf.h b/sys/sys/buf.h index 04f4ebe..17dfb40 100644 --- a/sys/sys/buf.h +++ b/sys/sys/buf.h @@ -465,7 +465,7 @@ extern int nswbuf; /* Number of swap I/O buffer headers. */ struct uio; -caddr_t kern_vfs_bio_buffer_alloc(caddr_t v, int physmem_est); +caddr_t kern_vfs_bio_buffer_alloc(caddr_t v, long physmem_est); void bufinit(void); void bwillwrite(void); int buf_dirty_count_severe(void); diff --git a/sys/sys/systm.h b/sys/sys/systm.h index 2029412..e9d8f8f 100644 --- a/sys/sys/systm.h +++ b/sys/sys/systm.h @@ -61,7 +61,7 @@ extern u_int nselcoll; /* select collisions since boot */ extern struct mtx sellock; /* select lock variable */ extern struct cv selwait; /* select conditional variable */ -extern int physmem; /* physical memory */ +extern long physmem; /* physical memory */ extern dev_t rootdev; /* root device */ extern dev_t rootdevs[2]; /* possible root devices */ @@ -140,7 +140,7 @@ uint32_t crc32(const void *buf, size_t size); void critical_enter(void); void critical_exit(void); void init_param1(void); -void init_param2(int physpages); +void init_param2(long physpages); void tablefull(const char *); int kvprintf(char const *, void (*)(int, void*), void *, int, __va_list) __printflike(1, 0); diff --git a/sys/vm/vm_init.c b/sys/vm/vm_init.c index 1079e1b..9859db1 100644 --- a/sys/vm/vm_init.c +++ b/sys/vm/vm_init.c @@ -126,7 +126,7 @@ vm_ksubmap_init(struct kva_md_info *kmi) vm_offset_t firstaddr; caddr_t v; vm_size_t size = 0; - int physmem_est; + long physmem_est; vm_offset_t minaddr; vm_offset_t maxaddr; @@ -159,7 +159,7 @@ again: printf("Warning: no free entries in kernel_map.\n"); physmem_est = physmem; } else { - physmem_est = min(physmem, btoc(kernel_map->max_offset - + physmem_est = lmin(physmem, btoc(kernel_map->max_offset - kernel_map->min_offset)); } |