summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjake <jake@FreeBSD.org>2002-05-29 06:16:47 +0000
committerjake <jake@FreeBSD.org>2002-05-29 06:16:47 +0000
commitf9b60edf3c76975eed3b2dc7d4226a51bdbcd0e8 (patch)
tree8dca328af7bbf3d2714adb8949c63ed31ba4e50b
parent8bf6eba7b8d318305e1e54a874591e6e18203683 (diff)
downloadFreeBSD-src-f9b60edf3c76975eed3b2dc7d4226a51bdbcd0e8.zip
FreeBSD-src-f9b60edf3c76975eed3b2dc7d4226a51bdbcd0e8.tar.gz
Don't try to flush illegal alises from the data cache in vmapbuf and
vunmapbuf, this is handled by pmap now.
-rw-r--r--sys/sparc64/sparc64/vm_machdep.c30
1 files changed, 0 insertions, 30 deletions
diff --git a/sys/sparc64/sparc64/vm_machdep.c b/sys/sparc64/sparc64/vm_machdep.c
index fe8eb00..9fd910b 100644
--- a/sys/sparc64/sparc64/vm_machdep.c
+++ b/sys/sparc64/sparc64/vm_machdep.c
@@ -312,22 +312,6 @@ vmapbuf(struct buf *bp)
bp->b_npages = pidx;
bp->b_saveaddr = bp->b_data;
bp->b_data = kva + (((vm_offset_t)bp->b_data) & PAGE_MASK);
- if (CACHE_BADALIAS(trunc_page(bp->b_data),
- trunc_page(bp->b_saveaddr))) {
- /*
- * bp->data (the virtual address the buffer got mapped to in the
- * kernel) is an illegal alias to the user address.
- * If the kernel had mapped this buffer previously (during a
- * past IO operation) at this address, there might still be
- * stale but valid tagged data in the cache, so flush it.
- * XXX: the kernel address should be selected such that this
- * cannot happen.
- * XXX: pmap_kenter() maps physically uncacheable right now, so
- * this cannot happen.
- */
- dcache_inval(pmap, (vm_offset_t)bp->b_data,
- (vm_offset_t)bp->b_data + bp->b_bufsize - 1);
- }
}
/*
@@ -351,19 +335,5 @@ vunmapbuf(struct buf *bp)
for (pidx = 0; pidx < npages; pidx++)
vm_page_unhold(bp->b_pages[pidx]);
- if (CACHE_BADALIAS(trunc_page(bp->b_data),
- trunc_page(bp->b_saveaddr))) {
- /*
- * bp->data (the virtual address the buffer got mapped to in the
- * kernel) is an illegal alias to the user address. In this
- * case, D$ of the user adress needs to be flushed to avoid the
- * user reading stale data.
- * XXX: the kernel address should be selected such that this
- * cannot happen.
- */
- dcache_inval(&curproc->p_vmspace->vm_pmap,
- (vm_offset_t)bp->b_saveaddr, (vm_offset_t)bp->b_saveaddr +
- bp->b_bufsize - 1);
- }
bp->b_data = bp->b_saveaddr;
}
OpenPOWER on IntegriCloud