summaryrefslogtreecommitdiff
path: root/sys/arch/mac68k
diff options
context:
space:
mode:
Diffstat (limited to 'sys/arch/mac68k')
-rw-r--r--sys/arch/mac68k/dev/grf.c7
-rw-r--r--sys/arch/mac68k/mac68k/machdep.c4
-rw-r--r--sys/arch/mac68k/mac68k/pmap.c16
-rw-r--r--sys/arch/mac68k/mac68k/trap.c10
4 files changed, 17 insertions, 20 deletions
diff --git a/sys/arch/mac68k/dev/grf.c b/sys/arch/mac68k/dev/grf.c
index dd1f3434a1a..c11cbc5da35 100644
--- a/sys/arch/mac68k/dev/grf.c
+++ b/sys/arch/mac68k/dev/grf.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: grf.c,v 1.18 2001/11/06 19:53:14 miod Exp $ */
+/* $OpenBSD: grf.c,v 1.19 2001/11/28 13:47:38 art Exp $ */
/* $NetBSD: grf.c,v 1.41 1997/02/24 06:20:04 scottr Exp $ */
/*
@@ -391,7 +391,6 @@ grfunmap(dev, addr, p)
{
struct grf_softc *gp;
vm_size_t size;
- int rv;
gp = grf_cd.cd_devs[GRFUNIT(dev)];
@@ -405,8 +404,8 @@ grfunmap(dev, addr, p)
size = round_page(gp->sc_grfmode->fbsize);
- rv = uvm_unmap(&p->p_vmspace->vm_map, (vm_offset_t)addr,
+ uvm_unmap(&p->p_vmspace->vm_map, (vm_offset_t)addr,
(vm_offset_t)addr + size);
- return (rv == KERN_SUCCESS ? 0 : EINVAL);
+ return (0);
}
diff --git a/sys/arch/mac68k/mac68k/machdep.c b/sys/arch/mac68k/mac68k/machdep.c
index 51db2e477b0..642712037c1 100644
--- a/sys/arch/mac68k/mac68k/machdep.c
+++ b/sys/arch/mac68k/mac68k/machdep.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: machdep.c,v 1.88 2001/11/24 17:53:41 miod Exp $ */
+/* $OpenBSD: machdep.c,v 1.89 2001/11/28 13:47:38 art Exp $ */
/* $NetBSD: machdep.c,v 1.207 1998/07/08 04:39:34 thorpej Exp $ */
/*
@@ -451,7 +451,7 @@ again:
size = MAXBSIZE * nbuf;
if (uvm_map(kernel_map, (vm_offset_t *) &buffers, round_page(size),
NULL, UVM_UNKNOWN_OFFSET, 0, UVM_MAPFLAG(UVM_PROT_NONE,
- UVM_PROT_NONE, UVM_INH_NONE, UVM_ADV_NORMAL, 0)) != KERN_SUCCESS)
+ UVM_PROT_NONE, UVM_INH_NONE, UVM_ADV_NORMAL, 0)))
panic("startup: cannot allocate VM for buffers");
minaddr = (vm_offset_t)buffers;
base = bufpages / nbuf;
diff --git a/sys/arch/mac68k/mac68k/pmap.c b/sys/arch/mac68k/mac68k/pmap.c
index 299f88522b1..9afba2e761c 100644
--- a/sys/arch/mac68k/mac68k/pmap.c
+++ b/sys/arch/mac68k/mac68k/pmap.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: pmap.c,v 1.31 2001/11/07 01:18:00 art Exp $ */
+/* $OpenBSD: pmap.c,v 1.32 2001/11/28 13:47:38 art Exp $ */
/* $NetBSD: pmap.c,v 1.55 1999/04/22 04:24:53 chs Exp $ */
/*
@@ -341,14 +341,14 @@ pmap_init()
NULL, UVM_UNKNOWN_OFFSET, 0,
UVM_MAPFLAG(UVM_PROT_NONE, UVM_PROT_NONE,
UVM_INH_NONE, UVM_ADV_RANDOM,
- UVM_FLAG_FIXED)) != KERN_SUCCESS)
+ UVM_FLAG_FIXED)))
goto bogons;
addr = (vaddr_t)Sysmap;
if (uvm_map(kernel_map, &addr, MAC_MAX_PTSIZE,
NULL, UVM_UNKNOWN_OFFSET, 0,
UVM_MAPFLAG(UVM_PROT_NONE, UVM_PROT_NONE,
UVM_INH_NONE, UVM_ADV_RANDOM,
- UVM_FLAG_FIXED)) != KERN_SUCCESS) {
+ UVM_FLAG_FIXED))) {
/*
* If this fails, it is probably because the static
* portion of the kernel page table isn't big enough
@@ -422,11 +422,9 @@ pmap_init()
rv = uvm_map(kernel_map, &addr, s, NULL, UVM_UNKNOWN_OFFSET, 0,
UVM_MAPFLAG(UVM_PROT_NONE, UVM_PROT_NONE, UVM_INH_NONE,
UVM_ADV_RANDOM, UVM_FLAG_NOMERGE));
- if (rv != KERN_SUCCESS || (addr + s) >= (vaddr_t)Sysmap)
+ if (rv || (addr + s) >= (vaddr_t)Sysmap)
panic("pmap_init: kernel PT too small");
- rv = uvm_unmap(kernel_map, addr, addr + s);
- if (rv != KERN_SUCCESS)
- panic("pmap_init: uvm_unmap failed");
+ uvm_unmap(kernel_map, addr, addr + s);
/*
* Now allocate the space and link the pages together to
@@ -1259,7 +1257,7 @@ validate:
pmap_check_wiring("enter", trunc_page((vaddr_t)pmap_pte(pmap, va)));
#endif
- return (KERN_SUCCESS);
+ return (0);
}
/*
@@ -2210,7 +2208,7 @@ pmap_enter_ptpage(pmap, va)
PMAP_DPRINTF(PDB_ENTER|PDB_PTPAGE,
("enter: about to fault UPT pg at %lx\n", va));
s = uvm_fault(pt_map, va, 0, VM_PROT_READ|VM_PROT_WRITE);
- if (s != KERN_SUCCESS) {
+ if (s) {
printf("uvm_fault(pt_map, 0x%lx, 0, RW) -> %d\n",
va, s);
panic("pmap_enter: uvm_fault failed");
diff --git a/sys/arch/mac68k/mac68k/trap.c b/sys/arch/mac68k/mac68k/trap.c
index f9dc6019bbc..d2a1a125409 100644
--- a/sys/arch/mac68k/mac68k/trap.c
+++ b/sys/arch/mac68k/mac68k/trap.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: trap.c,v 1.31 2001/11/25 17:15:20 miod Exp $ */
+/* $OpenBSD: trap.c,v 1.32 2001/11/28 13:47:38 art Exp $ */
/* $NetBSD: trap.c,v 1.68 1998/12/22 08:47:07 scottr Exp $ */
/*
@@ -621,16 +621,16 @@ copyfault:
*/
if ((vm != NULL && (caddr_t)va >= vm->vm_maxsaddr)
&& map != kernel_map) {
- if (rv == KERN_SUCCESS) {
+ if (rv == 0) {
u_int nss;
nss = btoc(USRSTACK-(unsigned)va);
if (nss > vm->vm_ssize)
vm->vm_ssize = nss;
- } else if (rv == KERN_PROTECTION_FAILURE)
- rv = KERN_INVALID_ADDRESS;
+ } else if (rv == EACCES)
+ rv = EFAULT;
}
- if (rv == KERN_SUCCESS) {
+ if (rv == 0) {
if (type == T_MMUFLT) {
#if defined(M68040)
if (mmutype == MMU_68040)