summaryrefslogtreecommitdiff
path: root/sys/arch
diff options
context:
space:
mode:
authorArtur Grabowski <art@cvs.openbsd.org>2000-02-04 19:16:14 +0000
committerArtur Grabowski <art@cvs.openbsd.org>2000-02-04 19:16:14 +0000
commitf36ae7656cce9f52433cf3f1c1ab0b69ebaf3d2e (patch)
treee59ecf9d0c2affa1c9ac68eafbdc7412ff311780 /sys/arch
parentd31a7560b8583bab1612416f3f205cdf129c4d02 (diff)
In cases where we flush a page from the cache and tlb we want to
flush it from the tlb _after_ the cache because some cache flushes can reload the tlb. (fixes random coredumps on some cpus).
Diffstat (limited to 'sys/arch')
-rw-r--r--sys/arch/sparc/sparc/pmap.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/arch/sparc/sparc/pmap.c b/sys/arch/sparc/sparc/pmap.c
index 9ef0111d7cc..882dee7145d 100644
--- a/sys/arch/sparc/sparc/pmap.c
+++ b/sys/arch/sparc/sparc/pmap.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: pmap.c,v 1.74 2000/02/04 15:46:09 art Exp $ */
+/* $OpenBSD: pmap.c,v 1.75 2000/02/04 19:16:13 art Exp $ */
/* $NetBSD: pmap.c,v 1.118 1998/05/19 19:00:18 thorpej Exp $ */
/*
@@ -4943,7 +4943,6 @@ pmap_changeprot4m(pm, va, prot, wired)
if (pm->pm_ctx) {
ctx = getcontext4m();
setcontext4m(pm->pm_ctxnum);
- tlb_flush_page(va);
/*
* Use current context.
* Flush cache if page has been referenced to
@@ -4953,6 +4952,7 @@ pmap_changeprot4m(pm, va, prot, wired)
if ((tpte & (SRMMU_PG_C|SRMMU_PGTYPE)) ==
(SRMMU_PG_C|PG_SUN4M_OBMEM))
cache_flush_page(va);
+ tlb_flush_page(va);
setcontext4m(ctx);
} else {
tpte = *ptep;
@@ -6485,7 +6485,6 @@ kvm_setcache(va, npages, cached)
int *ptep;
ptep = getptep4m(pmap_kernel(), (vaddr_t)va);
- tlb_flush_page((vaddr_t)va);
pte = *ptep;
#ifdef DIAGNOSTIC
if ((pte & SRMMU_TETYPE) != SRMMU_TEPTE)
@@ -6502,6 +6501,7 @@ kvm_setcache(va, npages, cached)
pte |= SRMMU_PG_C;
else
pte &= ~SRMMU_PG_C;
+ tlb_flush_page((vaddr_t)va);
setpgt4m(ptep, pte);
if ((pte & SRMMU_PGTYPE) == PG_SUN4M_OBMEM)