summaryrefslogtreecommitdiff
path: root/sys/arch/sparc
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>2001-06-10 01:45:05 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>2001-06-10 01:45:05 +0000
commit944f99763b3a04821cc996d462dd7dc39cab2034 (patch)
treea854f4035460e0fb616f481f2380e5ba057a7e4c /sys/arch/sparc
parent2f0ab62c76d10db4607ab0fa70c964f778a6b961 (diff)
Art error #2
Diffstat (limited to 'sys/arch/sparc')
-rw-r--r--sys/arch/sparc/include/pmap.h6
-rw-r--r--sys/arch/sparc/sparc/pmap.c38
-rw-r--r--sys/arch/sparc/sparc/vm_machdep.c4
3 files changed, 26 insertions, 22 deletions
diff --git a/sys/arch/sparc/include/pmap.h b/sys/arch/sparc/include/pmap.h
index 7d55872bbe5..d5d2d2fa7fa 100644
--- a/sys/arch/sparc/include/pmap.h
+++ b/sys/arch/sparc/include/pmap.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: pmap.h,v 1.18 2001/06/08 08:09:26 art Exp $ */
+/* $OpenBSD: pmap.h,v 1.19 2001/06/10 01:45:03 deraadt Exp $ */
/* $NetBSD: pmap.h,v 1.30 1997/08/04 20:00:47 pk Exp $ */
/*
@@ -326,7 +326,7 @@ void pmap_clear_reference4_4c __P((paddr_t pa));
void pmap_copy_page4_4c __P((paddr_t, paddr_t));
void pmap_enter4_4c __P((pmap_t, vaddr_t, paddr_t, vm_prot_t,
boolean_t, vm_prot_t));
-paddr_t pmap_extract4_4c __P((pmap_t, vaddr_t));
+boolean_t pmap_extract4_4c __P((pmap_t, vaddr_t, paddr_t *));
#ifdef PMAP_NEW
boolean_t pmap_is_modified4_4c __P((struct vm_page *));
boolean_t pmap_is_referenced4_4c __P((struct vm_page *));
@@ -357,7 +357,7 @@ void pmap_clear_reference4m __P((paddr_t pa));
void pmap_copy_page4m __P((paddr_t, paddr_t));
void pmap_enter4m __P((pmap_t, vaddr_t, paddr_t, vm_prot_t,
boolean_t, vm_prot_t));
-paddr_t pmap_extract4m __P((pmap_t, vaddr_t));
+boolean_t pmap_extract4m __P((pmap_t, vaddr_t, paddr_t *));
#ifdef PMAP_NEW
boolean_t pmap_is_modified4m __P((struct vm_page *));
boolean_t pmap_is_referenced4m __P((struct vm_page *));
diff --git a/sys/arch/sparc/sparc/pmap.c b/sys/arch/sparc/sparc/pmap.c
index 13bf7149a81..e03b3e30e27 100644
--- a/sys/arch/sparc/sparc/pmap.c
+++ b/sys/arch/sparc/sparc/pmap.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: pmap.c,v 1.85 2001/05/10 12:52:35 art Exp $ */
+/* $OpenBSD: pmap.c,v 1.86 2001/06/10 01:45:04 deraadt Exp $ */
/* $NetBSD: pmap.c,v 1.118 1998/05/19 19:00:18 thorpej Exp $ */
/*
@@ -545,7 +545,7 @@ void (*pmap_clear_reference_p) __P((paddr_t pa));
void (*pmap_copy_page_p) __P((paddr_t, paddr_t));
void (*pmap_enter_p) __P((pmap_t, vaddr_t, paddr_t, vm_prot_t,
boolean_t, vm_prot_t));
-paddr_t (*pmap_extract_p) __P((pmap_t, vaddr_t));
+boolean_t (*pmap_extract_p) __P((pmap_t, vaddr_t, paddr_t *));
#ifdef PMAP_NEW
boolean_t (*pmap_is_modified_p) __P((struct vm_page *));
boolean_t (*pmap_is_referenced_p) __P((struct vm_page *));
@@ -5704,10 +5704,11 @@ pmap_unwire(pm, va)
*/
#if defined(SUN4) || defined(SUN4C)
-paddr_t
-pmap_extract4_4c(pm, va)
+boolean_t
+pmap_extract4_4c(pm, va, pa)
struct pmap *pm;
vaddr_t va;
+ paddr_t *pa;
{
int tpte;
int vr, vs;
@@ -5719,7 +5720,7 @@ pmap_extract4_4c(pm, va)
if (pmapdebug & PDB_FOLLOW)
printf("pmap_extract: null pmap\n");
#endif
- return (0);
+ return (FALSE);
}
vr = VA_VREG(va);
vs = VA_VSEG(va);
@@ -5729,7 +5730,7 @@ pmap_extract4_4c(pm, va)
if (pmapdebug & PDB_FOLLOW)
printf("pmap_extract: invalid segment (%d)\n", vr);
#endif
- return (0);
+ return (FALSE);
}
sp = &rp->rg_segmap[vs];
@@ -5755,7 +5756,7 @@ pmap_extract4_4c(pm, va)
if (pmapdebug & PDB_FOLLOW)
printf("pmap_extract: invalid segment\n");
#endif
- return (0);
+ return (FALSE);
}
tpte = pte[VA_VPG(va)];
}
@@ -5764,11 +5765,12 @@ pmap_extract4_4c(pm, va)
if (pmapdebug & PDB_FOLLOW)
printf("pmap_extract: invalid pte\n");
#endif
- return (0);
+ return (FALSE);
}
tpte &= PG_PFNUM;
tpte = tpte;
- return ((tpte << PGSHIFT) | (va & PGOFSET));
+ *pa = ((tpte << PGSHIFT) | (va & PGOFSET));
+ return (TRUE);
}
#endif /*4,4c*/
@@ -5778,10 +5780,11 @@ pmap_extract4_4c(pm, va)
* with the given map/virtual_address pair.
* GRR, the vm code knows; we should not have to do this!
*/
-paddr_t
-pmap_extract4m(pm, va)
+boolean_t
+pmap_extract4m(pm, va, pa)
struct pmap *pm;
vaddr_t va;
+ paddr_t *pa;
{
struct regmap *rm;
struct segmap *sm;
@@ -5792,7 +5795,7 @@ pmap_extract4m(pm, va)
if (pmapdebug & PDB_FOLLOW)
printf("pmap_extract: null pmap\n");
#endif
- return (0);
+ return (FALSE);
}
if ((rm = pm->pm_regmap) == NULL) {
@@ -5800,7 +5803,7 @@ pmap_extract4m(pm, va)
if (pmapdebug & PDB_FOLLOW)
printf("pmap_extract: no regmap entry");
#endif
- return (0);
+ return (FALSE);
}
rm += VA_VREG(va);
@@ -5809,7 +5812,7 @@ pmap_extract4m(pm, va)
if (pmapdebug & PDB_FOLLOW)
printf("pmap_extract: no segmap");
#endif
- return (0);
+ return (FALSE);
}
sm += VA_VSEG(va);
@@ -5818,7 +5821,7 @@ pmap_extract4m(pm, va)
if (pmapdebug & PDB_FOLLOW)
panic("pmap_extract: no ptes");
#endif
- return 0;
+ return FALSE;
}
pte = sm->sg_pte[VA_SUN4M_VPG(va)];
@@ -5828,10 +5831,11 @@ pmap_extract4m(pm, va)
printf("pmap_extract: invalid pte of type %d\n",
pte & SRMMU_TETYPE);
#endif
- return (0);
+ return (FALSE);
}
- return (ptoa((pte & SRMMU_PPNMASK) >> SRMMU_PPNSHIFT) | VA_OFF(va));
+ *pa = (ptoa((pte & SRMMU_PPNMASK) >> SRMMU_PPNSHIFT) | VA_OFF(va));
+ return (TRUE);
}
#endif /* sun4m */
diff --git a/sys/arch/sparc/sparc/vm_machdep.c b/sys/arch/sparc/sparc/vm_machdep.c
index 4bfe64e8f0d..433b47fdbaf 100644
--- a/sys/arch/sparc/sparc/vm_machdep.c
+++ b/sys/arch/sparc/sparc/vm_machdep.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: vm_machdep.c,v 1.26 2001/06/08 08:09:28 art Exp $ */
+/* $OpenBSD: vm_machdep.c,v 1.27 2001/06/10 01:45:04 deraadt Exp $ */
/* $NetBSD: vm_machdep.c,v 1.30 1997/03/10 23:55:40 pk Exp $ */
/*
@@ -79,7 +79,7 @@ pagemove(from, to, size)
register caddr_t from, to;
size_t size;
{
- register paddr_t pa;
+ paddr_t pa;
#ifdef DEBUG
if ((size & PAGE_MASK) != 0 ||