diff options
author | Miod Vallat <miod@cvs.openbsd.org> | 2006-06-06 17:34:22 +0000 |
---|---|---|
committer | Miod Vallat <miod@cvs.openbsd.org> | 2006-06-06 17:34:22 +0000 |
commit | b7f0318bf675bca2a2440551a586c391ec612281 (patch) | |
tree | 5cc7befab64d42af02f66bc1e872ee27c5b10826 /sys | |
parent | 0e20fe1d99b4ec9403f05cf5c29e8b58331a3605 (diff) |
In pmap_enter(), when deciding to flush the icache for a page, invoke the
TLB-friendly cache function. From NetBSD.
Diffstat (limited to 'sys')
-rw-r--r-- | sys/arch/mips64/mips64/pmap.c | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/sys/arch/mips64/mips64/pmap.c b/sys/arch/mips64/mips64/pmap.c index dde496f9fae..cb805c80d46 100644 --- a/sys/arch/mips64/mips64/pmap.c +++ b/sys/arch/mips64/mips64/pmap.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pmap.c,v 1.19 2006/01/04 20:26:46 miod Exp $ */ +/* $OpenBSD: pmap.c,v 1.20 2006/06/06 17:34:21 miod Exp $ */ /* * Copyright (c) 2001-2004 Opsycon AB (www.opsycon.se / www.opsycon.com) @@ -779,14 +779,8 @@ pmap_enter(pmap_t pmap, vaddr_t va, paddr_t pa, vm_prot_t prot, int flags) /* * If mapping a memory space address invalidate ICache. */ -#if 0 - /* XXX The following test have previously been unreliable!!! */ - if (pg != NULL && - (prot & (VM_PROT_READ | VM_PROT_EXECUTE)) == - (VM_PROT_READ | VM_PROT_EXECUTE)) -#endif - if (pg != NULL) - Mips_InvalidateICachePage(va); + if (pg != NULL && (prot & VM_PROT_EXECUTE)) + Mips_InvalidateICache(va, PAGE_SIZE); return 0; } |