diff options
author | jake <jake@FreeBSD.org> | 2002-07-28 19:15:34 +0000 |
---|---|---|
committer | jake <jake@FreeBSD.org> | 2002-07-28 19:15:34 +0000 |
commit | 5bd1876975f34760da2eea4bfce9c738127d36ca (patch) | |
tree | 7409c58c739abe93e777697931a24cb0ce6f7c57 | |
parent | d1b2ba5197cad1a372122bc917dcd843f42811a1 (diff) | |
download | FreeBSD-src-5bd1876975f34760da2eea4bfce9c738127d36ca.zip FreeBSD-src-5bd1876975f34760da2eea4bfce9c738127d36ca.tar.gz |
Fix a bug introduced in previous commit. Due to the interaction of the
direct physical mappings with virtual page colour, we need to flush the
data cache when a page changes colour. I missed one case which broke
pipes.
-rw-r--r-- | sys/sparc64/sparc64/pmap.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/sparc64/sparc64/pmap.c b/sys/sparc64/sparc64/pmap.c index 3067d12..eea5931 100644 --- a/sys/sparc64/sparc64/pmap.c +++ b/sys/sparc64/sparc64/pmap.c @@ -600,8 +600,8 @@ pmap_cache_enter(vm_page_t m, vm_offset_t va) c++; } if (c == 1) { - m->md.color = color; dcache_page_inval(VM_PAGE_TO_PHYS(m)); + m->md.color = color; CTR0(KTR_PMAP, "pmap_cache_enter: cacheable"); return (1); } @@ -640,7 +640,7 @@ pmap_cache_remove(vm_page_t m, vm_offset_t va) if (m->md.colors[i] != 0) c++; } - if (c > 1) + if (c == 0) return; STAILQ_FOREACH(tp, &m->md.tte_list, tte_link) { tp->tte_data |= TD_CV; |