summaryrefslogtreecommitdiff
path: root/sys/arch/sh/include/pmap.h
diff options
context:
space:
mode:
authorMiod Vallat <miod@cvs.openbsd.org>2007-03-05 21:48:24 +0000
committerMiod Vallat <miod@cvs.openbsd.org>2007-03-05 21:48:24 +0000
commit5264247e94d08b60146c1b1ca9a1a89fb3a8bb6d (patch)
tree3311f51d27fe4450590ecd295e6b662b4fddde0e /sys/arch/sh/include/pmap.h
parentbfd82ada45bbaa1265b4a6714224e7e0d6f01b60 (diff)
Add pmap_prefer() for SH4, from NetBSD; ok drahn@
Diffstat (limited to 'sys/arch/sh/include/pmap.h')
-rw-r--r--sys/arch/sh/include/pmap.h11
1 files changed, 10 insertions, 1 deletions
diff --git a/sys/arch/sh/include/pmap.h b/sys/arch/sh/include/pmap.h
index b26dd562137..bd70245409a 100644
--- a/sys/arch/sh/include/pmap.h
+++ b/sys/arch/sh/include/pmap.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: pmap.h,v 1.1 2006/10/06 21:02:55 miod Exp $ */
+/* $OpenBSD: pmap.h,v 1.2 2007/03/05 21:48:21 miod Exp $ */
/* $NetBSD: pmap.h,v 1.28 2006/04/10 23:12:11 uwe Exp $ */
/*-
@@ -80,6 +80,15 @@ pmap_remove_all(struct pmap *pmap)
/* Nothing. */
}
+/*
+ * pmap_prefer() helps to avoid virtual cache aliases on SH4 CPUs
+ * which have the virtually-indexed cache.
+ */
+#ifdef SH4
+#define PMAP_PREFER(pa, va) pmap_prefer((pa), (va))
+void pmap_prefer(vaddr_t, vaddr_t *);
+#endif /* SH4 */
+
#define __HAVE_PMAP_DIRECT
#define pmap_map_direct(pg) SH3_PHYS_TO_P1SEG(VM_PAGE_TO_PHYS(pg))
#define pmap_unmap_direct(va) PHYS_TO_VM_PAGE(SH3_P1SEG_TO_PHYS((va)))