summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sys/arch/sparc/sparc/mem.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/sys/arch/sparc/sparc/mem.c b/sys/arch/sparc/sparc/mem.c
index db56d9725cc..7da27e461b0 100644
--- a/sys/arch/sparc/sparc/mem.c
+++ b/sys/arch/sparc/sparc/mem.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: mem.c,v 1.4 1998/08/31 17:42:41 millert Exp $ */
+/* $OpenBSD: mem.c,v 1.5 1999/04/22 18:55:26 art Exp $ */
/* $NetBSD: mem.c,v 1.13 1996/03/30 21:12:16 christos Exp $ */
/*
@@ -158,9 +158,15 @@ mmrw(dev, uio, flags)
c = min(iov->iov_len, prom_vend - prom_vstart);
} else {
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
}
error = uiomove((caddr_t)v, c, uio);
continue;