Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/alpha/alpha Remove I-sync stuff from pmap_changebit...
details: https://anonhg.NetBSD.org/src/rev/2ec15faa494b
branches: trunk
changeset: 512777:2ec15faa494b
user: thorpej <thorpej%NetBSD.org@localhost>
date: Mon Jul 16 19:48:03 2001 +0000
description:
Remove I-sync stuff from pmap_changebit(). The AARM says that we
only have to sync the I-stream when the mapping is removed or chaged,
and since the I-stream is fetch-only, changing protection bits does
not constitute changing the mapping (the VA->PA translation is still
the same).
diffstat:
sys/arch/alpha/alpha/pmap.c | 29 ++---------------------------
1 files changed, 2 insertions(+), 27 deletions(-)
diffs (72 lines):
diff -r 41e43aa8252d -r 2ec15faa494b sys/arch/alpha/alpha/pmap.c
--- a/sys/arch/alpha/alpha/pmap.c Mon Jul 16 18:59:33 2001 +0000
+++ b/sys/arch/alpha/alpha/pmap.c Mon Jul 16 19:48:03 2001 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: pmap.c,v 1.183 2001/07/15 21:57:01 thorpej Exp $ */
+/* $NetBSD: pmap.c,v 1.184 2001/07/16 19:48:03 thorpej Exp $ */
/*-
* Copyright (c) 1998, 1999, 2000, 2001 The NetBSD Foundation, Inc.
@@ -154,7 +154,7 @@
#include <sys/cdefs.h> /* RCS ID & Copyright macro defns */
-__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.183 2001/07/15 21:57:01 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.184 2001/07/16 19:48:03 thorpej Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -2679,9 +2679,6 @@
* Note: we assume that the pv_head is already locked, and that
* the caller has acquired a PV->pmap mutex so that we can lock
* the pmaps as we encounter them.
- *
- * XXX This routine could stand to have some I-stream
- * XXX optimization done.
*/
void
pmap_changebit(struct vm_page *pg, u_long set, u_long mask, long cpu_id)
@@ -2690,7 +2687,6 @@
pt_entry_t *pte, npte;
vaddr_t va;
boolean_t hadasm, isactive;
- boolean_t needisync, needkisync = FALSE;
PMAP_TLB_SHOOTDOWN_CPUSET_DECL
#ifdef DEBUG
@@ -2721,25 +2717,7 @@
if (*pte != npte) {
hadasm = (pmap_pte_asm(pte) != 0);
isactive = PMAP_ISACTIVE(pv->pv_pmap, cpu_id);
- /*
- * Determine what we need to do about the I-stream.
- * If PG_EXEC was set, we mark a user pmap as needing
- * an I-sync on the way out to userspace. We always
- * need an immediate I-sync for the kernel pmap.
- */
- needisync = FALSE;
- if (pmap_pte_exec(pte)) {
- if (pv->pv_pmap == pmap_kernel())
- needkisync = TRUE;
- else {
- PMAP_SET_NEEDISYNC(pv->pv_pmap);
- if (pv->pv_pmap->pm_cpus != 0)
- needisync = TRUE;
- }
- }
PMAP_SET_PTE(pte, npte);
- if (needisync)
- PMAP_SYNC_ISTREAM_USER(pv->pv_pmap);
PMAP_INVALIDATE_TLB(pv->pv_pmap, va, hadasm, isactive,
cpu_id);
PMAP_TLB_SHOOTDOWN(pv->pv_pmap, va,
@@ -2749,9 +2727,6 @@
}
PMAP_TLB_SHOOTNOW();
-
- if (needkisync)
- PMAP_SYNC_ISTREAM_KERNEL();
}
/*
Home |
Main Index |
Thread Index |
Old Index