diff options
author | chuck <chuck@cvs.openbsd.org> | 1995-11-10 00:25:07 +0000 |
---|---|---|
committer | chuck <chuck@cvs.openbsd.org> | 1995-11-10 00:25:07 +0000 |
commit | 9e5721ec508c4c07f8ebc3950276caffbb9bc8d7 (patch) | |
tree | 18061dba402206b7b8678a94c1280c754eab8996 /sys/arch/sparc | |
parent | 1848f3689607781a442c3f9b95448510997e5fb3 (diff) |
fix DVMA problem on sun4 systems with writeback cache. you need
to flush the cache after map in so that the info gets written into
main memory. you really only need to do this when writing data
(e.g. disk write), but there is currently no way to tell if you are
writing so we do it for all cases (XXX this is stupid, fix later).
This causes 4/200's to be able to write disk files on SMD disks without
data corruption.
Diffstat (limited to 'sys/arch/sparc')
-rw-r--r-- | sys/arch/sparc/sparc/vm_machdep.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/sys/arch/sparc/sparc/vm_machdep.c b/sys/arch/sparc/sparc/vm_machdep.c index 240be22fedb..f825aa81acb 100644 --- a/sys/arch/sparc/sparc/vm_machdep.c +++ b/sys/arch/sparc/sparc/vm_machdep.c @@ -97,7 +97,7 @@ dvma_mapin(map, va, len, canwait) vm_offset_t va; int len, canwait; { - vm_offset_t kva, tva; + vm_offset_t kva, tva, va_0 = va; register int npf, s; register vm_offset_t pa; long pn; @@ -135,6 +135,10 @@ dvma_mapin(map, va, len, canwait) tva += PAGE_SIZE; va += PAGE_SIZE; } + + if (vactype == VAC_WRITEBACK) + cache_flush((caddr_t)va_0, len); /* XXX only needed on write */ + return kva; } |