From a2b4810ee7e2baaa385de6ac22ab4f3e497e2791 Mon Sep 17 00:00:00 2001 From: Jake Burkholder Date: Wed, 29 May 2002 06:16:47 +0000 Subject: [PATCH] Don't try to flush illegal alises from the data cache in vmapbuf and vunmapbuf, this is handled by pmap now. --- sys/sparc64/sparc64/vm_machdep.c | 30 ------------------------------ 1 file changed, 30 deletions(-) diff --git a/sys/sparc64/sparc64/vm_machdep.c b/sys/sparc64/sparc64/vm_machdep.c index fe8eb00a8c6..9fd910b3fab 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; }