diff options
Diffstat (limited to 'sys')
-rw-r--r-- | sys/arch/amiga/amiga/mem.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/sys/arch/amiga/amiga/mem.c b/sys/arch/amiga/amiga/mem.c index 844f0b5ad9d..990281a87d1 100644 --- a/sys/arch/amiga/amiga/mem.c +++ b/sys/arch/amiga/amiga/mem.c @@ -1,4 +1,4 @@ -/* $OpenBSD: mem.c,v 1.9 2000/01/19 15:20:59 espie Exp $ */ +/* $OpenBSD: mem.c,v 1.10 2000/05/27 20:46:51 art Exp $ */ /* $NetBSD: mem.c,v 1.18 1997/02/02 07:17:14 thorpej Exp $ */ /* @@ -56,6 +56,9 @@ #include <machine/cpu.h> #include <vm/vm.h> +#if defined(UVM) +#include <uvm/uvm_extern.h> +#endif extern int kernel_reload_write(struct uio *uio); extern u_int lowram; @@ -157,9 +160,15 @@ mmrw(dev, uio, flags) case 1: v = uio->uio_offset; c = min(iov->iov_len, MAXPHYS); +#if defined(UVM) + if (!uvm_kernacc((caddr_t)v, c, + uio->uio_rw == UIO_READ ? B_READ : B_WRITE)) + return (EFAULT); +#else if (!kernacc((caddr_t)v, c, uio->uio_rw == UIO_READ ? B_READ : B_WRITE)) return (EFAULT); +#endif if (v < NBPG) { #ifdef DEBUG /* |