From 5264247e94d08b60146c1b1ca9a1a89fb3a8bb6d Mon Sep 17 00:00:00 2001 From: Miod Vallat Date: Mon, 5 Mar 2007 21:48:24 +0000 Subject: Add pmap_prefer() for SH4, from NetBSD; ok drahn@ --- sys/arch/sh/include/pmap.h | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'sys/arch/sh/include/pmap.h') 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))) -- cgit v1.2.3