diff options
author | Artur Grabowski <art@cvs.openbsd.org> | 2000-05-01 18:28:59 +0000 |
---|---|---|
committer | Artur Grabowski <art@cvs.openbsd.org> | 2000-05-01 18:28:59 +0000 |
commit | 66feddb7ab49c0a125021574ebd686d1b8d50163 (patch) | |
tree | 083d3eefb0f15ac3057c5f6a90f48a34060eb713 /sys/arch | |
parent | 8586eddcbcc6dde7930263cc86f875b2ae80d6cf (diff) |
When cache is mandatory, don't pmap_enter uncached in vmapbuf.
This unbreaks physio on SM71 and SM81.
Thanks to mho@ for borrowing me a cpu I could test on.
Diffstat (limited to 'sys/arch')
-rw-r--r-- | sys/arch/sparc/sparc/vm_machdep.c | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/sys/arch/sparc/sparc/vm_machdep.c b/sys/arch/sparc/sparc/vm_machdep.c index 532c1d1922a..5e3f1ddf892 100644 --- a/sys/arch/sparc/sparc/vm_machdep.c +++ b/sys/arch/sparc/sparc/vm_machdep.c @@ -1,4 +1,4 @@ -/* $OpenBSD: vm_machdep.c,v 1.18 2000/02/28 16:34:28 deraadt Exp $ */ +/* $OpenBSD: vm_machdep.c,v 1.19 2000/05/01 18:28:58 art Exp $ */ /* $NetBSD: vm_machdep.c,v 1.30 1997/03/10 23:55:40 pk Exp $ */ /* @@ -327,10 +327,19 @@ vmapbuf(bp, sz) panic("vmapbuf: null page frame"); /* + * Don't enter uncached if cache is mandatory. + * + * XXX - there are probably other cases where we don't need + * to uncache, but for now we're conservative. + */ + if (!(cpuinfo.flags & CPUFLG_CACHE_MANDATORY)) + pa |= PMAP_NC; + + /* * pmap_enter distributes this mapping to all * contexts... maybe we should avoid this extra work */ - pmap_enter(pmap_kernel(), kva, pa | PMAP_NC, + pmap_enter(pmap_kernel(), kva, pa, VM_PROT_READ | VM_PROT_WRITE, 1, 0); uva += PAGE_SIZE; |