summaryrefslogtreecommitdiff
path: root/sys/arch/mvme68k
diff options
context:
space:
mode:
authorArtur Grabowski <art@cvs.openbsd.org>2001-11-28 13:47:41 +0000
committerArtur Grabowski <art@cvs.openbsd.org>2001-11-28 13:47:41 +0000
commit4c46afe9f467831fba921bfa77a12903c4c39c7d (patch)
treeb755c95bf93b8cb384f911d3f70b96063188d78a /sys/arch/mvme68k
parent8a3355695ffa23bba7a2cb69d229a81ba3485bf9 (diff)
Sync in more uvm changes from NetBSD.
This time we're getting rid of KERN_* and VM_PAGER_* error codes and use errnos instead.
Diffstat (limited to 'sys/arch/mvme68k')
-rw-r--r--sys/arch/mvme68k/mvme68k/machdep.c4
-rw-r--r--sys/arch/mvme68k/mvme68k/pmap.c21
-rw-r--r--sys/arch/mvme68k/mvme68k/trap.c14
3 files changed, 18 insertions, 21 deletions
diff --git a/sys/arch/mvme68k/mvme68k/machdep.c b/sys/arch/mvme68k/mvme68k/machdep.c
index c8002d34884..cf3c51eebd0 100644
--- a/sys/arch/mvme68k/mvme68k/machdep.c
+++ b/sys/arch/mvme68k/mvme68k/machdep.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: machdep.c,v 1.56 2001/11/24 17:53:41 miod Exp $ */
+/* $OpenBSD: machdep.c,v 1.57 2001/11/28 13:47:38 art Exp $ */
/*
* Copyright (c) 1995 Theo de Raadt
@@ -343,7 +343,7 @@ again:
if (uvm_map(kernel_map, (vaddr_t *) &buffers, m68k_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_ADV_NORMAL, 0)))
panic("cpu_startup: cannot allocate VM for buffers");
minaddr = (vaddr_t)buffers;
diff --git a/sys/arch/mvme68k/mvme68k/pmap.c b/sys/arch/mvme68k/mvme68k/pmap.c
index ce7cd076711..690b73789b7 100644
--- a/sys/arch/mvme68k/mvme68k/pmap.c
+++ b/sys/arch/mvme68k/mvme68k/pmap.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: pmap.c,v 1.30 2001/11/07 01:18:00 art Exp $ */
+/* $OpenBSD: pmap.c,v 1.31 2001/11/28 13:47:38 art Exp $ */
/*
* Copyright (c) 1995 Theo de Raadt
@@ -349,14 +349,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, M68K_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
@@ -446,11 +446,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
@@ -1232,7 +1230,7 @@ validate:
pmap_check_wiring("enter", trunc_page(pmap_pte(pmap, va)));
#endif
- return (KERN_SUCCESS);
+ return (0);
}
/*
@@ -1689,9 +1687,9 @@ pmap_mapmulti(pmap, va)
if (*ste == SG_NV && (*bste & SG_V)) {
*ste = *bste;
TBIAU();
- return (KERN_SUCCESS);
+ return (0);
}
- return (KERN_INVALID_ADDRESS);
+ return (EFAULT);
}
#endif
@@ -2225,8 +2223,7 @@ pmap_enter_ptpage(pmap, va)
printf("enter: about to fault UPT pg at %x\n", va);
#endif
if (uvm_fault_wire(pt_map, va, va + PAGE_SIZE,
- VM_PROT_READ|VM_PROT_WRITE)
- != KERN_SUCCESS)
+ VM_PROT_READ|VM_PROT_WRITE))
panic("pmap_enter: uvm_fault failed");
pmap_extract(pmap_kernel(), va, &ptpa);
}
diff --git a/sys/arch/mvme68k/mvme68k/trap.c b/sys/arch/mvme68k/mvme68k/trap.c
index be45d95f887..456c7a83efb 100644
--- a/sys/arch/mvme68k/mvme68k/trap.c
+++ b/sys/arch/mvme68k/mvme68k/trap.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: trap.c,v 1.38 2001/11/25 17:15:20 miod Exp $ */
+/* $OpenBSD: trap.c,v 1.39 2001/11/28 13:47:38 art Exp $ */
/*
* Copyright (c) 1995 Theo de Raadt
@@ -580,10 +580,10 @@ copyfault:
vm_offset_t bva;
rv = pmap_mapmulti(map->pmap, va);
- if (rv != KERN_SUCCESS) {
+ if (rv) {
bva = HPMMBASEADDR(va);
rv = uvm_fault(map, bva, 0, ftype);
- if (rv == KERN_SUCCESS)
+ if (rv == 0)
(void) pmap_mapmulti(map->pmap, va);
}
} else
@@ -602,16 +602,16 @@ copyfault:
* error.
*/
if ((caddr_t)va >= vm->vm_maxsaddr && map != kernel_map) {
- if (rv == KERN_SUCCESS) {
+ if (rv == 0) {
unsigned 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)