diff options
author | Artur Grabowski <art@cvs.openbsd.org> | 1999-11-25 13:41:32 +0000 |
---|---|---|
committer | Artur Grabowski <art@cvs.openbsd.org> | 1999-11-25 13:41:32 +0000 |
commit | b211c5bb227c40b9d12c166323e150db627bf41b (patch) | |
tree | 36ce35f182daa1c13df3c230bd7fbaeda3858445 | |
parent | a40a2e33ba10c04e632ee3f056c7f48db65d324e (diff) |
Use PAGE_SIZE instead of NBPG.
-rw-r--r-- | sys/kern/exec_elf.c | 6 | ||||
-rw-r--r-- | sys/kern/exec_elf64.c | 6 | ||||
-rw-r--r-- | sys/kern/kern_malloc.c | 16 | ||||
-rw-r--r-- | sys/kern/sysv_shm.c | 4 | ||||
-rw-r--r-- | sys/kern/tty.c | 4 |
5 files changed, 18 insertions, 18 deletions
diff --git a/sys/kern/exec_elf.c b/sys/kern/exec_elf.c index 70ee101b4a0..c466b3760e1 100644 --- a/sys/kern/exec_elf.c +++ b/sys/kern/exec_elf.c @@ -1,4 +1,4 @@ -/* $OpenBSD: exec_elf.c,v 1.27 1999/08/12 20:37:16 niklas Exp $ */ +/* $OpenBSD: exec_elf.c,v 1.28 1999/11/25 13:41:30 art Exp $ */ /* * Copyright (c) 1996 Per Fogelstrom @@ -643,7 +643,7 @@ exec_elf_makecmds(p, epp) /* Dell SVR4 maps page zero, yeuch! */ if (p->p_os == OOS_DELL) #endif - NEW_VMCMD(&epp->ep_vmcmds, vmcmd_map_readvn, NBPG, 0, + NEW_VMCMD(&epp->ep_vmcmds, vmcmd_map_readvn, PAGE_SIZE, 0, epp->ep_vp, 0, VM_PROT_READ); #endif @@ -716,7 +716,7 @@ exec_elf_fixup(p, epp) a++; a->au_id = AUX_pagesz; - a->au_v = NBPG; + a->au_v = PAGE_SIZE; a++; a->au_id = AUX_base; diff --git a/sys/kern/exec_elf64.c b/sys/kern/exec_elf64.c index 6366b671bbe..c1d5f4afcfe 100644 --- a/sys/kern/exec_elf64.c +++ b/sys/kern/exec_elf64.c @@ -1,4 +1,4 @@ -/* $OpenBSD: exec_elf64.c,v 1.7 1999/09/27 11:10:30 kstailey Exp $ */ +/* $OpenBSD: exec_elf64.c,v 1.8 1999/11/25 13:41:30 art Exp $ */ /* * Copyright (c) 1996 Per Fogelstrom @@ -656,7 +656,7 @@ exec_elf64_makecmds(p, epp) /* Dell SVR4 maps page zero, yeuch! */ if (p->p_os == OOS_DELL) #endif - NEW_VMCMD(&epp->ep_vmcmds, vmcmd_map_readvn, NBPG, 0, + NEW_VMCMD(&epp->ep_vmcmds, vmcmd_map_readvn, PAGE_SIZE, 0, epp->ep_vp, 0, VM_PROT_READ); #endif @@ -730,7 +730,7 @@ exec_elf64_fixup(p, epp) a++; a->au_id = AUX_pagesz; - a->au_v = NBPG; + a->au_v = PAGE_SIZE; a++; a->au_id = AUX_base; diff --git a/sys/kern/kern_malloc.c b/sys/kern/kern_malloc.c index 6b747841fc4..aedd351b27d 100644 --- a/sys/kern/kern_malloc.c +++ b/sys/kern/kern_malloc.c @@ -1,4 +1,4 @@ -/* $OpenBSD: kern_malloc.c,v 1.17 1999/09/10 22:14:39 art Exp $ */ +/* $OpenBSD: kern_malloc.c,v 1.18 1999/11/25 13:41:30 art Exp $ */ /* $NetBSD: kern_malloc.c,v 1.15.4.2 1996/06/13 17:10:56 cgd Exp $ */ /* @@ -195,7 +195,7 @@ malloc(size, type, flags) * bucket, don't assume the list is still empty. */ savedlist = kbp->kb_next; - kbp->kb_next = cp = va + (npg * NBPG) - allocsize; + kbp->kb_next = cp = va + (npg * PAGE_SIZE) - allocsize; for (;;) { freep = (struct freelist *)cp; #ifdef DIAGNOSTIC @@ -328,8 +328,8 @@ free(addr, type) * Check for returns of data that do not point to the * beginning of the allocation. */ - if (size > NBPG * CLSIZE) - alloc = addrmask[BUCKETINDX(NBPG * CLSIZE)]; + if (size > PAGE_SIZE * CLSIZE) + alloc = addrmask[BUCKETINDX(PAGE_SIZE * CLSIZE)]; else alloc = addrmask[kup->ku_indx]; if (((u_long)addr & alloc) != 0) @@ -433,18 +433,18 @@ kmeminit() panic("kmeminit: minbucket too small/struct freelist too big"); #endif - npg = VM_KMEM_SIZE/ NBPG; + npg = VM_KMEM_SIZE / PAGE_SIZE; #if defined(UVM) kmemusage = (struct kmemusage *) uvm_km_zalloc(kernel_map, (vsize_t)(npg * sizeof(struct kmemusage))); kmem_map = uvm_km_suballoc(kernel_map, (vaddr_t *)&kmembase, - (vaddr_t *)&kmemlimit, (vsize_t)(npg * NBPG), + (vaddr_t *)&kmemlimit, (vsize_t)(npg * PAGE_SIZE), FALSE, FALSE, &kmem_map_store); #else kmemusage = (struct kmemusage *) kmem_alloc(kernel_map, (vsize_t)(npg * sizeof(struct kmemusage))); kmem_map = kmem_suballoc(kernel_map, (vaddr_t *)&kmembase, - (vaddr_t *)&kmemlimit, (vsize_t)(npg * NBPG), FALSE); + (vaddr_t *)&kmemlimit, (vsize_t)(npg * PAGE_SIZE), FALSE); #endif #ifdef KMEMSTATS for (indx = 0; indx < MINBUCKET + 16; indx++) { @@ -455,6 +455,6 @@ kmeminit() bucket[indx].kb_highwat = 5 * bucket[indx].kb_elmpercl; } for (indx = 0; indx < M_LAST; indx++) - kmemstats[indx].ks_limit = npg * NBPG * 6 / 10; + kmemstats[indx].ks_limit = npg * PAGE_SIZE * 6 / 10; #endif } diff --git a/sys/kern/sysv_shm.c b/sys/kern/sysv_shm.c index b8d94a92593..4b558da6266 100644 --- a/sys/kern/sysv_shm.c +++ b/sys/kern/sysv_shm.c @@ -1,4 +1,4 @@ -/* $OpenBSD: sysv_shm.c,v 1.13 1999/07/08 05:05:23 weingart Exp $ */ +/* $OpenBSD: sysv_shm.c,v 1.14 1999/11/25 13:41:30 art Exp $ */ /* $NetBSD: sysv_shm.c,v 1.50 1998/10/21 22:24:29 tron Exp $ */ /* @@ -579,7 +579,7 @@ shminit() { int i; - shminfo.shmmax *= NBPG; + shminfo.shmmax *= PAGE_SIZE; for (i = 0; i < shminfo.shmmni; i++) { shmsegs[i].shm_perm.mode = SHMSEG_FREE; diff --git a/sys/kern/tty.c b/sys/kern/tty.c index 6ad0d516372..cfe96e217dd 100644 --- a/sys/kern/tty.c +++ b/sys/kern/tty.c @@ -1,4 +1,4 @@ -/* $OpenBSD: tty.c,v 1.37 1999/06/01 08:23:52 art Exp $ */ +/* $OpenBSD: tty.c,v 1.38 1999/11/25 13:41:31 art Exp $ */ /* $NetBSD: tty.c,v 1.68.4.2 1996/06/06 16:04:52 thorpej Exp $ */ /*- @@ -2031,7 +2031,7 @@ ttyinfo(tp) ttyprintf(tp, "%ld.%02lds ", stime.tv_sec, stime.tv_usec / 10000); -#define pgtok(a) (((u_long) ((a) * NBPG) / 1024)) +#define pgtok(a) (((u_long) ((a) * PAGE_SIZE) / 1024)) /* Print percentage cpu, resident set size. */ tmp = (pick->p_pctcpu * 10000 + FSCALE / 2) >> FSHIFT; ttyprintf(tp, "%d%% %ldk\n", |