diff options
author | Michael Shalayeff <mickey@cvs.openbsd.org> | 2004-09-19 01:30:12 +0000 |
---|---|---|
committer | Michael Shalayeff <mickey@cvs.openbsd.org> | 2004-09-19 01:30:12 +0000 |
commit | cd3148246dba71b06a1e732e4e16662f31650a1b (patch) | |
tree | 1994109a36cf421479bf77dbff6c1764b52db905 /sys/arch/hppa/dev | |
parent | 91b4a91ab6fc3999940cb75dc638d8d2e66227fc (diff) |
turn totalphysmem into physmem and name old physmem into smth it really is
Diffstat (limited to 'sys/arch/hppa/dev')
-rw-r--r-- | sys/arch/hppa/dev/mem.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/sys/arch/hppa/dev/mem.c b/sys/arch/hppa/dev/mem.c index 9241bf785a2..c61f76a7329 100644 --- a/sys/arch/hppa/dev/mem.c +++ b/sys/arch/hppa/dev/mem.c @@ -1,4 +1,4 @@ -/* $OpenBSD: mem.c,v 1.25 2004/04/07 18:24:19 mickey Exp $ */ +/* $OpenBSD: mem.c,v 1.26 2004/09/19 01:30:11 mickey Exp $ */ /* * Copyright (c) 1998-2004 Michael Shalayeff @@ -325,7 +325,6 @@ mmrw(dev, uio, flags) struct uio *uio; int flags; { - extern u_int totalphysmem; struct iovec *iov; vaddr_t v, o; int error = 0; @@ -346,12 +345,12 @@ mmrw(dev, uio, flags) /* If the address isn't in RAM, bail. */ v = uio->uio_offset; - if (btoc(v) > totalphysmem) { + if (btoc(v) > physmem) { error = EFAULT; /* this will break us out of the loop */ continue; } - c = ctob(totalphysmem) - v; + c = ctob(physmem) - v; c = min(c, uio->uio_resid); error = uiomove((caddr_t)v, c, uio); break; @@ -360,7 +359,7 @@ mmrw(dev, uio, flags) v = uio->uio_offset; o = v & PGOFSET; c = min(uio->uio_resid, (int)(PAGE_SIZE - o)); - if (btoc(v) > totalphysmem && !uvm_kernacc((caddr_t)v, + if (btoc(v) > physmem && !uvm_kernacc((caddr_t)v, c, (uio->uio_rw == UIO_READ) ? B_READ : B_WRITE)) { error = EFAULT; /* this will break us out of the loop */ |