summaryrefslogtreecommitdiff
path: root/sys/arch/sparc/dev
diff options
context:
space:
mode:
authorArtur Grabowski <art@cvs.openbsd.org>2001-05-10 10:34:51 +0000
committerArtur Grabowski <art@cvs.openbsd.org>2001-05-10 10:34:51 +0000
commit9b16af7f254ad018fb7ff8872ae57f62714ece01 (patch)
tree0a08183ee4de4579e55f3777a643809d57070294 /sys/arch/sparc/dev
parentcf6163b5efce518222d83d21db6e88f58bfb1ca4 (diff)
UVM is no longer optional on sparc.
Diffstat (limited to 'sys/arch/sparc/dev')
-rw-r--r--sys/arch/sparc/dev/bt_subr.c16
-rw-r--r--sys/arch/sparc/dev/cgfourteen.c22
-rw-r--r--sys/arch/sparc/dev/cgsix.c8
-rw-r--r--sys/arch/sparc/dev/if_ie.c13
4 files changed, 4 insertions, 55 deletions
diff --git a/sys/arch/sparc/dev/bt_subr.c b/sys/arch/sparc/dev/bt_subr.c
index 5e96da0b624..1f102fff824 100644
--- a/sys/arch/sparc/dev/bt_subr.c
+++ b/sys/arch/sparc/dev/bt_subr.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: bt_subr.c,v 1.4 1999/04/22 16:52:46 art Exp $ */
+/* $OpenBSD: bt_subr.c,v 1.5 2001/05/10 10:34:42 art Exp $ */
/* $NetBSD: bt_subr.c,v 1.5 1996/03/14 19:44:32 christos Exp $ */
/*
@@ -79,17 +79,10 @@ bt_getcmap(p, cm, cmsize)
count = p->count;
if (start >= cmsize || start + count > cmsize)
return (EINVAL);
-#if defined(UVM)
if (!uvm_useracc(p->red, count, B_WRITE) ||
!uvm_useracc(p->green, count, B_WRITE) ||
!uvm_useracc(p->blue, count, B_WRITE))
return (EFAULT);
-#else
- if (!useracc(p->red, count, B_WRITE) ||
- !useracc(p->green, count, B_WRITE) ||
- !useracc(p->blue, count, B_WRITE))
- return (EFAULT);
-#endif
for (cp = &cm->cm_map[start][0], i = 0; i < count; cp += 3, i++) {
p->red[i] = cp[0];
p->green[i] = cp[1];
@@ -114,17 +107,10 @@ bt_putcmap(p, cm, cmsize)
count = p->count;
if (start >= cmsize || start + count > cmsize)
return (EINVAL);
-#if defined(UVM)
if (!uvm_useracc(p->red, count, B_READ) ||
!uvm_useracc(p->green, count, B_READ) ||
!uvm_useracc(p->blue, count, B_READ))
return (EFAULT);
-#else
- if (!useracc(p->red, count, B_READ) ||
- !useracc(p->green, count, B_READ) ||
- !useracc(p->blue, count, B_READ))
- return (EFAULT);
-#endif
for (cp = &cm->cm_map[start][0], i = 0; i < count; cp += 3, i++) {
cp[0] = p->red[i];
cp[1] = p->green[i];
diff --git a/sys/arch/sparc/dev/cgfourteen.c b/sys/arch/sparc/dev/cgfourteen.c
index d44dacf89ae..79ae62f5b40 100644
--- a/sys/arch/sparc/dev/cgfourteen.c
+++ b/sys/arch/sparc/dev/cgfourteen.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: cgfourteen.c,v 1.4 1999/09/10 23:32:01 art Exp $ */
+/* $OpenBSD: cgfourteen.c,v 1.5 2001/05/10 10:34:43 art Exp $ */
/* $NetBSD: cgfourteen.c,v 1.7 1997/05/24 20:16:08 pk Exp $ */
/*
@@ -483,15 +483,9 @@ cgfourteenioctl(dev, cmd, data, flags, p)
if ((u_int)p->size.x > 32 || (u_int)p->size.y > 32)
return (EINVAL);
count = p->size.y * 32 / NBBY;
-#if defined(UVM)
if (!uvm_useracc(p->image, count, B_READ) ||
!uvm_useracc(p->mask, count, B_READ))
return (EFAULT);
-#else
- if (!useracc(p->image, count, B_READ) ||
- !useracc(p->mask, count, B_READ))
- return (EFAULT);
-#endif
}
/* parameters are OK; do it */
@@ -767,17 +761,10 @@ cg14_get_cmap(p, cm, cmsize)
}
#endif
-#if defined(UVM)
if (!uvm_useracc(p->red, count, B_WRITE) ||
!uvm_useracc(p->green, count, B_WRITE) ||
!uvm_useracc(p->blue, count, B_WRITE))
return (EFAULT);
-#else
- if (!useracc(p->red, count, B_WRITE) ||
- !useracc(p->green, count, B_WRITE) ||
- !useracc(p->blue, count, B_WRITE))
- return (EFAULT);
-#endif
for (cp = &cm->cm_map[start][0], i = 0; i < count; cp += 4, i++) {
p->red[i] = cp[3];
p->green[i] = cp[2];
@@ -809,17 +796,10 @@ cg14_put_cmap(p, cm, cmsize)
}
#endif
-#if defined(UVM)
if (!uvm_useracc(p->red, count, B_READ) ||
!uvm_useracc(p->green, count, B_READ) ||
!uvm_useracc(p->blue, count, B_READ))
return (EFAULT);
-#else
- if (!useracc(p->red, count, B_READ) ||
- !useracc(p->green, count, B_READ) ||
- !useracc(p->blue, count, B_READ))
- return (EFAULT);
-#endif
for (cp = &cm->cm_map[start][0], i = 0; i < count; cp += 4, i++) {
cp[3] = p->red[i];
cp[2] = p->green[i];
diff --git a/sys/arch/sparc/dev/cgsix.c b/sys/arch/sparc/dev/cgsix.c
index a0f3194672b..d6f9a6c4e0b 100644
--- a/sys/arch/sparc/dev/cgsix.c
+++ b/sys/arch/sparc/dev/cgsix.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: cgsix.c,v 1.13 2000/05/18 13:31:12 jason Exp $ */
+/* $OpenBSD: cgsix.c,v 1.14 2001/05/10 10:34:43 art Exp $ */
/* $NetBSD: cgsix.c,v 1.33 1997/08/07 19:12:30 pk Exp $ */
/*
@@ -494,15 +494,9 @@ cgsixioctl(dev, cmd, data, flags, p)
if ((u_int)p->size.x > 32 || (u_int)p->size.y > 32)
return (EINVAL);
count = p->size.y * 32 / NBBY;
-#if defined(UVM)
if (!uvm_useracc(p->image, count, B_READ) ||
!uvm_useracc(p->mask, count, B_READ))
return (EFAULT);
-#else
- if (!useracc(p->image, count, B_READ) ||
- !useracc(p->mask, count, B_READ))
- return (EFAULT);
-#endif
}
/* parameters are OK; do it */
diff --git a/sys/arch/sparc/dev/if_ie.c b/sys/arch/sparc/dev/if_ie.c
index 8cb358ef6ae..d83ec7f417f 100644
--- a/sys/arch/sparc/dev/if_ie.c
+++ b/sys/arch/sparc/dev/if_ie.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_ie.c,v 1.14 2001/03/24 10:07:18 ho Exp $ */
+/* $OpenBSD: if_ie.c,v 1.15 2001/05/10 10:34:44 art Exp $ */
/* $NetBSD: if_ie.c,v 1.33 1997/07/29 17:55:38 fair Exp $ */
/*-
@@ -137,9 +137,7 @@ Mode of operation:
#include <vm/vm.h>
-#if defined(UVM)
#include <uvm/uvm_map.h>
-#endif
/*
* ugly byte-order hack for SUNs
@@ -542,19 +540,10 @@ ieattach(parent, self, aux)
* XXX
*/
-#if defined(UVM)
ie_map = uvm_map_create(pmap_kernel(), (vaddr_t)IEOB_ADBASE,
(vaddr_t)IEOB_ADBASE + sc->sc_msize, 1);
-#else
- ie_map = vm_map_create(pmap_kernel(), (vaddr_t)IEOB_ADBASE,
- (vaddr_t)IEOB_ADBASE + sc->sc_msize, 1);
-#endif
if (ie_map == NULL) panic("ie_map");
-#if defined(UVM)
sc->sc_maddr = (caddr_t) uvm_km_alloc(ie_map, sc->sc_msize);
-#else
- sc->sc_maddr = (caddr_t) kmem_alloc(ie_map, sc->sc_msize);
-#endif
if (sc->sc_maddr == NULL) panic("ie kmem_alloc");
kvm_uncache(sc->sc_maddr, sc->sc_msize >> PGSHIFT);
if (((u_long)sc->sc_maddr & ~(NBPG-1)) != (u_long)sc->sc_maddr)