summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArtur Grabowski <art@cvs.openbsd.org>1999-07-15 14:07:42 +0000
committerArtur Grabowski <art@cvs.openbsd.org>1999-07-15 14:07:42 +0000
commit388ce0bc8d4ed3c140be5ac53ac580c6e59e682d (patch)
tree1f9502068154020710d27901fd77ca8c23cedfa0
parent307d47ac94351d3f94b416d21552f01131765fc3 (diff)
vm_offset_t -> {v,p}addr_t ; vm_size_t -> {v,p}size_t
-rw-r--r--sys/kern/init_main.c6
-rw-r--r--sys/kern/kern_exec.c10
-rw-r--r--sys/kern/kern_fork.c4
-rw-r--r--sys/kern/kern_malloc.c12
-rw-r--r--sys/kern/kern_resource.c6
-rw-r--r--sys/kern/sys_pipe.c20
-rw-r--r--sys/kern/vfs_bio.c8
7 files changed, 33 insertions, 33 deletions
diff --git a/sys/kern/init_main.c b/sys/kern/init_main.c
index d074e984004..d56ed9a12bf 100644
--- a/sys/kern/init_main.c
+++ b/sys/kern/init_main.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: init_main.c,v 1.38 1999/04/22 19:28:07 art Exp $ */
+/* $OpenBSD: init_main.c,v 1.39 1999/07/15 14:07:41 art Exp $ */
/* $NetBSD: init_main.c,v 1.84.4.1 1996/06/02 09:08:06 mrg Exp $ */
/*
@@ -484,7 +484,7 @@ start_init(arg)
void *arg;
{
struct proc *p = arg;
- vm_offset_t addr;
+ vaddr_t addr;
struct sys_execve_args /* {
syscallarg(char *) path;
syscallarg(char **) argp;
@@ -526,7 +526,7 @@ start_init(arg)
!= KERN_SUCCESS)
panic("init: couldn't allocate argument space");
#else
- if (vm_allocate(&p->p_vmspace->vm_map, &addr, (vm_size_t)PAGE_SIZE,
+ if (vm_allocate(&p->p_vmspace->vm_map, &addr, (vsize_t)PAGE_SIZE,
FALSE) != 0)
panic("init: couldn't allocate argument space");
#endif
diff --git a/sys/kern/kern_exec.c b/sys/kern/kern_exec.c
index 352efbb5321..9d8bf191c5a 100644
--- a/sys/kern/kern_exec.c
+++ b/sys/kern/kern_exec.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: kern_exec.c,v 1.30 1999/07/13 15:17:50 provos Exp $ */
+/* $OpenBSD: kern_exec.c,v 1.31 1999/07/15 14:07:41 art Exp $ */
/* $NetBSD: kern_exec.c,v 1.75 1996/02/09 18:59:28 christos Exp $ */
/*-
@@ -285,7 +285,7 @@ sys_execve(p, v, retval)
argp = (char *)kmem_alloc_wait(exec_map, NCARGS);
#endif
#ifdef DIAGNOSTIC
- if (argp == (vm_offset_t) 0)
+ if (argp == (vaddr_t) 0)
panic("execve: argp == NULL");
#endif
dp = argp;
@@ -550,7 +550,7 @@ sys_execve(p, v, retval)
#if defined(UVM)
uvm_km_free_wakeup(exec_map, (vaddr_t) argp, NCARGS);
#else
- kmem_free_wakeup(exec_map, (vm_offset_t)argp, NCARGS);
+ kmem_free_wakeup(exec_map, (vaddr_t)argp, NCARGS);
#endif
FREE(nid.ni_cnd.cn_pnbuf, M_NAMEI);
@@ -591,7 +591,7 @@ bad:
#if defined(UVM)
uvm_km_free_wakeup(exec_map, (vaddr_t) argp, NCARGS);
#else
- kmem_free_wakeup(exec_map, (vm_offset_t) argp, NCARGS);
+ kmem_free_wakeup(exec_map, (vaddr_t) argp, NCARGS);
#endif
freehdr:
@@ -619,7 +619,7 @@ exec_abort:
#if defined(UVM)
uvm_km_free_wakeup(exec_map, (vaddr_t) argp, NCARGS);
#else
- kmem_free_wakeup(exec_map, (vm_offset_t) argp, NCARGS);
+ kmem_free_wakeup(exec_map, (vaddr_t) argp, NCARGS);
#endif
free_pack_abort:
diff --git a/sys/kern/kern_fork.c b/sys/kern/kern_fork.c
index 75e138eb8ca..16a328d025f 100644
--- a/sys/kern/kern_fork.c
+++ b/sys/kern/kern_fork.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: kern_fork.c,v 1.20 1999/03/12 17:49:37 deraadt Exp $ */
+/* $OpenBSD: kern_fork.c,v 1.21 1999/07/15 14:07:41 art Exp $ */
/* $NetBSD: kern_fork.c,v 1.29 1996/02/09 18:59:34 christos Exp $ */
/*
@@ -117,7 +117,7 @@ fork1(p1, forktype, rforkflags, retval)
int count;
static int pidchecked = 0;
int dupfd = 1, cleanfd = 0;
- vm_offset_t uaddr;
+ vaddr_t uaddr;
if (forktype == ISRFORK) {
dupfd = 0;
diff --git a/sys/kern/kern_malloc.c b/sys/kern/kern_malloc.c
index 64f3f662821..3b94a4897eb 100644
--- a/sys/kern/kern_malloc.c
+++ b/sys/kern/kern_malloc.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: kern_malloc.c,v 1.15 1999/06/23 07:43:30 art Exp $ */
+/* $OpenBSD: kern_malloc.c,v 1.16 1999/07/15 14:07:41 art Exp $ */
/* $NetBSD: kern_malloc.c,v 1.15.4.2 1996/06/13 17:10:56 cgd Exp $ */
/*
@@ -154,7 +154,7 @@ malloc(size, type, flags)
(vsize_t)ctob(npg),
(flags & M_NOWAIT) ? UVM_KMF_NOWAIT : 0);
#else
- va = (caddr_t) kmem_malloc(kmem_map, (vm_size_t)ctob(npg),
+ va = (caddr_t) kmem_malloc(kmem_map, (vsize_t)ctob(npg),
!(flags & M_NOWAIT));
#endif
if (va == NULL) {
@@ -340,7 +340,7 @@ free(addr, type)
#if defined(UVM)
uvm_km_free(kmem_map, (vaddr_t)addr, ctob(kup->ku_pagecnt));
#else
- kmem_free(kmem_map, (vm_offset_t)addr, ctob(kup->ku_pagecnt));
+ kmem_free(kmem_map, (vaddr_t)addr, ctob(kup->ku_pagecnt));
#endif
#ifdef KMEMSTATS
size = kup->ku_pagecnt << PGSHIFT;
@@ -442,9 +442,9 @@ kmeminit()
FALSE, FALSE, &kmem_map_store);
#else
kmemusage = (struct kmemusage *) kmem_alloc(kernel_map,
- (vm_size_t)(npg * sizeof(struct kmemusage)));
- kmem_map = kmem_suballoc(kernel_map, (vm_offset_t *)&kmembase,
- (vm_offset_t *)&kmemlimit, (vm_size_t)(npg * NBPG), FALSE);
+ (vsize_t)(npg * sizeof(struct kmemusage)));
+ kmem_map = kmem_suballoc(kernel_map, (vaddr_t *)&kmembase,
+ (vaddr_t *)&kmemlimit, (vsize_t)(npg * NBPG), FALSE);
#endif
#ifdef KMEMSTATS
for (indx = 0; indx < MINBUCKET + 16; indx++) {
diff --git a/sys/kern/kern_resource.c b/sys/kern/kern_resource.c
index 162a2ed7ab1..29ed4c743b2 100644
--- a/sys/kern/kern_resource.c
+++ b/sys/kern/kern_resource.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: kern_resource.c,v 1.8 1999/02/26 05:10:40 art Exp $ */
+/* $OpenBSD: kern_resource.c,v 1.9 1999/07/15 14:07:41 art Exp $ */
/* $NetBSD: kern_resource.c,v 1.38 1996/10/23 07:19:38 matthias Exp $ */
/*-
@@ -275,8 +275,8 @@ dosetrlimit(p, which, limp)
* up make more accessible, if going down make inaccessible.
*/
if (limp->rlim_cur != alimp->rlim_cur) {
- vm_offset_t addr;
- vm_size_t size;
+ vaddr_t addr;
+ vsize_t size;
vm_prot_t prot;
if (limp->rlim_cur > alimp->rlim_cur) {
diff --git a/sys/kern/sys_pipe.c b/sys/kern/sys_pipe.c
index 0673d952d38..42060795d7c 100644
--- a/sys/kern/sys_pipe.c
+++ b/sys/kern/sys_pipe.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: sys_pipe.c,v 1.16 1999/07/13 15:17:50 provos Exp $ */
+/* $OpenBSD: sys_pipe.c,v 1.17 1999/07/15 14:07:41 art Exp $ */
/*
* Copyright (c) 1996 John S. Dyson
@@ -243,12 +243,12 @@ pipespace(cpipe)
*/
#if defined(__FreeBSD__)
error = vm_map_find(kernel_map, cpipe->pipe_buffer.object, 0,
- (vm_offset_t *) &cpipe->pipe_buffer.buffer,
+ (vaddr_t *) &cpipe->pipe_buffer.buffer,
cpipe->pipe_buffer.size, 1,
VM_PROT_ALL, VM_PROT_ALL, 0);
#else /* (__NetBSD__) || (__OpenBSD__) */
error = vm_map_find(kernel_map, cpipe->pipe_buffer.object, 0,
- (vm_offset_t *) &cpipe->pipe_buffer.buffer,
+ (vaddr_t *) &cpipe->pipe_buffer.buffer,
cpipe->pipe_buffer.size, 1);
#endif
@@ -509,7 +509,7 @@ pipe_build_write_buffer(wpipe, uio)
{
int size;
int i;
- vm_offset_t addr, endaddr, paddr;
+ vaddr_t addr, endaddr, paddr;
size = uio->uio_iov->iov_len;
if (size > wpipe->pipe_buffer.size)
@@ -540,7 +540,7 @@ pipe_build_write_buffer(wpipe, uio)
* set up the control block
*/
wpipe->pipe_map.npages = i;
- wpipe->pipe_map.pos = ((vm_offset_t) uio->uio_iov->iov_base) & PAGE_MASK;
+ wpipe->pipe_map.pos = ((vaddr_t) uio->uio_iov->iov_base) & PAGE_MASK;
wpipe->pipe_map.cnt = size;
/*
@@ -583,7 +583,7 @@ struct pipe *wpipe;
pmap_qremove(wpipe->pipe_map.kva, wpipe->pipe_map.npages);
if (amountpipekva > MAXPIPEKVA) {
- vm_offset_t kva = wpipe->pipe_map.kva;
+ vaddr_t kva = wpipe->pipe_map.kva;
wpipe->pipe_map.kva = 0;
kmem_free(kernel_map, kva,
wpipe->pipe_buffer.size + PAGE_SIZE);
@@ -748,11 +748,11 @@ pipe_write(fp, uio, cred)
amountpipekva -= wpipe->pipe_buffer.size;
#if defined(UVM)
uvm_km_free(kernel_map,
- (vm_offset_t)wpipe->pipe_buffer.buffer,
+ (vaddr_t)wpipe->pipe_buffer.buffer,
wpipe->pipe_buffer.size);
#else
kmem_free(kernel_map,
- (vm_offset_t)wpipe->pipe_buffer.buffer,
+ (vaddr_t)wpipe->pipe_buffer.buffer,
wpipe->pipe_buffer.size);
#endif
}
@@ -1128,11 +1128,11 @@ pipeclose(cpipe)
amountpipekva -= cpipe->pipe_buffer.size;
#if defined(UVM)
uvm_km_free(kernel_map,
- (vm_offset_t)cpipe->pipe_buffer.buffer,
+ (vaddr_t)cpipe->pipe_buffer.buffer,
cpipe->pipe_buffer.size);
#else
kmem_free(kernel_map,
- (vm_offset_t)cpipe->pipe_buffer.buffer,
+ (vaddr_t)cpipe->pipe_buffer.buffer,
cpipe->pipe_buffer.size);
#endif
}
diff --git a/sys/kern/vfs_bio.c b/sys/kern/vfs_bio.c
index 4f9cf928510..1202f8db8de 100644
--- a/sys/kern/vfs_bio.c
+++ b/sys/kern/vfs_bio.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: vfs_bio.c,v 1.22 1999/04/28 09:28:15 art Exp $ */
+/* $OpenBSD: vfs_bio.c,v 1.23 1999/07/15 14:07:41 art Exp $ */
/* $NetBSD: vfs_bio.c,v 1.44 1996/06/11 11:15:36 pk Exp $ */
/*-
@@ -632,9 +632,9 @@ allocbuf(bp, size)
struct buf *bp;
int size;
{
- struct buf *nbp;
- vm_size_t desired_size;
- int s;
+ struct buf *nbp;
+ vsize_t desired_size;
+ int s;
desired_size = roundup(size, CLBYTES);
if (desired_size > MAXBSIZE)