summaryrefslogtreecommitdiff
path: root/sys/arch/i386
diff options
context:
space:
mode:
Diffstat (limited to 'sys/arch/i386')
-rw-r--r--sys/arch/i386/i386/machdep.c4
-rw-r--r--sys/arch/i386/i386/pmap.c11
-rw-r--r--sys/arch/i386/i386/trap.c7
3 files changed, 9 insertions, 13 deletions
diff --git a/sys/arch/i386/i386/machdep.c b/sys/arch/i386/i386/machdep.c
index e4e9633ea1d..72894a35231 100644
--- a/sys/arch/i386/i386/machdep.c
+++ b/sys/arch/i386/i386/machdep.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: machdep.c,v 1.183 2001/11/24 17:53:41 miod Exp $ */
+/* $OpenBSD: machdep.c,v 1.184 2001/11/28 13:47:38 art Exp $ */
/* $NetBSD: machdep.c,v 1.214 1996/11/10 03:16:17 thorpej Exp $ */
/*-
@@ -532,7 +532,7 @@ setup_buffers(maxaddr)
if (uvm_map(kernel_map, (vaddr_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_ADV_NORMAL, 0)))
panic("cpu_startup: cannot allocate VM for buffers");
addr = (vaddr_t)buffers;
diff --git a/sys/arch/i386/i386/pmap.c b/sys/arch/i386/i386/pmap.c
index e7934581d50..b3da2c94d8e 100644
--- a/sys/arch/i386/i386/pmap.c
+++ b/sys/arch/i386/i386/pmap.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: pmap.c,v 1.47 2001/11/07 02:55:50 art Exp $ */
+/* $OpenBSD: pmap.c,v 1.48 2001/11/28 13:47:38 art Exp $ */
/* $NetBSD: pmap.c,v 1.91 2000/06/02 17:46:37 thorpej Exp $ */
/*
@@ -2744,9 +2744,6 @@ pmap_change_attrs(pg, setbits, clearbits)
for (pve = pvh->pvh_list; pve != NULL; pve = pve->pv_next) {
#ifdef DIAGNOSTIC
- if (pve->pv_va >= uvm.pager_sva && pve->pv_va < uvm.pager_eva) {
- printf("pmap_change_attrs: found pager VA on pv_list\n");
- }
if (!pmap_valid_entry(pve->pv_pmap->pm_pdir[pdei(pve->pv_va)]))
panic("pmap_change_attrs: mapping without PTP "
"detected");
@@ -3498,7 +3495,7 @@ pmap_enter(pmap, va, pa, prot, flags)
ptp = pmap_get_ptp(pmap, pdei(va), FALSE);
if (ptp == NULL) {
if (flags & PMAP_CANFAIL) {
- return (KERN_RESOURCE_SHORTAGE);
+ return (ENOMEM);
}
panic("pmap_enter: get ptp failed");
}
@@ -3598,7 +3595,7 @@ pmap_enter(pmap, va, pa, prot, flags)
pve = pmap_alloc_pv(pmap, ALLOCPV_NEED);
if (pve == NULL) {
if (flags & PMAP_CANFAIL) {
- error = KERN_RESOURCE_SHORTAGE;
+ error = ENOMEM;
goto out;
}
panic("pmap_enter: no pv entries available");
@@ -3636,7 +3633,7 @@ enter_now:
if ((opte & ~(PG_M|PG_U)) != npte && pmap_is_curpmap(pmap))
pmap_update_pg(va);
- error = KERN_SUCCESS;
+ error = 0;
out:
pmap_unmap_ptes(pmap);
diff --git a/sys/arch/i386/i386/trap.c b/sys/arch/i386/i386/trap.c
index 892ce2bb758..98580fd7259 100644
--- a/sys/arch/i386/i386/trap.c
+++ b/sys/arch/i386/i386/trap.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: trap.c,v 1.44 2001/11/06 18:41:09 art Exp $ */
+/* $OpenBSD: trap.c,v 1.45 2001/11/28 13:47:38 art Exp $ */
/* $NetBSD: trap.c,v 1.95 1996/05/05 06:50:02 mycroft Exp $ */
/*-
@@ -469,7 +469,7 @@ trap(frame)
p->p_addr->u_pcb.pcb_onfault = NULL;
rv = uvm_fault(map, va, 0, ftype);
p->p_addr->u_pcb.pcb_onfault = onfault;
- if (rv == KERN_SUCCESS) {
+ if (rv == 0) {
if (nss > vm->vm_ssize)
vm->vm_ssize = nss;
if (type == T_PAGEFLT)
@@ -565,8 +565,7 @@ trapwrite(addr)
nss = 0;
}
- if (uvm_fault(&vm->vm_map, va, 0, VM_PROT_READ | VM_PROT_WRITE)
- != KERN_SUCCESS)
+ if (uvm_fault(&vm->vm_map, va, 0, VM_PROT_READ | VM_PROT_WRITE))
return 1;
if (nss > vm->vm_ssize)