summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorArtur Grabowski <art@cvs.openbsd.org>2001-11-09 02:47:34 +0000
committerArtur Grabowski <art@cvs.openbsd.org>2001-11-09 02:47:34 +0000
commit0c95b4f4061db654d5894cf296d9d13db30d4167 (patch)
tree31831ceb89d6481ed419df1a7beda4ca70a1eaa5 /sys
parent6a4a8ca8c39f1d74f1a4c2b74a77ffbb61b9b746 (diff)
Actually allow pa == 0 in pmap_extract, and don't set *pap if we fail.
Diffstat (limited to 'sys')
-rw-r--r--sys/arch/alpha/alpha/pmap.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/sys/arch/alpha/alpha/pmap.c b/sys/arch/alpha/alpha/pmap.c
index d7fa9d0d98e..20063bfda21 100644
--- a/sys/arch/alpha/alpha/pmap.c
+++ b/sys/arch/alpha/alpha/pmap.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: pmap.c,v 1.19 2001/11/09 02:44:46 art Exp $ */
+/* $OpenBSD: pmap.c,v 1.20 2001/11/09 02:47:33 art Exp $ */
/* $NetBSD: pmap.c,v 1.154 2000/12/07 22:18:55 thorpej Exp $ */
/*-
@@ -2185,7 +2185,8 @@ boolean_t
pmap_extract(pmap_t pmap, vaddr_t va, paddr_t *pap)
{
pt_entry_t *l1pte, *l2pte, *l3pte;
- paddr_t pa = 0;
+ boolean_t rv = FALSE;
+ paddr_t pa;
#ifdef DEBUG
if (pmapdebug & PDB_FOLLOW)
@@ -2206,18 +2207,19 @@ pmap_extract(pmap_t pmap, vaddr_t va, paddr_t *pap)
goto out;
pa = pmap_pte_pa(l3pte) | (va & PGOFSET);
+ *pap = pa;
+ rv = TRUE;
out:
PMAP_UNLOCK(pmap);
#ifdef DEBUG
if (pmapdebug & PDB_FOLLOW) {
- if (pa)
+ if (rv)
printf("0x%lx\n", pa);
else
printf("failed\n");
}
#endif
- *pap = pa;
- return (pa != 0);
+ return (rv);
}
/*