Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/sparc64/sparc64 Band aid - the infamous dcache_flus...
details: https://anonhg.NetBSD.org/src/rev/f20ddd25a6b8
branches: trunk
changeset: 544109:f20ddd25a6b8
user: martin <martin%NetBSD.org@localhost>
date: Tue Mar 11 21:28:23 2003 +0000
description:
Band aid - the infamous dcache_flush_page change independently suggested
by Andrey Petrov and Jason Thorpje (AFAIK).
This is a hack that covers some symptoms while we have no idea where
the real problem is. Anyway, since this avoids random data corruption
we better be safe and have this in-tree until the problem is solved the
right way.
diffstat:
sys/arch/sparc64/sparc64/pmap.c | 12 +++++++++++-
1 files changed, 11 insertions(+), 1 deletions(-)
diffs (33 lines):
diff -r 873a29503066 -r f20ddd25a6b8 sys/arch/sparc64/sparc64/pmap.c
--- a/sys/arch/sparc64/sparc64/pmap.c Tue Mar 11 19:43:04 2003 +0000
+++ b/sys/arch/sparc64/sparc64/pmap.c Tue Mar 11 21:28:23 2003 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: pmap.c,v 1.135 2003/01/31 19:05:57 martin Exp $ */
+/* $NetBSD: pmap.c,v 1.136 2003/03/11 21:28:23 martin Exp $ */
#undef NO_VCACHE /* Don't forget the locked TLB in dostart */
#define HWREF
/*
@@ -2540,6 +2540,7 @@
pmap_clear_modify(pg)
struct vm_page *pg;
{
+ paddr_t pa = VM_PAGE_TO_PHYS(pg);
pv_entry_t pv;
int i, changed = 0;
#ifdef DEBUG
@@ -2601,6 +2602,15 @@
pv->pv_va &= ~(PV_MOD);
simple_unlock(&pmap->pm_lock);
}
+
+ /*
+ * XXX
+ * This should not be necessary - but empirically it is.
+ * We need to find the reason this makes a difference and fix
+ * the root of the problem - then remove this band aid.
+ */
+ dcache_flush_page(pa);
+
pv_check();
#ifdef DEBUG
if (pmap_is_modified(pg)) {
Home |
Main Index |
Thread Index |
Old Index