summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMiod Vallat <miod@cvs.openbsd.org>2007-04-21 19:26:05 +0000
committerMiod Vallat <miod@cvs.openbsd.org>2007-04-21 19:26:05 +0000
commiteecc72d310a1278097afd021422ae4a8b5552bf0 (patch)
treebae3a98d009ac01aeea7c238492d05cfccd3ec6f
parent301d8f3daf3fb35cbac46853a99f9c6a2e4bd0a9 (diff)
No more vtophys() on arm.
-rw-r--r--sys/arch/arm/arm/pmap.c6
-rw-r--r--sys/arch/arm/include/pmap.h21
2 files changed, 4 insertions, 23 deletions
diff --git a/sys/arch/arm/arm/pmap.c b/sys/arch/arm/arm/pmap.c
index 5431c09d64e..ad4e211ff98 100644
--- a/sys/arch/arm/arm/pmap.c
+++ b/sys/arch/arm/arm/pmap.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: pmap.c,v 1.11 2007/04/13 10:36:03 miod Exp $ */
+/* $OpenBSD: pmap.c,v 1.12 2007/04/21 19:26:03 miod Exp $ */
/* $NetBSD: pmap.c,v 1.147 2004/01/18 13:03:50 scw Exp $ */
/*
@@ -433,10 +433,10 @@ struct l2_dtable {
static __inline pt_entry_t *
pmap_alloc_l2_ptp(paddr_t *pap)
{
- pt_entry_t * pted;
+ pt_entry_t *pted;
pted = pool_cache_get(&pmap_l2ptp_cache, PR_NOWAIT);
- *pap = vtophys((vaddr_t)pted);
+ (void)pmap_extract(pmap_kernel(), (vaddr_t)pted, pap);
return pted;
}
#endif /* POOL_CACHE_PADDR */
diff --git a/sys/arch/arm/include/pmap.h b/sys/arch/arm/include/pmap.h
index 6e0acc7346e..583b26a4459 100644
--- a/sys/arch/arm/include/pmap.h
+++ b/sys/arch/arm/include/pmap.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: pmap.h,v 1.6 2006/05/27 20:36:05 miod Exp $ */
+/* $OpenBSD: pmap.h,v 1.7 2007/04/21 19:26:04 miod Exp $ */
/* $NetBSD: pmap.h,v 1.76 2003/09/06 09:10:46 rearnsha Exp $ */
/*
@@ -310,20 +310,6 @@ vtopte(vaddr_t va)
}
/*
- * Virtual address to physical address
- */
-static __inline paddr_t
-vtophys(vaddr_t va)
-{
- paddr_t pa;
-
- if (pmap_extract(pmap_kernel(), va, &pa) == FALSE)
- return (0); /* XXXSCW: Panic? */
-
- return (pa);
-}
-
-/*
* The new pmap ensures that page-tables are always mapping Write-Thru.
* Thus, on some platforms we can run fast and loose and avoid syncing PTEs
* on every change.
@@ -586,11 +572,6 @@ extern void (*pmap_zero_page_func)(struct vm_page *);
#define L2_L_MAPPABLE_P(va, pa, size) \
((((va) | (pa)) & L2_L_OFFSET) == 0 && (size) >= L2_L_SIZE)
-/*
- * Hooks for the pool allocator.
- */
-#define POOL_VTOPHYS(va) vtophys((vaddr_t) (va))
-
#endif /* _KERNEL */
#endif /* _ARM32_PMAP_H_ */